You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Neil Wilson <ne...@dcdata.co.za> on 2007/10/19 10:25:40 UTC

Tomcat error, with Scalix

Hi guys,

I'm not 100% sure if this is the place I should be asking for help, but 
seems as though I've heard nothing from anywhere else yet, this is 
really my last resort.

I'm running Scalix on a server, and I think the Tomcat part of Scalix is 
killing my Apache.

I'm getting the following error in my /var/log/apache2/mod_jk.log

[Wed Oct 10 08:52:43 2007] [error] jk_child_init::mod_jk.c (2312): 
Attachning shm:/srv/www/logs/jk-runtime-status errno=2
[Wed Oct 10 08:52:43 2007] [error] jk_child_init::mod_jk.c (2312): 
Attachning shm:/srv/www/logs/jk-runtime-status errno=2

I'm also seeing the following error in /var/log/apache/errorlog

[Wed Oct 10 08:52:42 2007] [notice] child pid 24905 exit signal 
Segmentation fault (11)
[Wed Oct 10 08:52:42 2007] [error] (13)Permission denied: 
apr_global_mutex_lock(jk_log_lock) failed
[Wed Oct 10 08:52:42 2007] [notice] child pid 24906 exit signal 
Segmentation fault (11)
[Wed Oct 10 08:52:43 2007] [error] (13)Permission denied: 
apr_global_mutex_lock(jk_log_lock) failed
[Wed Oct 10 08:52:43 2007] [error] (13)Permission denied: 
apr_global_mutex_lock(jk_log_lock) failed

I don't have selinux or Apparmor enabled, I'm running SLES9.

The problem appeared after I restarted apache2, since then my apache2 
doesn't load any pages.

If I then disable /etc/apache2/conf.d/scalix-tomcat-connector.conf my 
apache2 starts to work again.

So it's definitely something to do with my tomcat that's breaking my 
apache2.

Please, if anyone has any info I'll be very grateful.

Thanks in advance.

Regards.

Neil

-- 
This email and all contents are subject to the following disclaimer:
http://www.dcdata.co.za/emaildisclaimer.html


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat error, with Scalix

Posted by Neil Wilson <ne...@dcdata.co.za>.
Christopher Schultz wrote:

> You might want to re-post your error with a new subject: something like
> "mod_jk seg fault". I'm no mod_jk expert, and it doesn't look like any
> of the mod_jk folks are reading this thread. Once you get Mladen or
> Rainer to look at this, they'll have some good ideas.

Thanks for all your help Chris, I have done so.

Regards.

Neil Wilson.

-- 
This email and all contents are subject to the following disclaimer:
http://www.dcdata.co.za/emaildisclaimer.html


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat error, with Scalix

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Neil,

Neil Wilson wrote:
> Unfortunately I can't really upgrade it as it may break the rest of
> Scalix if it depends on this current version.

Okay. Sometimes this just happens ;)

I get what looks like the same error you do when I start up mod_jk:

[Wed Oct 24 03:10:04.000 2007] [2660:3083335872] [error]
init_jk::mod_jk.c (2732): Initializing
shm:/usr/lib/apache2/logs/jk-runtime-status.2660 errno=2. Load balancing
workers will not function properly.

