1 Reply Latest reply on Nov 30, 2004 4:47 PM by edlftt

    mod_jk1.2.6 & JBoss

    edlftt

      I have read numerous posts dealing with tomcat, apache and mod_jk and it seems that I am not the only one having issues. In requesting a servlet in form of http://myurl/mytest/ (where mytest is the servlet working fine when accessed as: http://myurl:8080/mytest/) I get a 500 Internal server error. Upon the suggestion the wiki on this site on mod_jk i added worker.list=node1 in workers.properties.

      Have been working ono just this for the past 2 days so I hope someone will have a suggestion on how I may fix this problem.
      NOTE: in the XML excerpts below i removed the starting < because otherwise it wouldn't have outputed to this site.


      My setup
      ----------------------------
      JBoss 3.2.7RC1
      Apache 2.0
      mod_jk1.2.6


      workers.properties
      ----------------------------
      # Define Node1
      worker.list=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

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


      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"
      JkMount /* loadbalancer


      httpd.conf
      ----------------------------
      [..]
      Include conf/mod-jk.conf
      [..]
      JkMount /*.jsp ajp13
      JkMount /mytest/* ajp13
      JkMount /mytest ajp13


      jbossweb-tomcat50.sar/server.xml
      ----------------------------------------
      [..]
      Connector port="8009" address="127.0.0.1"
      enableLookups="false" redirectPort="8443" debug="0"
      protocol="AJP/1.3"/>
      [..]
      Engine name="jboss.web" defaultHost="localhost" jvmRoute="node1">
      [..]


      jbossweb-tomcat50.sar/META-INF/jboss-service.xml
      ------------------------------------------------------------
      attribute name="UseJK">true


      mod_jk log file (these lines get repeated quite a few times)
      ---------------------------------------------------------------------
      [Tue Nov 30 15:50:33 2004] [jk_ajp_common.c (1024)]: Error connecting to the Tomcat process.
      [Tue Nov 30 15:50:33 2004] [jk_ajp_common.c (1468)]: sending request to tomcat failed in send loop. err=2
      [Tue Nov 30 15:50:33 2004] [jk_ajp_common.c (1477)]: Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=node1 failed errno = 111
      [Tue Nov 30 15:50:33 2004] [jk_lb_worker.c (357)]: lb: All tomcat instances failed, no more workers left.
      [Tue Nov 30 15:50:33 2004]loadbalancer blahblah.com 0.000562
      [Tue Nov 30 15:50:34 2004] [jk_connect.c (188)]: jk_open_socket, connect() failed errno = 111
      [Tue Nov 30 15:50:34 2004] [jk_ajp_common.c (720)]: Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (127.0.0.1:8009). Failed errno = 111

      JBoss and Apache are started. I was even able to telnet to port 8009 and send data to jboss who protested with an error in packet or something similar.

      If anyone can give any suggestions I would very very much appreciate it.
      Thank you,

      Chris