Run configurations

Posted by Thomas Mercer-Hursh on 23-Apr-2015 15:56

I am working on adding some Proparse functionality to ABL2DB.  I created a test project, did some tests, figured out some things, and then went to add functionality based on what I had learned to the ABL2DB project.  When it came time to test the new code, it couldn't find proparse.net, even though it could obviously find it during the compile.  Comparing the two projects I find that the project which worked did not have Use TTY for runtime checked, but the one where it is not working had this checked.

So, I unchecked it and now I am getting

Program adecomm/_runcode.p was compiled under another incompatible display
environment. Cannot run without recompile. (4438)

The only instance of _runcode.r I see is in DLC\tty\webtools, but, deleting that doesn't seem like the right thing. 

So, how do I convince it to use the right version.

All Replies

Posted by Matt Baker on 23-Apr-2015 16:23

 
This is PROPATH issue.  There are two copies of _runcode, one in $DLC/tty/adecomm.pl and one in $DLC/gui/adecomm.pl.
 
Normally PDS has both of these entries in the PROPATH (added as a collection under standard paths).  And it adds is an environment filter that takes care of removing whichever is not appropriate for the value of the “tty/vs gui” checkbox you mention.  The default is super convenient because you can switch the tty/gui and everything still works.
 
Check your .propath file (use the launch configuration dialog propath tab or the project propath settings page…don’t edit it by hand please) and makes sure the “standard library” entry that contains adecomm that you need has the environment filter set properly.
 
matt
 
[collapse]
From: Thomas Mercer-Hursh [mailto:bounce-tamhas@community.progress.com]
Sent: Thursday, April 23, 2015 4:57 PM
To: TU.OE.Development@community.progress.com
Subject: [Technical Users - OE Development] Run configurations
 
Thread created by Thomas Mercer-Hursh

I am working on adding some Proparse functionality to ABL2DB.  I created a test project, did some tests, figured out some things, and then went to add functionality based on what I had learned to the ABL2DB project.  When it came time to test the new code, it couldn't find proparse.net, even though it could obviously find it during the compile.  Comparing the two projects I find that the project which worked did not have Use TTY for runtime checked, but the one where it is not working had this checked.

So, I unchecked it and now I am getting

Program adecomm/_runcode.p was compiled under another incompatible display
environment. Cannot run without recompile. (4438)

The only instance of _runcode.r I see is in DLC\tty\webtools, but, deleting that doesn't seem like the right thing. 

So, how do I convince it to use the right version.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Thomas Mercer-Hursh on 23-Apr-2015 16:39

If I look under the PROPATH of the project, I only see the GUI PLs.  Likewise under the run configuration.

Ah, but the run configuration had Use TTY checked ... which is strange, because I deleted it and recreated it.

Posted by Thomas Mercer-Hursh on 23-Apr-2015 16:48

Since you seemed to do so well on that one, any idea why I am suddenly getting lots of

java.sql.SQLException:[DataDirect][OpenEdgeJDBC Driver]OE Broker fails to find a server available for connecting.

I also get no display in the Schema box.  In the past, I was getting this once and then it would continue just fine and the Schema would show up.  Now, though, its persisting.

Presumably, this has to do with the SQL connection for displaying the schema.  None of that has changed, of course. All that happened recently was I added an additional project with the same connection.

In the log, I see a bunch of

0: (8839)  No SQL servers are available.  Try again later.

So, apparently the issue is SQL access.

I have had vague counsel about adjusting the parameter for the number of servers and such (not really my area of specialty), but the surprising part to me is that this is occurring now when it didn't in the past.  This workspace does have 8 projects in it, 7 of which are OpenEdge, but 5 are closed so that only three OpenEdge projects are open.  I am sure I have done that tons of times before.  The Task Manager shows me 5 _mprosrv processes, one with a classpath argument, but all 5 with a DB connection to the DB I am using for all of them.  There is one _progress process.  The log seems to show three users still in and one that went in and out with the RUN.

Posted by Matt Baker on 23-Apr-2015 20:27

I have no perfect answer, but there a few places to look.

I believe it means either the _sqlsrv.exe failed to start, possibly because of a port conflict, or you run out of user connections (as mentioned on PEG forum for the same question :) ).  Start by checking the database log file and see what gets reported there, maybe something failed to start.

Are you starting your database manually or are you letting PDS do it?  PDS doesn't tweak anything unless you put in extra startup parameters.  It just runs proserve -db <something> -S <something>.  That's pretty much it.  So if you have a few projects connected to same database (each one starts and AVM for compilation) and a few concurrent run configurations (each one also probably uses a DB connection), make sure -n and related is setup reasonably.  

If you are doing it manually, update your script to start _sqlsrv.exe with the port you want.

Posted by Simon L. Prinsloo on 24-Apr-2015 02:47

PDSOE use quite a few db connections and the default startup parameters will not suffice.

For your scenario, provided that you work alone, I would suggest:

-n 30 (or more)

