2 Replies Latest reply on Jan 11, 2013 4:00 AM by Juan A. S.

    Cannot run Init script for JBoss7 domain mode on CentOS

    Juan A. S. Newbie

      I am trying to configure JBoss7 init script to run it automatically at startup and control it using init scripts. I have taken the supplied init script from the GitHub repository for the domain mode (link). The problem is that that script only works in the startup of the machine, but when I use it manually from the console, JBoss doesn't start. I can run this command without problems:

       

      /opt/jboss-as-7.1.0.Final/bin/domain.sh --domain-config=domain.xml --host-config=host.xml
      

       

      This one apparently works:

       

      /etc/init.d/jboss start
      

       

      But in the console LOG file this appears:

       

      19:54:45,686 INFO [org.jboss.modules] (main) JBoss Modules version 1.1.1.GA
      19:54:45,832 INFO [org.jboss.as.process.Host Controller.status] (main) JBAS012017: Starting process 'Host Controller'
      19:54:45,835 ERROR [org.jboss.as.process.Host Controller.status] (main) JBAS012008: Failed to start process 'Host Controller'
      19:55:30,143 INFO [org.jboss.as.process] (Shutdown thread) JBAS012016: Shutting down process controller
      19:55:30,152 INFO [org.jboss.as.process] (Shutdown thread) JBAS012015: All processes finished; exiting
      

       

      If I run the script that the init script actually runs (after loading /etc/init.d/functions):

       

      daemon --user jboss LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=/var/run/jboss-as/jboss-as-domain.pid /opt/jboss-as-7.1.0.Final/bin/domain.sh --domain-config=domain.xml --host-config=host.xml
      

       

      I get the same error and JBoss doesn't start completely. Anyone knows what can be the reason? Is there any difference between running the script manually and using the daemon function?

       

      Using JBoss 7.1.0, Centos 6.3 i386, Sun jdk1.7.0_09.