4

I am doing clustering in Tomcat 7 with Apache server. It is working fine too. However I have the following issues:

1) I am trying to monitor the mod_jk status page; but it is giving 404 error.

2) in Log following error is shown -

[Tue Dec 17 13:16:51.019 2013] [2236:140599476504544] [error] init_jk::mod_jk.c (3348): Initializing shm:/etc/httpd/logs/mod_jk.shm.2236 errno=13. Load balancing workers will not function properly.
[Tue Dec 17 13:16:51.019 2013] [2236:140599476504544] [info] init_jk::mod_jk.c (3365): mod_jk/1.2.37 initialized
[Tue Dec 17 13:16:51.041 2013] [2237:140599476504544] [error] init_jk::mod_jk.c (3348): Initializing shm:/etc/httpd/logs/mod_jk.shm.2237 errno=13. Load balancing workers will not function properly.
[Tue Dec 17 13:16:51.042 2013] [2237:140599476504544] [info] init_jk::mod_jk.c (3365): mod_jk/1.2.37 initialized

Here is worker.properties file

worker.list=tomcatnode1,tomcatnode2,loadbalancer,statusmanager

worker.tomcatnode1.port=8009
worker.tomcatnode1.host=localhost
worker.tomcatnode1.type=ajp13
worker.tomcatnode1.lbfactor=100

worker.tomcatnode2.port=8010
worker.tomcatnode2.host=localhost
worker.tomcatnode2.type=ajp13
worker.tomcatnode2.lbfactor=100


#Load Balance Configuration
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=tomcatnode1, tomcatnode2
worker.loadbalancer.sticky_session=1

#worker.list=jkstatus
worker.statusmanager.type=status

Here is mod_jk.conf file

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info
JkShmFile logs/mod_jk.shm
JkMount /IntellixWebApi/* loadbalancer
#JkMount /jkmanager/* jkstatus
#JkMount /jkmanager jkstatus

<Location /status/>
    JkMount statusmanager
    Order deny,allow
#   Deny from all
    Allow from 127.0.0.1
</Location>

If I am accessing IntellixWebApi; it is accessable. but When I am using /status; it is not working.

Please suggest.

Kumar
  • 211

2 Answers2

4

There's a problem initializing the shared memory that is needed by the workers.

Check whether the directory /etc/httpd/logs/ exists and is writable by the user that's running the tomcat instance. If it isn't, either change the permissions on the directory, or create a separate directory to keep the shm files in. (I'd recommend the latter, simply because it's not a good idea to keep important state in the same place as your logs, for several reasons.)

If the directory does exist and is writable, check whether you've got SELinux on and if so whether there are any permissions issues with it. You could always try to set it to permissive to see whether the problem disappears; if so, it's time to fix the permissions and turn it back on.

Jenny D
  • 28,400
  • 21
  • 80
  • 117
1

After lots of googling; I am able to get the jk_manager status screen. Firstly I have disable the SELINUX and then after restarting the system; I set the following JkMount

JkMount /* loadbalancer
JkMount /IntellixWebApi/* loadbalancer
JkMount /jkmanager/* jkstatus

<Location /status/>
    JkMount statusmanager
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location>

This worked for me.

Thanks

Kumar
  • 211