Jade Web App as service

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Jade Web App as service

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:56 pm

by Jonathan >> Mon, 19 Dec 2005 1:38:28 GMT

We have a situation that we seem to have hit a blank wall with, any ideas on how to progress will be most welcome.

The situation is as follows: We have a web enabled application which we want to run as a service.

The Web App can be started from a link and the user can log in via a browser. The Web App can be stopped from the Web App Manger (if GUI) or through the JADE Monitor (if non GUI) restarted through the link and the user can log in via the browser again - no problems. This part of the equation works fine.

Now for the (non JADE) user defined service. Referencing Microsoft a User Defined Service can be created using the Instrsrv.exe & Srvany.exe executables available from the resource kit. Indeed the Web App can be set up to run as a service in this way and as a service it can be started and stopped - no issues in this regard.

The issue arises when the Web App is run a as a service and the service is stopped and restarted (using the Microsoft "service") Upon restarting when the user tries to log in via the browser they get the "Service Unavailable" error. In order for them to log in successfully to the Web App (running as a service) the jadrap needs to be stopped and restarted and also the Web App (using the Microsoft "service") needs to be retarted then the user can log in via the browser with no problems, but if the Web App (using the Microsoft "service") is stopped and restarted again (without the jadrap being reset) "Service Unavailable" error is returned.

Any ideas as to what the issue here is or an alternative to using the Instrsrv.exe & Srvany.exe to run the user defined service?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Jade Web App as service

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:56 pm

by allistar >> Mon, 19 Dec 2005 4:46:02 GMT

Is there an exception in the jommsg.log file? Maybe the open port is not being closed when the service is stopped, and when restarted it can't be bound to again.

Just an idea,
Allistar.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Jade Web App as service

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:56 pm

by jonathan >> Mon, 19 Dec 2005 21:44:53 GMT

We have done testing rekating to the possibility of the ports being held (Results attached) but this does not appear to be the problem.
Attachments
4348.txt
(3.75 KiB) Downloaded 77 times
Last edited by ConvertFromOldNGs on Fri Aug 07, 2009 4:14 pm, edited 1 time in total.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Jade Web App as service

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:56 pm

by Alan >> Tue, 20 Dec 2005 2:17:37 GMT

Jonathan, I have often had this type of problem (whether running as service or not). I found that I will regularly need to send 3 request to the Web Application before is starts working correctly after it has been initiated. The only solution I can think of for this would be to have the application "call itself" 3 times automatically after starting.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Jade Web App as service

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:56 pm

by jonathan >> Tue, 20 Dec 2005 3:29:47 GMT

Thanks for the feedback Allan, unfortunately this not the behaviour in this case.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Jade Web App as service

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:56 pm

by Alan >> Wed, 21 Dec 2005 23:54:58 GMT

Jonathan, was able to reproduce your fault.

To correct it I terminated the applications running in the service first.

I believe that the service shutdown does not close down the applications "cleanly" and therefore the TCP connections into the application are actually still "held" and not available when the application is restarted.

FYI, I actually start and stop the service within another application running on the database and am therefore able to control termination of the applications running under the service as well.

Obviously the ideal would be to have a "clean" shutdown when the service is stopped (using the Microsoft "service").

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Jade Web App as service

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:56 pm

by Jonathan >> Tue, 17 Jan 2006 3:58:19 GMT

Hi Alan,

We wrote a small app that called the Process Sign Off User, however when the web app was once again started the issue of not being able to log in via the browser was still present.

This is the code we called:

vars
nodeTD : Node;
processTD : Process;
begin
foreach nodeTD in system.nodes discreteLock do
foreach processTD in nodeTD.processes discreteLock
where processTD.adminInfo = Application_Web do system.forceOffUser(processTD.node, processTD);
endforeach;
endforeach;
epilog
terminate;
end;

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Jade Web App as service

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:56 pm

by Alan >> Wed, 18 Jan 2006 8:07:55 GMT

Jonathan,

When I start an application I register for a "shutdown" request against the Process. In your case the Shut Down App would issue a "shutdown" cause event to each necessary processTD. The user notifaction in the Process would do a terminate - which shuts the app down cleanly.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 38 guests