• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jboss windows service

 
siva Eyme
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am facing a problem with jboss windows service.I am using jboss 4.2.2 GA.I have done it as a windows service.it is working fine.
The problem is ,if we are taking remote desktop using Start->Run->mstsc / console, started Jboss through windows services ,after that I log off the remote connection,suddenly the running jboss has been stopped.I couldn't find the exact reason.If we are using only "mstsc" it is working fine eventhough the server has been logged off.
Please help me,
Thanks in advance.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What tool are you using to start JBoss AS as a service? Be specific (an URL for the tool would be great) because many of the tools have similar names.

Please provide more information on exactly how you are starting JBoss AS when using the Remote Desktop Connection. I often use Remote Desktop to connect to my host running JBoss AS and can start and stop JBoss AS using the "net start/stop" from the command line, or from Services within Administrative Tools.
 
siva Eyme
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,My jboss version is Jboss 4.2.2 GA.I am using Jboss native,followed the link http://www.jboss.org/community/docs/DOC-10679
I have downloaded the jboss native jboss-native-2.0.1-windows-ia64-ssl.Normally I use remote Desktop to connect to my host running jboss.For taking remote Desktop, different ways are there.ie.Start->Run-> enter mstsc in the run Window, or enter mstsc /console in the Run Window.I have used mstsc /console in the Run Window to connect the Remote host running Jboss.Then I started jboss using Services within Administrative Tools.Jboss has been started and running properly.Afterthat I log Off the remote host using Start->Log Off.Then the already running jboss has been stoped.This is the problem I am facing.But if I am using "mstsc" only,the jboss willnot stop.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you saying that when you run "mstsc /console" that JBoss AS stops after you log off the remote system but when you omit the "/console" parameter that JBoss AS does not stop? If so, then stop using the "/console" switch! That switch has disappeared in the latest versions of the Remote Desktop anyway.
 
giorgio bellinger
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm facing the same problem as Siva.
Did you find any solutions?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Other than the solution posted by Peter above?
 
giorgio bellinger
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes .. I mean a different solution.
there are several team and spread responsibilities over them.
I can't control the way how other people access to the OS.
And is is a bit curious as only JBoss crashes not the other services.
Thanks
 
giorgio bellinger
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... several teams ...
...
And it is a bit curious ...

amendments ;-)
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of JBoss AS? How have you created the Windows Service? How do you start the service? Which specific Windows OS?

 
giorgio bellinger
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Windows Server 2003 R2 SP2 Enterprise
RedHat 4.0.5
The service is set up to start automatically at OS start up

_______________

Sevice.bat ...below
_______________

@echo off
REM JBoss, the OpenSource webOS
REM
REM Distributable under LGPL license.
REM See terms of license at gnu.org.
REM
REM -------------------------------------------------------------------------
REM JBoss Service Script for Windows
REM -------------------------------------------------------------------------


@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal
set DIRNAME=%CD%

REM
REM VERSION, VERSION_MAJOR and VERSION_MINOR are populated
REM during the build with ant filter.
REM
set SVCNAME=JBAS40SVC
set SVCDISP=JBoss Application Server 4.0.5
set SVCDESC=JBoss Application Server 4.0.5 GA
set NOPAUSE=Y

REM Figure out the running mode

@if "%1" == "install" goto cmdInstall
@if "%1" == "uninstall" goto cmdUninstall
@if "%1" == "start" goto cmdStart
@if "%1" == "stop" goto cmdStop
@if "%1" == "restart" goto cmdRestart
@if "%1" == "signal" goto cmdSignal
echo Usage: service install^|uninstall^|start^|stop^|restart^|signal
goto cmdEnd

REM jbosssvc retun values
REM ERR_RET_USAGE 1
REM ERR_RET_VERSION 2
REM ERR_RET_INSTALL 3
REM ERR_RET_REMOVE 4
REM ERR_RET_PARAMS 5
REM ERR_RET_MODE 6

:errExplain
@if errorlevel 1 echo Invalid command line parameters
@if errorlevel 2 echo Failed installing %SVCDISP%
@if errorlevel 4 echo Failed removing %SVCDISP%
@if errorlevel 6 echo Unknown service mode for %SVCDISP%
goto cmdEnd

:cmdInstall
jbosssvc.exe -iwdc %SVCNAME% "%DIRNAME%" "%SVCDISP%" "%SVCDESC%" service.bat
@if not errorlevel 0 goto errExplain
echo Service %SVCDISP% installed
goto cmdEnd

:cmdUninstall
jbosssvc.exe -u %SVCNAME%
@if not errorlevel 0 goto errExplain
echo Service %SVCDISP% removed
goto cmdEnd

:cmdStart
REM Executed on service start
call run.bat -c nfusion >run.log
goto cmdEnd

:cmdStop
REM Executed on service stop
call shutdown -S jnp://localhost:1099 >shutdown.log
goto cmdEnd

:cmdRestart
REM Executed on service restart
REM Note. We can only stop and start
call shutdown -S jnp://localhost:1099 >>shutdown.log
call run.bat -c nfusion >>run.log
goto cmdEnd

:cmdSignal
REM Send signal to the service.
REM Requires jbosssch.dll to be loaded in JVM
@if not ""%2"" == """" goto execSignal
echo Missing signal parameter.
echo Usage: service signal [0...9]
goto cmdEnd
:execSignal
jbosssvc.exe -k%2 %SVCNAME%
goto cmdEnd

:cmdEnd
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And which version of JBoss AS? Also, I'm guessing you downloaded the JBoss Native (the project which allows you to create the Windows service) separately. If so, what version of it did you download?
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jaikiran Pai wrote:And which version of JBoss AS?


Oh wait,

giorgio bellinger wrote:
RedHat 4.0.5


I'm sure, you mean JBoss AS 4.0.5 and not RedHat 4.0.5
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Edit the JAVA_OPTS section in your run.bat file to add -Xrs JVM argument. See if that helps.
 
giorgio bellinger
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
;-)
yes, you are right
I was calling the redhat support...sorry for the mistake
I'll try your suggestion and come back wih the result
in the meantime thanks
 
giorgio bellinger
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
:-(
currently this is the value of JAVA_OPTS

set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m

plus something else ...
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
giorgio bellinger wrote:
currently this is the value of JAVA_OPTS

set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m




Just append -Xrs to that line. I'm still trying to find the JIRA where this was identified as an issue and fixed. I'm not yet fully sure whether adding that param is going to fix this issue, I remember there was something else too.

Can you answer my other question:
I'm guessing you downloaded the JBoss Native (the project which allows you to create the Windows service) separately. If so, what version of it did you download?

 
giorgio bellinger
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wrong parameter Xms is not Xrs
apoligize
 
giorgio bellinger
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JBOSS Native 2.0.3 win32 package: jboss-native-2.0.3-windows-i686-ssl.zip
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
giorgio bellinger wrote:JBOSS Native 2.0.3 win32 package: jboss-native-2.0.3-windows-i686-ssl.zip


https://jira.jboss.org/browse/JBNATIVE-58
 
giorgio bellinger
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
great :-)
many thanks

I'l try both the solutions and send back the result...

thanks again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic