Servoy App Server as a Windows Service

Questions and answers for all installation-related topics for Servoy products

Servoy App Server as a Windows Service

Postby erikd » Mon May 28, 2012 5:14 am

Hi ,

I am trying to install the Servoy application server as a Windows Service on my machine with specifications as follows:
Core i-5 64 bit 4gb Windows 7

After setting up the database and application server using IzPack, I tried running the application through servoy_server.bat. The application ran well without any errors.

To install the Application as a service, I updated the wrapper.conf and called the following batch files: install_service.bat and start_service.bat.

I saw the newly created service in the Windows Service console, which calls "<path_to_server>service\wrapper.exe" -s "<path_to_server>service\wrapper.conf".

When I tried to start it, it threw an error, "Error 1053: The service did not respond to the start or control request in a timely fashion."

When I checked the logs it says:
ERROR | wrapper | 2012/05/28 13:06:05 | Unable to expand "Path": A device attached to the system is not functioning. (0x1f)

When I ran the wrapper.exe itself without the parameter -s, it worked fine.

Did I miss out a step?

Any input is highly appreciated.
erikd
 
Posts: 445
Joined: Wed Aug 11, 2010 2:32 am

Re: Servoy App Server as a Windows Service

Postby Andrei Costescu » Mon May 28, 2012 10:21 am

What Servoy version did you use?

erikd wrote:When I ran the wrapper.exe itself without the parameter -s, it worked fine.

What do you mean by "it worked fine"? Do you mean that it printed out to the console the arguments that it can receive or?
Did you have the DB server started before starting the service? What did you change in wrapper.conf?
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Servoy App Server as a Windows Service

Postby erikd » Tue May 29, 2012 1:03 am

Thanks for the reply.

The database server is already running as a service and has no problems.

I am having problems running the application server as a service. If I run the application server through servoy_server.bat, it runs well and I am able to access the http://localhost:8080/servoy-admin page. But if I use the wrapper to create a service, it throws the error.

I have used the following commands to create a service. I placed it inside the install_service.bat and start_service.bat.
CD <path to app server>\service
Wrapper.exe -r wrapper.conf
Wrapper.exe -i wrapper.conf
Wrapper.exe -t wrapper.conf

