Search code examples
glassfishglassfish-3

What might cause glassfish asadmin.bat start-domain 3.1.1 to exit with code 143?


I am running glassfish as a windows service created by the asadmin create-service command (where it starts with a command something like):

c:/xyz/glassfish/bin/asadmin.bat start-domain --verbose --domaindir C:\\xyz\\glassfish\\domains myDomain 

I started the server then left it running with no further activities (no clients connecting to it, no scheduled task, etc).

After approximately 5hours 30mins it terminated with code 143.

Anyone know what might cause such behaviour?


Solution

  • 143 means the process was killed (SIGTERM).

    You probably logged out.

    Add this to the java line at the end of asadmin.bat

    -Xrs

    e.g.

    %JAVA% -Xrs -jar "%~dp0..\modules\admin-cli.jar" %*

    It's also a good idea to add "-Xrs" to the server. Go to the bin directory of your domain, edit the xml file (it's obvious what to do) and then

    myDomainService stop 
    myDomainService uninstall 
    myDomainService install
    myDomainService start