My error message looks a lot less nasty, though. Perhaps they changed
the language because the error looks worse than it is (note that it's
the same errno: 2 (No such file or directory).

> I've commented out all of the other options you mentioned that are
> depreciated, and tried restarting and it's still doing the same thing.

Well, you might not want to comment them out entirely -- maybe just
read-up on their replacements and set the values accordingly. Of course,
you don't need the lb stuff if you're not doing load balancing.

> I've also tried removing and re-installing from the original RPMs that
> come with Scalix, and this hasn't helped either.

:(

> What's strange is my apache is listening on port 80 on all interfaces...
> 
> tcp        0      0 :::80                   :::* LISTEN     
> 16144/httpd2-prefor
> 
> If I go to 127.0.0.1 I get the default apache page, but if I got to
> 192.168.1.5(or any of the ips bound) my browser just sits and does nothing.

Apache is probably configured without a default virtual host. 127.0.0.1
is configured to serve content, while the other interfaces are
listening, but not configured properly.

Did you recently upgrade Apache httpd or something? This happened to me
recently -- going from Apache httpd 2.0 to 2.2, the default virtual host
was lost and things started acting funny.

You might want to re-post your error with a new subject: something like
"mod_jk seg fault". I'm no mod_jk expert, and it doesn't look like any
of the mod_jk folks are reading this thread. Once you get Mladen or
Rainer to look at this, they'll have some good ideas.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHH1Kc9CaO5/Lv0PARAvveAJ9b1VZQVPqJT8kEoz5Ired+PiBqJACfUywD
mAb1j9Gr5vc/5p0+FAQINc0=
=1bwS
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat error, with Scalix

Posted by Neil Wilson <ne...@dcdata.co.za>.
Hi Chris,

Thanks for your reply.

Christopher Schultz wrote:
> You probably ought to upgrade. 1.2.14 is pretty old: the current version
> is 1.2.25. You can look at the changelog at
> http://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html to
> see if anything important changed for you (and might break a delicate
> configuration).

Unfortunately I can't really upgrade it as it may break the rest of 
Scalix if it depends on this current version.

This used to work on the current version, so I'm not sure when or why it 
stopped working.

>> JkWorkerProperty worker.mail.recycle_timeout=300
> 
> Like cacheize, this directive has been deprecated (with a replacement)
> in newer versions of the library.

I've commented out all of the other options you mentioned that are 
depreciated, and tried restarting and it's still doing the same thing.

I've also tried removing and re-installing from the original RPMs that 
come with Scalix, and this hasn't helped either.

What's strange is my apache is listening on port 80 on all interfaces...

tcp        0      0 :::80                   :::* 
LISTEN      16144/httpd2-prefor

If I go to 127.0.0.1 I get the default apache page, but if I got to 
192.168.1.5(or any of the ips bound) my browser just sits and does nothing.

Thanks, much appreciated.

Regards.

Neil

-- 
This email and all contents are subject to the following disclaimer:
http://www.dcdata.co.za/emaildisclaimer.html


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat error, with Scalix

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Neil,

Neil Wilson wrote:
> Christopher Schultz wrote:
>> Okay. Using RPM, you ought to be able to figure out version numbers and
>> stuff, though. I'd bet that mod_jk has its own RPM package, but I
>> couldn't tell you what it's called. Try listing all packages and search
>> for "jk" or something. Another thing you can do is find the mod_jk.so
>> binary and run this on it:
>>
>> $ strings /path/to/mod_jk.so | grep mod_jk/
> 
> OK, couldn't get the info using rpm so with strings I go the following.
> 
> mod_jk/1.2.14

You probably ought to upgrade. 1.2.14 is pretty old: the current version
is 1.2.25. You can look at the changelog at
http://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html to
see if anything important changed for you (and might break a delicate
configuration).

You can find out which package included mod_jk.so by using rpm to search
for it. I don't have any systems handy that have RPM on them anymore, so
you'll have to poke around the man page to find out how you can say
"which package owns this file?". You might have to upgrade Tomcat
(d'oh!) in order to get the upgraded mod_jk. You could always compile it
yourself if necessary.

>>> I've checked and this file does NOT exist, should I touch it with the
>>> correct ownership/permissions?
>>
>> Not yet. Does the directory exist, and just not the file? If so, maybe
>> you should create the file.
> 
> Ok, the directory does exist, but the file doesn't, I'm not using SSL,
> so I'm guessing that this won't affect it much.

Well, the error you're getting is from mod_jk and doesn't have anything
to do with SSL. mod_jk uses shared memory (I think) for it's status
worker. It's not really necessary to get it working (mine was giving me
the same startup error, but with no other adverse effects).

> I've searched through all the files in that directory and can't find
> anything relating to shared memory, the only thing that slightly
> resembles it is "cachesize=10"

No, that's a worker-specific setting (which has been deprecated in newer
versions of the library, btw). Unless you are using threaded Apache
(worker, not pre-fork), this setting is useless (see the docs). The docs
suggest that setting this higher than 1 on Apache 1.3 or Apache 2.x
prefork is a bad idea. It's possible that this could be affecting you.
You might want to remove this setting for now.

> JkWorkerProperty worker.mail.lbfactor=50

Are you using a load-balanced configuration? If not, remove this directive.

> JkWorkerProperty worker.mail.cache_timeout=600

Like cacheize, this directive has been deprecated (with a replacement)
in newer versions of the library.

> JkWorkerProperty worker.mail.recycle_timeout=300

Like cacheize, this directive has been deprecated (with a replacement)
in newer versions of the library.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHHfyA9CaO5/Lv0PARAnXxAJ9+gzxkRbDOfNl3yGgThyIpF8ik/ACcCCRW
LMJz17a/w2fe/M7cZ293C5Q=
=sRsp
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat error, with Scalix

Posted by Neil Wilson <ne...@dcdata.co.za>.
Christopher Schultz wrote:
> Okay. Using RPM, you ought to be able to figure out version numbers and
> stuff, though. I'd bet that mod_jk has its own RPM package, but I
> couldn't tell you what it's called. Try listing all packages and search
> for "jk" or something. Another thing you can do is find the mod_jk.so
> binary and run this on it:
> 
> $ strings /path/to/mod_jk.so | grep mod_jk/

OK, couldn't get the info using rpm so with strings I go the following.

mod_jk/1.2.14

>> I'm not sure what my "shared memory file" is, but I've search through my
>>  httpd.conf and the only reference to shared memory file is the line.
>>
>> SSLSessionCache         shmcb:/var/lib/apache2/ssl_scache
> 
> Right. That's obviously not the error occurring in mod_jk. Let's keep
> looking.
> 
>> I've checked and this file does NOT exist, should I touch it with the
>> correct ownership/permissions?
> 
> Not yet. Does the directory exist, and just not the file? If so, maybe
> you should create the file.

Ok, the directory does exist, but the file doesn't, I'm not using SSL, 
so I'm guessing that this won't affect it much.

>> Include /etc/opt/scalix-tomcat/connector/jk/instance-*.conf

Include /etc/opt/scalix-tomcat/connector/jk/app-mail.*.conf
JkWorkerProperty worker.mail.type=ajp13
JkWorkerProperty worker.mail.host=mail.ahost.co.za
JkWorkerProperty worker.mail.port=8009
JkWorkerProperty worker.mail.lbfactor=50
JkWorkerProperty worker.mail.cachesize=10
JkWorkerProperty worker.mail.cache_timeout=600
JkWorkerProperty worker.mail.socket_keepalive=1
JkWorkerProperty worker.mail.recycle_timeout=300

>> Include /etc/opt/scalix-tomcat/connector/jk/workers.conf

JkWorkerProperty worker.list=mail

> Can you tell me if anything interesting lives in either of those two
> include files? It's possible the that shared memory configuration is in
> there.

I've searched through all the files in that directory and can't find 
anything relating to shared memory, the only thing that slightly 
resembles it is "cachesize=10"

Thanks Christopher.

Regards.

Neil


-- 
This email and all contents are subject to the following disclaimer:
http://www.dcdata.co.za/emaildisclaimer.html


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat error, with Scalix

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Neil,

Neil Wilson wrote:
>>> [Wed Oct 10 08:52:43 2007] [error] jk_child_init::mod_jk.c (2312):
>>> Attachning shm:/srv/www/logs/jk-runtime-status errno=2
>
> Unfortunately the error above isn't a typo, I've found a longer
> version in my logs after looking further back.

I just meant the word "Attachning". ;)