The wrapper.conf has the following contents:
wrapper.java.command=java
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.app.parameter.1=com.servoy.j2db.server.main.ApplicationServer
wrapper.license.type=DEV
wrapper.license.id=201103010028
wrapper.license.licensee=Servoy
wrapper.license.dev_application=ServoyApplicationServer
wrapper.license.features=64bit
wrapper.license.upgrade_term.begin_date=2009-07-08
wrapper.license.upgrade_term.end_date=2011-09-08
wrapper.license.key.1=6936-b046-cf17-5bf8
wrapper.license.key.2=0236-ed3b-2800-3baf
wrapper.license.key.3=a14e-c096-2728-f111
wrapper.license.key.4=af75-f9e2-fa85-d637
wrapper.java.classpath.1=.
wrapper.java.classpath.2=service\wrapper.jar
wrapper.java.classpath.3=lib\activation.jar
wrapper.java.classpath.4=lib\antlr.jar
wrapper.java.classpath.5=lib\apache-mime4j.jar
wrapper.java.classpath.6=lib\BrowserLauncher2.jar
wrapper.java.classpath.7=lib\commons-codec.jar
wrapper.java.classpath.8=lib\commons-collections.jar
wrapper.java.classpath.9=lib\commons-dbcp.jar
wrapper.java.classpath.10=lib\commons-fileupload.jar
wrapper.java.classpath.11=lib\commons-io.jar
wrapper.java.classpath.12=lib\commons-logging.jar
wrapper.java.classpath.13=lib\commons-pool.jar
wrapper.java.classpath.14=lib\dom4j.jar
wrapper.java.classpath.15=lib\hibernate3.jar
wrapper.java.classpath.16=lib\httpclient.jar
wrapper.java.classpath.17=lib\httpclient-cache.jar
wrapper.java.classpath.18=lib\httpcore.jar
wrapper.java.classpath.19=lib\httpmime.jar
wrapper.java.classpath.20=lib\j2db.jar
wrapper.java.classpath.21=lib\j2dbdev.jar
wrapper.java.classpath.22=lib\jabsorb.jar
wrapper.java.classpath.23=lib\javassist.jar
wrapper.java.classpath.24=lib\jcifs.jar
wrapper.java.classpath.25=lib\joda-time.jar
wrapper.java.classpath.26=lib\js.jar
wrapper.java.classpath.27=lib\jta.jar
wrapper.java.classpath.28=lib\jug.jar
wrapper.java.classpath.29=lib\log4j.jar
wrapper.java.classpath.30=lib\mail.jar
wrapper.java.classpath.31=lib\MRJAdapter.jar
wrapper.java.classpath.32=lib\networktnl.jar
wrapper.java.classpath.33=lib\rmitnl.jar
wrapper.java.classpath.34=lib\server-bootstrap.jar
wrapper.java.classpath.35=lib\servlet-api.jar
wrapper.java.classpath.36=lib\slf4j-api.jar
wrapper.java.classpath.37=lib\slf4j-log4j.jar
wrapper.java.classpath.38=lib\wicket.jar
wrapper.java.classpath.39=lib\wicket-calendar.jar
wrapper.java.classpath.40=lib\wicket-extentions.jar
wrapper.java.library.path.1=<path to app server>\service
wrapper.java.additional.auto_bits=TRUE
wrapper.java.additional.1=-Djava.awt.headless=true
wrapper.java.additional.2=-Duser.dir="<path to app server>"
wrapper.java.additional.3=-Djava.io.tmpdir="<path to app server>\server\work"
wrapper.java.additional.4=-XX:MaxPermSize=128m
wrapper.java.initmemory=32
wrapper.java.maxmemory=1280
wrapper.port=1777
wrapper.on_exit.default=RESTART
wrapper.on_exit.0=SHUTDOWN
wrapper.jvm_exit.timeout=60
wrapper.console.format=PM
wrapper.console.loglevel=INFO
wrapper.logfile=..\.service_log.txt
wrapper.logfile.format=LPTM
wrapper.logfile.loglevel=INFO
wrapper.logfile.maxsize=30m
wrapper.logfile.maxfiles=0
wrapper.syslog.loglevel=FATAL
wrapper.ntservice.name=applicationserver
wrapper.ntservice.displayname=applicationserver
wrapper.ntservice.description=Application Server
wrapper.ntservice.dependency.1=
wrapper.ntservice.starttype=AUTO_START
wrapper.ntservice.process_priority=NORMAL
wrapper.ntservice.interactive=false
wrapper.filter.trigger.1=java.lang.OutOfMemoryError
wrapper.filter.action.1=RESTART

Do I need to change other config files as well?

[Edit] I am currently using Servoy 6.0.5 -build 1230.
erikd
 
Posts: 445
Joined: Wed Aug 11, 2010 2:32 am

Re: Servoy App Server as a Windows Service

Postby Andrei Costescu » Tue May 29, 2012 12:41 pm

It should work (considering that all the "<path to ...>" are correct :) ). The error message suggests it's not able to find a .dll - which one, that I can't tell.

Maybe it's linked to what the system PATH variable lists.
(it works for me on a similar configuration)
Last edited by Andrei Costescu on Tue May 29, 2012 2:00 pm, edited 1 time in total.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Servoy App Server as a Windows Service

Postby Andrei Costescu » Tue May 29, 2012 1:05 pm

Maybe the PATH variable is corrupt in some way? (invalid chars or contains some pattern that is not handled correctly)
Another reason I can think of is a problem accessing the Windows system registry. As I understand it, the wrapper uses the system registry to get the value of environment variables.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Servoy App Server as a Windows Service

Postby erikd » Wed May 30, 2012 12:42 am

Hi Andrei,

Thanks so much for the help! You are right, the problem was in the PATH variable. It had this value, "%PATH%". When I removed it and restarted the service it threw "ERROR | wrapper | 2012/05/30 08:35:21 | Unable to expand "CLASSPATH": A device attached to the system is not functioning. (0x1f)." I checked the CLASSPATH environment variables and saw this value %CLASSPATH%. I removed it and restarted the service.

It's now working without errors.

Thanks Andrei for the help!
erikd
 
Posts: 445
Joined: Wed Aug 11, 2010 2:32 am

Re: Servoy App Server as a Windows Service

Postby Andrei Costescu » Wed May 30, 2012 12:06 pm

You are welcome! :wink: .
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm


Return to Installation

Who is online

Users browsing this forum: No registered users and 3 guests