-Mi 7 (or more, but not more than TRUNC(-n / 4).

Here is why:

Staring with the default parameters, you will have:

Total number of clients (-n) = 20

Maximum servers (-Mn) = 4

Minimum clients per server (-Mi) = 1

Maximum clients per server (-Ma) = 5, if -n is the default of 20. (By default -Ma = -n / -Mn)

So you can connect up to 20 clients - auxiliaries. Auxiliaries are connections like, BIW, APW, PROWDOG, promon, the servers and all secondary brokers. In a default startup max of 5 (PROWDOG and 4 servers).

Since -Mi = 1, a new server will be spawned for each of the first four client connections.  In a workspace with as little as four projects this can lead to 4 ABL servers and now the broker can't spawn a SQL server, since -Mn allows only four servers in total.

One connection per server is overkill in development environments. By increasing -Mi to 5 in your database startup parameters, it will not spawn another server of the same type until you have at least five connections to the existing one. Total connections will however still be limited to 20, leaving you with the ability to connect about 7 or 8 projects, unless you increase -n.

In short, I would suggest this:

-n = MAX( 20, 2 * Projects + 5 (for Auxiliaries) + Reserves),

-Mi = MAX(5, Projects), but not more that -Ma default

Projects = projects_in_all_workspaces_that_can_be_open_simultaneously.

Reserves = sessions needed for testing, e.g. when running the code or connecting AppServers, e.g. No of AppServers + (4 * no of developers) will allow each developer to simultaneously run four sessions connected to the database.

In your case:

-n = 2 * 7 + 4 + 5 Reserves = 23+

-Mi = 7 (22 / 4 = 5.75, so I would increase -n to at least 28 rather than decreasing -Mi)

Posted by Thomas Mercer-Hursh on 24-Apr-2015 09:06

Simon, thanks for some very concrete suggestions.  I am still curious about why I am encountering this now and I hadn't in the past.  It is *possible* that when I have had a similar number of projects in one workspace before that they haven't shared a database, but I would have thought so.

Posted by Thomas Mercer-Hursh on 24-Apr-2015 11:33

Looking promising ... took me a little while to find the right place to put them in, but it has now started without complaint and the parameters are set.  Now, all I have to do is fix my code ...

Posted by Thomas Mercer-Hursh on 24-Apr-2015 11:50

On the original problem, why did I have to uncheck run as TTY to get the assemblies to be recognized?  I thought batch & AppServer use of .NET was now OK.

Posted by Mike Fechner on 24-Apr-2015 12:18

It is. On OE11

Von meinem Windows Phone gesendet

Von: Thomas Mercer-Hursh
Gesendet: ‎24.‎04.‎2015 18:51
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] Run configurations

Reply by Thomas Mercer-Hursh

On the original problem, why did I have to uncheck run as TTY to get the assemblies to be recognized?  I thought batch & AppServer use of .NET was now OK.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by Thomas Mercer-Hursh on 24-Apr-2015 12:43

So, I am running PSDOE 11.5 ... why should I have to uncheck run as TTY for a batch process that uses .NET?

Posted by Mike Fechner on 24-Apr-2015 14:13

Just tried that. Works fine for me.

 

Posted by Thomas Mercer-Hursh on 24-Apr-2015 14:21

Perhaps I have had multiple interacting issues and I will have to try going back and changing that now that I have the other aspects resolved.

Posted by Mike Fechner on 24-Apr-2015 14:23

You discussed a few issues in this thread – maybe it would help us if you’d share the issue you are currently stuck at?

Posted by Thomas Mercer-Hursh on 24-Apr-2015 14:53

I'm not really stuck on anything at this point, other than working out the bugs in my own code.  If I could go back to TTY, that might be better because the runs are fairly long when the work and that provides me with a visual signal that it is done.

Posted by Thomas Mercer-Hursh on 12-May-2015 10:00

OK, back being stuck.  I have been running with TTY unchecked in both the local and run configuration.  There are some errors in the code base I am compiling ... not the code I am running, but the code base I am compiling for analysis by ABL2DB ... which I thought might derive from TTY vs GUI.  So, I went and checked TTY again in both the project and the run configuration, recompiled all of the project code, and tried a run.  The run errors out with no message on the first line where it tries to invoke one of the Proparse .NET components.

Posted by Peter Judge on 13-May-2015 08:10

What's the question here?
 
Not being flip, but if you have compile errors, fix 'em first. If you have screwy/suspected-bad r-code, delete it firsdt (via OS UI or CLI), and try compiling again.
 
-- peter
 
 
[collapse]
From: Thomas Mercer-Hursh [mailto:bounce-tamhas@community.progress.com]
Sent: Tuesday, 12 May, 2015 11:01
To: TU.OE.Development@community.progress.com
Subject: RE: [Technical Users - OE Development] Run configurations
 
Reply by Thomas Mercer-Hursh

OK, back being stuck.  I have been running with TTY unchecked in both the local and run configuration.  There are some errors in the code base I am compiling ... not the code I am running, but the code base I am compiling for analysis by ABL2DB ... which I thought might derive from TTY vs GUI.  So, I went and checked TTY again in both the project and the run configuration, recompiled all of the project code, and tried a run.  The run errors out with no message on the first line where it tries to invoke one of the Proparse .NET components.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Thomas Mercer-Hursh on 13-May-2015 09:34

Peter, the errors come in the code base I am analyzing, not the code in the project itself.  The code being analyzed is my old (ancient) Integrity/Solutions ERP package.  There is a bunch of crap in it so some errors are expected.  But, I also believe that some of the errors are only there when compiling as GUI.  Given that it is a ChUI application, that is not entirely surprising.  I am pretty sure that at an earlier point I was compiling with Use TTY and a bunch of these errors were not there.  But, this got unclicked during the transition to using Proparse, which I just recently added to the project.  The circumstances of that transition got muddy, so I'm not sure now what the actual problem was, but I got assured that I could go back to Use TTY.  When I noticed these GUI related compile errors, I switched back to Use TTY and now the application terminates on the first reference to a Proparse component.

This thread is closed