-
15. Re: JBoss AS 7 as a Windows Service
logan.stinger Oct 6, 2011 12:49 PM (in response to sebastian.koske)I downloaded the bundle and used the service.bat file you provided but get the following error when trying to install the service:
[427 prunsrv.c] [error] The operation completed successfully
[1336 prunsrv.c] [error] Load configuration failed
Service JBoss Application Server 7.0 installed
If I change your batch file to use jbosssvc.exe rather than jbossweb.x64.exe then the service is installed and starts up just fine however after a minute or two I always get an out of memory error. If I just start the server by manually calling standalone.bat then the server runs great and never gets an out of memory error. Any idea why jbossweb.x64.exe doesn't work, or why running it as a service results in out of memory errors while running it manually does not?
-
16. Re: JBoss AS 7 as a Windows Service
luc_h Oct 24, 2011 7:42 AM (in response to ortizfabio)Hi,
I changed line 84 in service.bat (the call to shutdown) to this :
call jboss-admin.bat --connect command=:shutdown >> shutdown.log 2>&1
This enables the application server to shut down cleanly but will only work if the native management interface is not secured.
It's best to do the same with line 94 (restart service).
There is no more shutdown.bat file, that is probably the reason the system shuts down.
Grtz
-
17. Re: JBoss AS 7 as a Windows Service
luc_h Oct 24, 2011 9:45 AM (in response to luc_h)It turns out that stopping the service does not always work the way it should (it hangs and eventually fails but the application server is stopped nevertheless), so there is still something wrong in my change to service.bat.
grtz
-
18. Re: JBoss AS 7 as a Windows Service
nickarls Oct 24, 2011 3:04 PM (in response to logan.stinger)Check your run.log for what the true JAVA_OPTS are. service.bat calls standalone.conf.bat but then overwrites stuff with JAVA_OPTS=-Xrs, defaulting the memory settings.
-
19. Re: JBoss AS 7 as a Windows Service
montia Aug 9, 2012 12:38 PM (in response to sebastian.koske)Thank you for your post. I noticed that the second instance of the shutdown line is not commented out in the restart section of your attached service.bat file (just something for others to be aware of):
call shutdown -S < .s.lock >> shutdown.log 2>&1
Both instances of this line are still present in the service.bat file included in the jboss-native-2.0.10-windows-x64-ssl.zip available from:
http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-10.html
Also, the following post was very helpful in setting up JBoss 7.1.1 as a service on a Windows x64 platform:
https://community.jboss.org/message/724488
Thanks,
Monica
-
20. Re: JBoss AS 7 as a Windows Service
ohmygod Aug 6, 2012 10:38 PM (in response to ortizfabio)What about version 7.1.1.Final? service.bat is not there any more. Anybody ever tried this in 7.1.1 version?
-
21. Re: JBoss AS 7 as a Windows Service
nickarls Aug 8, 2012 5:58 AM (in response to ohmygod)service.bat was bundles with AS6 but for AS7 you need to extract the native connectors into the bin folder.
-
22. Re: JBoss AS 7 as a Windows Service
ohmygod Aug 8, 2012 6:21 AM (in response to nickarls)Thanks Nicklas, but can you explain a little more clear - what do you mean by extracting the native connectors into the bin folder?
-
23. Re: JBoss AS 7 as a Windows Service
nickarls Aug 8, 2012 6:23 AM (in response to ohmygod)Download appriopriate binaries from http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-10
You will see it contains a bin folder which means if you extract the zip in the <JBOSS_HOME> directory, service.bat will be placed (correctly) in the bin folder.
-
24. Re: JBoss AS 7 as a Windows Service
ohmygod Aug 8, 2012 6:26 AM (in response to nickarls)One thing to confirm before continuing this: can different windosw OS apply the same setting to make the service run? for example windows XP or windows 7?
-
25. Re: JBoss AS 7 as a Windows Service
nickarls Aug 8, 2012 6:35 AM (in response to ohmygod)Should (tm) work with all windowses (make sure the 32/64bit version of the connector is correct, though)
-
26. Re: JBoss AS 7 as a Windows Service
montia Aug 9, 2012 12:37 PM (in response to ohmygod)Hi Mike,
Yes, I have set this up with JBoss 7.1.1.Final and it works. Take a look at https://community.jboss.org/message/724488. It has great step-by-step instructions. As for the Windows version, you just need to make sure that you download either the 32-bit or 64-bit version of the connector to match your OS, as Nicklas pointed out.
Best,
Monica
-
27. Re: JBoss AS 7 as a Windows Service
canotech Aug 10, 2012 8:36 AM (in response to montia)I was able to get this running using java service wrapper from Tanuki Software. I described the process here: http://canotech.wordpress.com/2012/08/10/running-jboss7-in-service-mode-using-java-service-wrapper/