>> errno=2 looks like "No such file or directory" (at least on my Linux
>> box). Check to see that your shared memory file exists and is readable
>> by Apache httpd. Looks like there's a typo in the error message. ;)
> 
> Sorry, Tomcat and mod_jk is all new territory for me, it all gets
> installed from the RPMs that come with Scalix, so apart from the
> Apache2, the rest is all bundled with Scalix.

Okay. Using RPM, you ought to be able to figure out version numbers and
stuff, though. I'd bet that mod_jk has its own RPM package, but I
couldn't tell you what it's called. Try listing all packages and search
for "jk" or something. Another thing you can do is find the mod_jk.so
binary and run this on it:

$ strings /path/to/mod_jk.so | grep mod_jk/

On my system, this returns:
mod_jk/1.2.25

> I'm not sure what my "shared memory file" is, but I've search through my
>  httpd.conf and the only reference to shared memory file is the line.
> 
> SSLSessionCache         shmcb:/var/lib/apache2/ssl_scache

Right. That's obviously not the error occurring in mod_jk. Let's keep
looking.

> I've checked and this file does NOT exist, should I touch it with the
> correct ownership/permissions?

Not yet. Does the directory exist, and just not the file? If so, maybe
you should create the file.

> httpd is apache2-prefork-2.0.59-1.1

Excellent.

> Below is my /etc/apache2/conf.d/scalix-tomcat-connector.conf with
> comments removed, as this is what calls mod_jk, not sure if this will
> help at all, but just in case.

Here are the relevant parts:

