Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-3663

"stop" option to jboss_init_redhat.sh shipped with EAP 5.0 does not work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • TBD EAP 5
    • EAP 5.0.0
    • Scripts and Commands
    • None
    • RHEL

    • Hide
      CAUSE

      CONSEQUENCE

      FIX

      RESULT
      Show
      CAUSE CONSEQUENCE FIX RESULT
    • Not Required

    Description

      The method for stopping JBoss through the jboss_init_redhat.sh command has changed for 5.0; in 4.3, the script does a process grep and then sends a kill 15 to the pid. In 5.0, the method has changed to:

      JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"java -classpath $JBOSSCP org.jboss.Shutdown --shutdown"}

      Results of two test cases:

      1. Using the init script without the optional JBOSS_HOST option added, start the server with "/etc/init.d/jboss_init_redhat.sh start". This will work, and the server will bind to localhost and start correctly.

      Wait for the server to finish starting, and then run "/etc/init.d/jboss_init_redhat.sh stop". The following exception will be thrown:

      JBOSS_CMD_START = cd /opt/jboss/jboss-eap-5.0/jboss-as/bin; /opt/jboss/jboss-eap-5.0/jboss-as/bin/run.sh -c production
      Exception in thread "main" java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=jmx-console
      at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:88)

      2. Using the init script with the optional JBOSS_HOST option added, start the server with "/etc/init.d/jboss_init_redhat.sh start". This will work, and the server will bind to $JBOSS_HOST and start correctly.

      Wait for the server to finish starting, and then run "/etc/init.d/jboss_init_redhat.sh stop". The following exception will be thrown:

      JBOSS_CMD_START = cd /opt/jboss/jboss-eap-5.0/jboss-as/bin; /opt/jboss/jboss-eap-5.0/jboss-as/bin/run.sh -c production -b <$JBOSS_HOST>
      Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused]]]

      I can (very dirtily) hack around this by changing the "JBOSS_CMD_STOP...." line and adding the -s, -u, and -p commands, eg.:

      JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"java -classpath $JBOSSCP org.jboss.Shutdown --shutdown -s jnp://$JBOSS_HOST:1099 -u <user> -p <password>"

      However, this seems like a sub-optimal solution.

      Attachments

        Activity

          People

            permaine Permaine Cheung
            mburchar Mark Burchard (Inactive)
            Eva Kopalova Eva Kopalova (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: