3

I'm using jboss-as-standalone.sh to manage JBoss EAP standalone as a service. I can start/stop the service with "service jboss-as-standalone.sh start/stop" while I'm on a terminal.

But I would like to start JBoss from outside the server via SSH using our Continuous Deployment Infrastructure. Therefore I'm issueing a command like this:

ssh root@myserver "service jboss-as-standalone.sh start"

The server starts up normally but SSH hangs. It seems it isn't able to close the connection because of the background job forked by this command in the script:

daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE SERVER_HOME=$SERVER_HOME $JBOSS_SCRIPT -c $JBOSS_CONFIG 2>&1 > $JBOSS_CONSOLE_LOG &

Is there any other possibility to start JBoss as a service which works with notty SSH connections as well?

Best regards

Jan

0

Try this:

 nohup service jboss-as-standalone.sh start &>/dev/null

Check man nohup for more information.

| improve this answer | |
  • If you would do that, you need to read what &> does. – Florin Asăvoaie Dec 5 '16 at 6:20
  • Ah, yeah. Must have been tired, sorry. – user335605 Dec 5 '16 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.