3 Replies Latest reply on Apr 18, 2007 11:23 AM by gzoller

    503 Service Temporarily Unavailable - JBoss 4.0.3RC1, Apache

    philc_jboss

      Ok, before I begin, I have searched many issues in this forum. I found one posting with the same issue but the reply suggestion did not fix my issue (I already had the configuration solution suggested).

      Following the JBoss Mod_jk Wiki (current version), I get 503 Service Temporarlily Unavailable when I try to access ../web-console or ../jmx-console

      Please, Please, Please if anyone has suggestions, I am going nuts.
      If I try xxx:8080/web-console and xxx.com:8080/jmx-console I get the proper display. It was my understanding that if I hit xxx.com/web-console (port 80), apache would forward the request to JBoss/Tomcat. However my head is telling me that xxx.com/web-console and xxx.com/jmx-console context is not defined properly (configuration error - apache is looking to handle these requests).

      I have triple checked the configurations and ports without luck, all looks as the wiki lists.

      Environment: Linux (CentOS 4), Apache 2.0.54 (compiled from source), mod_jk 2.1.14 (compiled from source), JBoss 4.0.3RC1

      My mod_jk.log file prints:

      [Mon Aug 15 20:11:54 2005][error] service::jk_lb_worker.c (703): All tomcat instances failed, no more workers left
      [Mon Aug 15 20:11:54 2005]loadbalancer 192.168.0.100 0.000210

      [Mon Aug 15 20:11:54 2005][info] jk_handler::mod_jk.c (1971): Service error=0 for worker=loadbalancer

      http.conf
      Note apache listening on port 80

      # Include mod_jk configuration file
      Include conf/mod-jk.conf

      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/workers.properties

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

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

      # 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"

      # Mount your applications
      JkMount /application/* loadbalancer

      # You can use external file for mount points.
      # It will be checked for updates each 60 seconds.
      # The format of the file is: /url=worker
      # /examples/*=loadbalancer
      JkMountFile conf/uriworkermap.properties

      # 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 logs/jk.shm

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


      worker.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=node1
      #(note I tried node1.servername.com and node1.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= node2
      #(note I tried node2.servername.com and node2.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.balance_workers=node1, node2
      worker.loadbalancer.sticky_session=1
      worker.loadbalancer.local_worker_only=1
      worker.list=loadbalancer

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


      server.xml



      <!-- A HTTP/1.1 Connector on port 8080 -->


      <!-- A AJP 1.3 Connector on port 8009 -->


      <!-- SSL/TLS Connector configuration using the admin devl guide keystore

      -->


      ...

      jboss-service.xml
      true

        • 1. Re: 503 Service Temporarily Unavailable - JBoss 4.0.3RC1, Ap
          philc_jboss

          I forgot to post my ../conf/uriworkermap.properties

          uriworkermap.properties

          # Simple worker configuration file
          #

          # Mount the Servlet context to the ajp13 worker
          /jmx-console=loadbalancer
          /jmx-console/*=loadbalancer
          /web-console=loadbalancer
          /web-console/*=loadbalancer

          • 2. Re: 503 Service Temporarily Unavailable - JBoss 4.0.3RC1, Ap
            philc_jboss

            Solved the issue. If anyone else has this problem check your values in worker.properties. I had to modify from the worker.node.host value. It worked with localhost (instead of nodex values).

            worker.properties

            previous failed attempts
            worker.node1.host=node1.servername.com
            worker.node1.host=node1
            successful (issue resolved)
            worker.node1.host=localhost

            previous failed attempts
            worker.node2.host=node2.servername.com
            worker.node2.host=node1
            successful (issue resolved)
            worker.node2.host=localhost

            Just FYI

            • 3. Re: 503 Service Temporarily Unavailable - JBoss 4.0.3RC1, Ap

              PhilC if you're out there...

              A big word of thanks! I found this post and was having precisely the same problem. Thanks to you posting your solution I fixed my issue within minutes. I know I easily could have burned a day or two in utter frustration otherwise.

              Greg