2 Replies Latest reply on Nov 21, 2006 3:40 AM by Ashish Arya

    503 Service Temporarily Unavailable

    Carson Zeng Newbie

      Hi all,

      I have some trouble in integrating the JBoss 4.0.2 and the Apache 2.0.54.
      When I run http://MyServerName/jmx-console in browser IE, I get a error information "503 Service Temporarily Unavailable",

      Someone can tell me what is the wrong?
      thank you.

      Regards,
      Carson

      The mod_jk.log record is below.

      21:05:49 2005][info] jk_handler::mod_jk.c (1975): Service error=0 for worker=loadbalancer
      [Wed Jun 29 21:13:33 2005][info] jk_open_socket::jk_connect.c (433): connect to 127.0.0.1:8009 failed with errno=61
      [Wed Jun 29 21:13:33 2005][info] ajp_connect_to_endpoint::jk_ajp_common.c (877): Failed connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
      [Wed Jun 29 21:13:33 2005][info] ajp_send_request::jk_ajp_common.c (1227): Error connecting to the Tomcat process.
      [Wed Jun 29 21:13:33 2005][info] ajp_service::jk_ajp_common.c (1724): Sending request to tomcat failed, recoverable operation attempt=1
      [Wed Jun 29 21:13:34 2005][info] jk_open_socket::jk_connect.c (433): connect to 127.0.0.1:8009 failed with errno=61
      [Wed Jun 29 21:13:34 2005][info] ajp_connect_to_endpoint::jk_ajp_common.c (877): Failed connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
      [Wed Jun 29 21:13:34 2005][info] ajp_send_request::jk_ajp_common.c (1227): Error connecting to the Tomcat process.
      [Wed Jun 29 21:13:34 2005][info] ajp_service::jk_ajp_common.c (1724): Sending request to tomcat failed, recoverable operation attempt=2
      [Wed Jun 29 21:13:35 2005][info] jk_open_socket::jk_connect.c (433): connect to 127.0.0.1:8009 failed with errno=61
      [Wed Jun 29 21:13:35 2005][info] ajp_connect_to_endpoint::jk_ajp_common.c (877): Failed connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
      [Wed Jun 29 21:13:35 2005][info] ajp_send_request::jk_ajp_common.c (1227): Error connecting to the Tomcat process.
      [Wed Jun 29 21:13:35 2005][info] ajp_service::jk_ajp_common.c (1724): Sending request to tomcat failed, recoverable operation attempt=3
      [Wed Jun 29 21:13:35 2005][error] ajp_service::jk_ajp_common.c (1733): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=node1 failed
      [Wed Jun 29 21:13:35 2005][info] service::jk_lb_worker.c (627): service failed, worker node1 is in error state
      [Wed Jun 29 21:13:35 2005][info] service::jk_lb_worker.c (677): All tomcat instances are busy or in error state
      [Wed Jun 29 21:13:35 2005]loadbalancer carson 2.954000

      [Wed Jun 29 21:13:35 2005][info] jk_handler::mod_jk.c (1975): Service error=0 for worker=loadbalancer

      My confige files.

      mod_jk.conf


      # Load mod_jk module
      # Specify the filename of the mod_jk lib
      LoadModule jk_module modules/mod_jk.so

      # Where to find workers.properties
      JkWorkersFile conf.d/workers.properties

      # Where to put jk logs
      JkLogFile logs/mod_jk.log

      # Set the jk log level [debug/error/info]
      # JkLogLevel info
      JkLogLevel debug

      # Select the log format
      JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

      # JkOptions indicates to send SSK KEY SIZE
      JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

      # JkRequestLogFormat
      JkRequestLogFormat "%w %V %T"

      # Add shared memory
      # This directive is present with 1.2.10 and
      # later versions of mod_jk, and is needed for
      # for load balancing to work properly
      JkShmFile /tmp/jk.shm

      # Add jkstatus for managing runtime data
      <Location /jkstatus/>
      JkMount jkstatus
      Order deny,allow
      Deny from all
      Allow from 127.0.0.1


      JkMount /*.jsp loadbalancer
      JkMount /*.jspx loadbalancer
      JkMount /gas* loadbalancer
      JkMount /wap* loadbalancer
      JKMount /jmx-console loadbalancer

      workers.properties


      # Define list of workers that will be used
      # for mapping requests
      worker.list=loadbalancer,status
      # Define Node1
      worker.node1.port=8009
      worker.node1.host=localhost
      worker.node1.type=ajp13
      worker.node1.lbfactor=1
      #worker.node1.local_worker=1 (1)
      worker.node1.cachesize=10

      # Define Node2
      #worker.node2.port=8009
      #worker.node2.host=localhost
      #worker.node2.type=ajp13
      #worker.node2.lbfactor=1
      #worker.node2.local_worker=1 (1)
      #worker.node2.cachesize=10

      # Load-balancing behaviour
      worker.loadbalancer.type=lb
      worker.loadbalancer.balanced_workers=node1
      worker.loadbalancer.sticky_session=1
      worker.loadbalancer.local_worker_only=1
      worker.list=loadbalancer

      # Status worker for managing load balancer
      worker.status.type=status

      #(1) local_worker should be commented out to enable load-balancing. Otherwise, only fail-over is available.

      server.xml

      changed part is below.



      jboss-service.xml

      changed part is below.

      true



        • 1. Re: 503 Service Temporarily Unavailable
          Carson Zeng Newbie

          add some information

          server.xml

          changed part is below.

          Engine name="jboss.web" defaultHost="localhost" jvmRoute="node1"

          jboss-service.xml

          changed part is below.

          attribute name="UseJK">true</attribute


          • 2. Re: 503 Service Temporarily Unavailable
            Ashish Arya Newbie

            Looking at your workers.properties file, it feels as if you are running multiple instances of JBoss on your m/c (vertical clustering)


            If so, then first make sure that the AJP connector in /all/deploy/jbossweb-tomcat50.sar/server.xml of each server is listening at different port. In you workers.properties it seems as if both the servers are listening on the same port.

             <Connector port="8009" address="${jboss.bind.address}"
             emptySessionPath="true" enableLookups="false" redirectPort="8443"
             protocol="AJP/1.3"/>
            


            Second, if you are using windows XP make sure that the windows firewall is disabled.

            Third, it should always be preferred to mention IP address to DNS name of the JBoss server rather than localhost in workers.properties.


            Hope will help you!

            ~Ashish