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

1 Answer 1

0

Try this:

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

Check man nohup for more information.

2
  • If you would do that, you need to read what &> does. Dec 5, 2016 at 6:20
  • Ah, yeah. Must have been tired, sorry.
    – user335605
    Dec 5, 2016 at 9:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .