We are using a state-free appserver and after a successful CONNECT the CONNECTED always returns a TRUE even if you shutdown the appserver or disconnect from the LAN. The CONNECTED will only return FALSE once a call is made to the Appserver that fails because the client is no longer connected.
According to the docs this is probably working correctly but I am wondering if there is a way to force a check of the connection almost like a ping without having to call a procedure on the appserver and have it fail.
From the docs;
For a state-reset, state-aware, or stateless AppServer, this method returns TRUE if the AppServer is currently connected and associated with the server handle. For a state-free AppServer, this method returns TRUE if the CONNECT( ) method has been successfully executed for an application service associated with this handle and at least one AppServer resource is available for the client to access this application service.
Other than actually trying to communicate with the AppServer I don't know how Progress would know.. regardless of operating mode.
You can always trap the errors when running a procedure to see if you are connected or not. Then either raise an error or attempt to reconnect.
There is a feature called AppServer KeepAlive which I believe was intended for this purpose.
I might be wrong (would not be the first time) but my understanding is that KeepAlive is for the Appserver to know if the client is still connected and not for the client to know if the appserver is still available.
We are using allowClientASK,allowServerASK on the appserver setup side and when connecting to the appserver we are using;
-AppServerKeepalive allowServerASK
This seems to make no difference from what I can tell. If I change from state-free to stateless the CONNECTED seems to know the appserver is disconnected before I make a call to the appserver.
"I might be wrong (would not be the first time) but my understanding is that KeepAlive is for the Appserver to know if the client is still connected and not for the client to know if the appserver is still available"
That is how it seems the be working.
Interesting that it seems to work with stateless.
You probably want to provide your OE version and patch level and check the appserver logs to make sure the ASK is really being honored. Probably post some examples from the logs for stateless vs state-free too.
Also anything different about your environment like SSL/AIA or compression being turned on.
I might be getting ahead of reality here. I think I had seen plans for it, or maybe just an idea to do it, so I (naively) assumed it had been implemented.
Searching the doc (11.3):
documentation.progress.com/.../wwhelp.htm
It only discusses a .NET client.
>Interesting that it seems to work with stateless.
>You probably want to provide your OE version and patch level and check the appserver logs to make sure the ASK is really being honored. Probably post some examples from the logs for stateless vs state-free too.
>Also anything different about your environment like SSL/AIA or compression being turned on.
It is version 11.4 no patches and we are not using SSL/AIA.
We will continue to test and post log samples as well.
Thank You.
>Interesting that it seems to work with stateless.
>You probably want to provide your OE version and patch level and check the appserver logs to make sure the ASK is really being honored. Probably post some examples from the logs for stateless vs state-free too.
>Also anything different about your environment like SSL/AIA or compression being turned on.
The logs appear to be the same whether stateless or statefree. When the appserver is shutdown using stateless the hAppserver:CONNECTED returns FALSE immediately…interesting
Statefree appserver log
[15/07/10@09:45:37.679-0400] P-005908 T-Main 1 --- --- C:\OpenEdge\WRK\UnifyPOS.broker.000001.log opened.
[15/07/10@09:45:37.679-0400] P-005908 T-Main 1 --- --- Logging level set to = 2
[15/07/10@09:45:37.679-0400] P-005908 T-Main 1 --- --- Log entry types activated: UBroker.Basic,
[15/07/10@09:45:37.689-0400] P-005908 T-Main 2 UB Basic ubroker version: v11.4.0 (21-Mar-2014) (8038)
[15/07/10@09:45:37.755-0400] P-005908 T-L-3092 2 UB Basic Started listener thread: L-3092 (8043)
[15/07/10@09:45:37.800-0400] P-005908 T-L-3092 2 UB Basic Starting 2 server threads ... (8053)
[15/07/10@09:45:37.812-0400] P-005908 T-S-0001 2 UB Basic Started server thread: S-0001. (8101)
[15/07/10@09:45:37.913-0400] P-005908 T-S-0002 2 UB Basic Started server thread: S-0002. (8101)
[15/07/10@09:45:38.030-0400] P-005908 T-S-0001 2 UB Basic Started server: "C:\Progress\OpenEdge\bin\_proapsv.exe" -logginglevel 2 -logfile "C:\OpenEdge\WRK\UnifyPOS.server.000001.log" -ubpid 5908 -Ms 1 -logname UnifyPOS -logentrytypes ASPlumbing,DB.Connects -logthreshold 50000000 -numlogfiles 5 -ASID 1 -ubpropfile "C:\Progress\OpenEdge\properties\ubroker.properties" -ipver IPv4 -pf appserverstart.pf (8108)
[15/07/10@09:45:38.121-0400] P-005908 T-S-0002 2 UB Basic Started server: "C:\Progress\OpenEdge\bin\_proapsv.exe" -logginglevel 2 -logfile "C:\OpenEdge\WRK\UnifyPOS.server.000001.log" -ubpid 5908 -Ms 1 -logname UnifyPOS -logentrytypes ASPlumbing,DB.Connects -logthreshold 50000000 -numlogfiles 5 -ASID 2 -ubpropfile "C:\Progress\OpenEdge\properties\ubroker.properties" -ipver IPv4 -pf appserverstart.pf (8108)
[15/07/10@09:45:38.805-0400] P-005908 T-S-0001 2 UB Basic Server Port = 2006 PID = 5764. (8114)
[15/07/10@09:45:38.852-0400] P-005908 T-S-0002 2 UB Basic Server Port = 2007 PID = 6092. (8114)
[15/07/10@09:45:38.864-0400] P-005908 T-NameServer 2 UB Basic Broker registered with NameServer. (8556)
[15/07/10@09:45:52.068-0400] P-005908 T-C-0001 2 UB Basic ConnectionID= 192.168.168.251::UnifyPOS::3092::3b4ef45982db25c0:-29e7edd0:14e7836d63c:-7fe7. (8096)
[15/07/10@09:45:52.069-0400] P-005908 T-C-0001 2 UB Basic Client connected : 192.168.168.75. (8533)
[15/07/10@09:45:52.071-0400] P-005908 T-C-0001 2 UB Basic The client requested ASK version= 1.0 capabilities= allowServerASK,denyClientASK. (13769)
[15/07/10@09:45:52.072-0400] P-005908 T-C-0001 2 UB Basic The negotiated ASK version= 1.0 capabilities= allowServerASK,denyClientASK. ASK protocol is enabled for this connection. (13772)
[15/07/10@09:48:01.990-0400] P-005908 T-L-3092 2 UB Basic Processing shutdown request ... (8049)
[15/07/10@09:48:02.956-0400] P-005908 T-L-3092 2 UB Basic Shutdown requested: S-0001 ... (8051)
[15/07/10@09:48:02.956-0400] P-005908 T-C-0001 2 UB Basic Client disconnected : 192.168.168.75. (8534)
[15/07/10@09:48:02.957-0400] P-005908 T-L-3092 2 UB Basic Shutdown requested: S-0002 ... (8051)
[15/07/10@09:48:03.962-0400] P-005908 T-Main 2 UB Basic ubroker v11.4.0 (21-Mar-2014) done. (8041)
[15/07/10@09:48:03.962-0400] P-005908 T-Main 1 --- --- Log Closed
Stateless log
======================================================================
[15/07/10@09:49:31.842-0400] P-000308 T-Main 1 --- --- C:\OpenEdge\WRK\UnifyPOS.broker.000001.log opened.
[15/07/10@09:49:31.842-0400] P-000308 T-Main 1 --- --- Logging level set to = 2
[15/07/10@09:49:31.842-0400] P-000308 T-Main 1 --- --- Log entry types activated: UBroker.Basic,
[15/07/10@09:49:31.853-0400] P-000308 T-Main 2 UB Basic ubroker version: v11.4.0 (21-Mar-2014) (8038)
[15/07/10@09:49:31.881-0400] P-000308 T-L-3092 2 UB Basic Started listener thread: L-3092 (8043)
[15/07/10@09:49:31.923-0400] P-000308 T-L-3092 2 UB Basic Starting 2 server threads ... (8053)
[15/07/10@09:49:31.931-0400] P-000308 T-S-0001 2 UB Basic Started server thread: S-0001. (8101)
[15/07/10@09:49:32.032-0400] P-000308 T-S-0002 2 UB Basic Started server thread: S-0002. (8101)
[15/07/10@09:49:32.146-0400] P-000308 T-S-0001 2 UB Basic Started server: "C:\Progress\OpenEdge\bin\_proapsv.exe" -logginglevel 2 -logfile "C:\OpenEdge\WRK\UnifyPOS.server.000001.log" -ubpid 308 -Ms 1 -logname UnifyPOS -logentrytypes ASPlumbing,DB.Connects -logthreshold 50000000 -numlogfiles 5 -ASID 1 -ubpropfile "C:\Progress\OpenEdge\properties\ubroker.properties" -ipver IPv4 -pf appserverstart.pf (8108)
[15/07/10@09:49:32.238-0400] P-000308 T-S-0002 2 UB Basic Started server: "C:\Progress\OpenEdge\bin\_proapsv.exe" -logginglevel 2 -logfile "C:\OpenEdge\WRK\UnifyPOS.server.000001.log" -ubpid 308 -Ms 1 -logname UnifyPOS -logentrytypes ASPlumbing,DB.Connects -logthreshold 50000000 -numlogfiles 5 -ASID 2 -ubpropfile "C:\Progress\OpenEdge\properties\ubroker.properties" -ipver IPv4 -pf appserverstart.pf (8108)
[15/07/10@09:49:32.813-0400] P-000308 T-S-0001 2 UB Basic Server Port = 2006 PID = 4824. (8114)
[15/07/10@09:49:32.875-0400] P-000308 T-S-0002 2 UB Basic Server Port = 2007 PID = 4844. (8114)
[15/07/10@09:49:32.886-0400] P-000308 T-NameServer 2 UB Basic Broker registered with NameServer. (8556)
[15/07/10@09:49:41.278-0400] P-000308 T-C-0001 2 UB Basic ConnectionID= 192.168.168.251::UnifyPOS::3092::68cdcd4bc264aa3c:792ea871:14e783a6915:-7ff5. (8096)
[15/07/10@09:49:41.279-0400] P-000308 T-C-0001 2 UB Basic Client connected : 192.168.168.75. (8533)
[15/07/10@09:49:41.281-0400] P-000308 T-C-0001 2 UB Basic The client requested ASK version= 1.0 capabilities= allowServerASK,denyClientASK. (13769)
[15/07/10@09:49:41.281-0400] P-000308 T-C-0001 2 UB Basic The negotiated ASK version= 1.0 capabilities= allowServerASK,denyClientASK. ASK protocol is enabled for this connection. (13772)
[15/07/10@09:50:39.762-0400] P-000308 T-L-3092 2 UB Basic Processing shutdown request ... (8049)
[15/07/10@09:50:41.205-0400] P-000308 T-C-0001 2 UB Basic Client disconnected : 192.168.168.75. (8534)
[15/07/10@09:50:41.206-0400] P-000308 T-L-3092 2 UB Basic Shutdown requested: S-0001 ... (8051)
[15/07/10@09:50:41.206-0400] P-000308 T-L-3092 2 UB Basic Shutdown requested: S-0002 ... (8051)
[15/07/10@09:50:42.211-0400] P-000308 T-Main 2 UB Basic ubroker v11.4.0 (21-Mar-2014) done. (8041)