> <IfModule mod_jk.c>
> 
> JkLogLevel          info
> JkLogStampFormat   "[%a %b %d %H:%M:%S %Y] "
> JkOptions          +ForwardKeySize +ForwardURICompat -ForwardDirectories
> JkRequestLogFormat "%w %V %T"
> 
> Include /etc/opt/scalix-tomcat/connector/jk/instance-*.conf
> Include /etc/opt/scalix-tomcat/connector/jk/workers.conf
> 
> </IfModule>

Can you tell me if anything interesting lives in either of those two
include files? It's possible the that shared memory configuration is in
there.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHGNdT9CaO5/Lv0PARApPeAKCYDh4W7teKPzG1U0tGOlbCVV7JewCfRUum
XJiCSJTZEU1L86xiTVEBDrU=
=ildR
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat error, with Scalix

Posted by Neil Wilson <ne...@dcdata.co.za>.
Thanks for your reply Chris.

Christopher Schultz wrote:
> Tomcat is unlikely to be killing your Apache httpd, but mod_jk could be
> having a problem. This probably /is/ the right place to ask this question.

Cool! glad to hear, thanks.

>> [Wed Oct 10 08:52:43 2007] [error] jk_child_init::mod_jk.c (2312):
>> Attachning shm:/srv/www/logs/jk-runtime-status errno=2
> 
> errno=2 looks like "No such file or directory" (at least on my Linux
> box). Check to see that your shared memory file exists and is readable
> by Apache httpd. Looks like there's a typo in the error message. ;)

Sorry, Tomcat and mod_jk is all new territory for me, it all gets 
installed from the RPMs that come with Scalix, so apart from the 
Apache2, the rest is all bundled with Scalix.

Unfortunately the error above isn't a typo, I've found a longer version 
in my logs after looking further back.

[Thu Oct 04 17:47:42 2007] [error] jk_child_init::mod_jk.c (2312): 
Attachning shm:/srv/www/logs/jk-runtime-status errno=2[Thu Oct 04 
17:47:42 2007] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/srv/www/logs/jk-runtime-status errno=2

I'm not sure what my "shared memory file" is, but I've search through my 
  httpd.conf and the only reference to shared memory file is the line.

SSLSessionCache         shmcb:/var/lib/apache2/ssl_scache

I've checked and this file does NOT exist, should I touch it with the 
correct ownership/permissions?

> A couple of questions:
> 
> What version of mod_jk are you running? What version of Apache httpd are
> you running? Which httpd worker model are you using? Pre-fork? Threaded?

How do I find out my mod_jk version?

httpd is apache2-prefork-2.0.59-1.1

Below is my /etc/apache2/conf.d/scalix-tomcat-connector.conf with 
comments removed, as this is what calls mod_jk, not sure if this will 
help at all, but just in case.

<Location />
   AddOutputFilterByType DEFLATE text/xml text/html text/css
   AddOutputFilterByType DEFLATE application/x-javascript
</Location>

<IfModule mod_jk.c>

JkLogLevel          info
JkLogStampFormat   "[%a %b %d %H:%M:%S %Y] "
JkOptions          +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"

Include /etc/opt/scalix-tomcat/connector/jk/instance-*.conf
Include /etc/opt/scalix-tomcat/connector/jk/workers.conf

</IfModule>

<IfModule mod_jk.c>

JkLogFile     /var/log/apache2/mod_jk.log
</IfModule>

Thanks again for your help Chris.

Regards.

Neil/


-- 
This email and all contents are subject to the following disclaimer:
http://www.dcdata.co.za/emaildisclaimer.html


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat error, with Scalix

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Neil,

Neil Wilson wrote:
> I'm running Scalix on a server, and I think the Tomcat part of Scalix is
> killing my Apache.

Tomcat is unlikely to be killing your Apache httpd, but mod_jk could be
having a problem. This probably /is/ the right place to ask this question.

> [Wed Oct 10 08:52:43 2007] [error] jk_child_init::mod_jk.c (2312):
> Attachning shm:/srv/www/logs/jk-runtime-status errno=2

errno=2 looks like "No such file or directory" (at least on my Linux
box). Check to see that your shared memory file exists and is readable
by Apache httpd. Looks like there's a typo in the error message. ;)

A couple of questions:

What version of mod_jk are you running? What version of Apache httpd are
you running? Which httpd worker model are you using? Pre-fork? Threaded?

Did you compile mod_jk yourself? If not, where did you get the version
you are using?

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHGLmF9CaO5/Lv0PARAm5JAJ95zDwjxXZcUYIbmm8UkCLyVNqP2ACfcWjI
d25D8lyq2+qkAAMoLO8FDuA=
=Qjpc
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org