You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Paul George Constantine <pa...@stanford.edu> on 2005/07/10 23:19:59 UTC

Jk's shared memory file - fixed? bug?

Ok, here's what happened. I'm running Apace 2.0 on Fedora Core 4, connecting
to Tomcat 5.0.28 with Jk 1.2.10. In my /etc/httpd/conf/httpd.conf, I had:

#Jk stuff
LoadModule	jk_module /usr/lib/httpd/modules/mod_jk.so
JkWorkersFile   /etc/httpd/conf/workers.properties
JkLogFile	/var/log/httpd/mod_jk.log
JkLogLevel    	info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions     +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkMount		/jsp-examples/* ajp13w
JkMount		/JSPWiki/* ajp13w
JkShmFile	/etc/httpd/logs/jk-runtime-status

In /etc/httpd/conf/workers.properties, I had:

worker.list=wlb,jkstatus,ajp13w

worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

worker.wlb.type=lb
worker.wlb.balance_workers=ajp13w

worker.jkstatus.type=status

In /usr/share/tomcat5/conf/server.xml, I had

<Listener
     className="org.apache.jk.config.ApacheConfig"
     configHome="/usr/share/tomcat5"
     modJk="/usr/lib/httpd/modules/mod_jk.so"
     jkWorker="ajp13w"
     forwardAll="False"
     jkLog="/etc/httpd/logs/mod_jk.log"
     jkDebug="debug"
     noRoot="False"
     workersConfig="/etc/httpd/conf/workers.properties"/>

<Connector port="8009"
     enableLookups="false" redirectPort="8443" debug="0"
     protocol="AJP/1.3" />

Everything was working fine until the file /etc/httpd/logs/jk-runtime-status
reached the default JkShmSize limit of 64k. Once that happened, everything
died. I started getting errors in mod_jk.log like:

[error] init_jk::mod_jk.c (2347): Initializing
shm:/etc/httpd/logs/jk-runtime-status errno=13

errno=13 is typically a permission denied error, but my permissions were set
appropriately. I tried deleting the contents of
/etc/httpd/logs/jk-runtime-status to get below the size limit, but that
didn't help anything. I tried creating a new file /etc/httpd/logs/jk.shm
and pointing my config file there, but no success. I didn't get things
working again until I recompiled my mod_jk.so and reinstalled it. I checked
out the code in jk_shm.c that was giving me an error:

jk_shmem.hdr = (jk_shm_header_t *)calloc(1, jk_shmem.size);
if (!jk_shmem.hdr) {
    JK_TRACE_EXIT(l);
    return -1;
}

So, devs, why was this breaking? I've now set JkShmSize to 10M. But will it
break again once jk.shm reaches 10M?

Anybody out there?

-Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org