You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Volker <To...@Trendsetter.de> on 2003/09/26 09:03:57 UTC

Tomcat stops working after a few days!

Hi,

I have a problem running Jakarta Tomcat 4.1 port under FreeBSD 4.4 with
Blackdown Java 1.3.1 with mod_jk 1.2:

After startup.sh /logs/catalina.out shows up following lines:

[INFO] Registry - -Loading registry information
[INFO] Registry - -Creating new Registry instance
[INFO] Registry - -Creating MBeanServer
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.24
HTTP Tunnel connected to the DigiChat server localhost
HttpTunnelingServlet connected to the groopz server
[INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080
[INFO] ChannelSocket - -JK2: ajp13 listening on 0.0.0.0/0.0.0.0:8009
[INFO] JkMain - -Jk running ID=0 time=7/21
config=/usr/local/jakarta-tomcat4.1/conf/jk2.properties
[INFO] ChannelSocket - -server has been restarted or reset this
connection
[INFO] ChannelSocket - -server has been restarted or reset this
connection
[INFO] ChannelSocket - -server has been restarted or reset this
connection
[INFO] ChannelSocket - -server has been restarted or reset this
connection

The first days everythings runs correctly. The example servlets can be
executed via port 80 by help of mod_jk.

After a few days suddenly the servlets cannot be executed anymore.
Having a look on the Tomcat process with "top" prints out state
"sbwait".
That state does not change anymore AND I cannot shutdown the tomcat
process by help of shutdown.sh - so I have to kill the process with kill
-9.

"catalina.out" meanwhile has grown up to nearly 1MB because a lot of
lines (content: [INFO] ChannelSocket - -server has been restarted or
reset this connection ) have been inserted.

Killing and restarting Tomcat manually and restarting apache afterwards
for activating mod_jk again results in making all work again.

Does anyone have an idea of what is happening here?


Thanks and regards

Volker




mod_jk Errors

Posted by Rhugga <to...@echeeba.com>.
I get the following errors in the Apache error.log:

[Thu Sep 25 17:39:27 2003] [notice] Apache/2.0.47 (Unix) mod_jk2/2.0.2 
PHP/4.3.2 DAV/2 configured -- resuming normal operations
[Thu Sep 25 17:39:27 2003] [info] Server built: Aug 29 2003 13:33:03
[Thu Sep 25 17:39:37 2003] [error] jk2_init() Can't find child 1329 in 
scoreboard
[Thu Sep 25 17:39:37 2003] [error] mod_jk child init 1 -2
[Thu Sep 25 17:39:38 2003] [error] jk2_init() Can't find child 1330 in 
scoreboard
[Thu Sep 25 17:39:38 2003] [error] mod_jk child init 1 -2
[Thu Sep 25 17:39:38 2003] [error] jk2_init() Can't find child 1331 in 
scoreboard
[Thu Sep 25 17:39:38 2003] [error] mod_jk child init 1 -2
[Thu Sep 25 17:46:33 2003] [error] jk2_init() Can't find child 1332 in 
scoreboard
[Thu Sep 25 17:46:33 2003] [error] mod_jk child init 1 -2
[Thu Sep 25 17:46:34 2003] [error] jk2_init() Can't find child 1333 in 
scoreboard
[Thu Sep 25 17:46:34 2003] [error] mod_jk child init 1 -2
[Thu Sep 25 17:46:34 2003] [error] jk2_init() Can't find child 1334 in 
scoreboard
[Thu Sep 25 17:46:34 2003] [error] mod_jk child init 1 -2

Any ideas?

Thx,
Chuck


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


mod_jk Errors

Posted by Rhugga <to...@echeeba.com>.
I get the following errors in the Apache error.log:

[Thu Sep 25 17:39:27 2003] [notice] Apache/2.0.47 (Unix) mod_jk2/2.0.2 
PHP/4.3.2 DAV/2 configured -- resuming normal operations
[Thu Sep 25 17:39:27 2003] [info] Server built: Aug 29 2003 13:33:03
[Thu Sep 25 17:39:37 2003] [error] jk2_init() Can't find child 1329 in 
scoreboard
[Thu Sep 25 17:39:37 2003] [error] mod_jk child init 1 -2
[Thu Sep 25 17:39:38 2003] [error] jk2_init() Can't find child 1330 in 
scoreboard
[Thu Sep 25 17:39:38 2003] [error] mod_jk child init 1 -2
[Thu Sep 25 17:39:38 2003] [error] jk2_init() Can't find child 1331 in 
scoreboard
[Thu Sep 25 17:39:38 2003] [error] mod_jk child init 1 -2
[Thu Sep 25 17:46:33 2003] [error] jk2_init() Can't find child 1332 in 
scoreboard
[Thu Sep 25 17:46:33 2003] [error] mod_jk child init 1 -2
[Thu Sep 25 17:46:34 2003] [error] jk2_init() Can't find child 1333 in 
scoreboard
[Thu Sep 25 17:46:34 2003] [error] mod_jk child init 1 -2
[Thu Sep 25 17:46:34 2003] [error] jk2_init() Can't find child 1334 in 
scoreboard
[Thu Sep 25 17:46:34 2003] [error] mod_jk child init 1 -2

Any ideas?

Thx,
Chuck


Re: Error Finding config file: workers2.properties

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
> INFO: Starting Coyote HTTP/1.1 on port 8443
> [Fri Sep 26 07:54:52 2003] (error ) [jk_config_file.c (279)]
> config.update(): Can't find config file ${serverRoot}/conf/workers2.pr
> operties
> [Fri Sep 26 07:54:52 2003] ( info ) [jk_config.c (251)]
> config.setAttribute() Error setting config: file
${serverRoot}/conf/workers
> 2.properties
> [Fri Sep 26 07:54:52 2003] ( info ) [jk_logger_file.c (184)]
> Initializing log file stderr
> [Fri Sep 26 07:54:52 2003] (error ) [jk_shm.c (333)]  shm.init(): No file
> [Fri Sep 26 07:54:52 2003] ( info ) [jk_workerEnv.c (403)]
> workerEnv.init() ok ${serverRoot}/conf/workers2.properties

This seams to be a still present bug of mod_jk2 java sources. Aparently, the
only way to define that property, "serverRoot" is to define and export it as
an environment variable in one of the satrtup scripts, "catalina.sh" or
"startup.sh".

Nix.


Re: Error Finding config file: workers2.properties

Posted by Rhugga <to...@echeeba.com>.
Nikola Milutinovic wrote:
>>Duncan Smith wrote:
>>
>>
>>>I had same problem.
>>>I found that if the workers2.properties file was supposed to be in
>>>{apache-home}/conf/
> 
> 
>>Yea, I symbolically linked it there as well, but still nada. Will it not
>>follow symbolic links?
> 
> 
> I said before, as I learned from another guy on this list, jk2 configuration
> files on the Tomcat side do not support "serverRoot". Actually, you can
> define and use it in ${CATALINA_HOME}/config/jk2.properties, but the
> "jkjni.so" modules will not pick it up (and those are complaining), unless
> you define it as an environment variable.
> 
> Nix.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

I added it to catalina.sh and got rid of the message.

serverRoot=/blah
export serverRoot

Not sure if the explicit export is needed I put them both in at once.

-CC



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


Re: Error Finding config file: workers2.properties

Posted by Rhugga <to...@echeeba.com>.
Nikola Milutinovic wrote:
>>Duncan Smith wrote:
>>
>>
>>>I had same problem.
>>>I found that if the workers2.properties file was supposed to be in
>>>{apache-home}/conf/
> 
> 
>>Yea, I symbolically linked it there as well, but still nada. Will it not
>>follow symbolic links?
> 
> 
> I said before, as I learned from another guy on this list, jk2 configuration
> files on the Tomcat side do not support "serverRoot". Actually, you can
> define and use it in ${CATALINA_HOME}/config/jk2.properties, but the
> "jkjni.so" modules will not pick it up (and those are complaining), unless
> you define it as an environment variable.
> 
> Nix.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

I added it to catalina.sh and got rid of the message.

serverRoot=/blah
export serverRoot

Not sure if the explicit export is needed I put them both in at once.

-CC



Re: Error Finding config file: workers2.properties

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
> Duncan Smith wrote:
>
> >I had same problem.
> >I found that if the workers2.properties file was supposed to be in
> >{apache-home}/conf/

> Yea, I symbolically linked it there as well, but still nada. Will it not
> follow symbolic links?

I said before, as I learned from another guy on this list, jk2 configuration
files on the Tomcat side do not support "serverRoot". Actually, you can
define and use it in ${CATALINA_HOME}/config/jk2.properties, but the
"jkjni.so" modules will not pick it up (and those are complaining), unless
you define it as an environment variable.

Nix.


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


Re: Error Finding config file: workers2.properties

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
> Duncan Smith wrote:
>
> >I had same problem.
> >I found that if the workers2.properties file was supposed to be in
> >{apache-home}/conf/

> Yea, I symbolically linked it there as well, but still nada. Will it not
> follow symbolic links?

I said before, as I learned from another guy on this list, jk2 configuration
files on the Tomcat side do not support "serverRoot". Actually, you can
define and use it in ${CATALINA_HOME}/config/jk2.properties, but the
"jkjni.so" modules will not pick it up (and those are complaining), unless
you define it as an environment variable.

Nix.


Re: Error Finding config file: workers2.properties

Posted by Rhugga <to...@echeeba.com>.
Duncan Smith wrote:

>I had same problem.
>I found that if the workers2.properties file was supposed to be in
>{apache-home}/conf/
>
>Good luck :-)
>Duncan Smith
>Decker Telecom Ltd
>
>Rhugga wrote:
>
>  
>
>>I get this error during tomcat 4.2.27 startup:
>>
>>INFO: Starting Coyote HTTP/1.1 on port 8443
>>[Fri Sep 26 07:54:52 2003] (error ) [jk_config_file.c (279)]
>>config.update(): Can't find config file ${serverRoot}/conf/workers2.pr
>>operties
>>[Fri Sep 26 07:54:52 2003] ( info ) [jk_config.c (251)]
>>config.setAttribute() Error setting config: file ${serverRoot}/conf/workers
>>2.properties
>>[Fri Sep 26 07:54:52 2003] ( info ) [jk_logger_file.c (184)]
>>Initializing log file stderr
>>[Fri Sep 26 07:54:52 2003] (error ) [jk_shm.c (333)]  shm.init(): No file
>>[Fri Sep 26 07:54:52 2003] ( info ) [jk_workerEnv.c (403)]
>>workerEnv.init() ok ${serverRoot}/conf/workers2.properties
>>
>>Here is the connector definition from server.xml:
>>
>><!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
>><Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>>      port="8443" minProcessors="5" maxProcessors="75"
>>      enableLookups="true" serverRoot="/usr/local/jakarta-tomcat-4.1.27"
>>      acceptCount="100" debug="5" scheme="https" secure="true"
>>      useURIValidationHack="false" disableUploadTimeout="true">
>>     <Factory
>>         className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
>>         clientAuth="false" protocol="TLS" />
>>     <parameter>
>>         <name>serverRoot</name>
>>         <value>/usr/local/jakarta-tomcat-4.1.27</value>
>>     </parameter>
>></Connector>
>>
>>My workers2.properties file is here:
>>ganja:/usr/local/tomcat/conf #ls -l
>>/usr/local/jakarta-tomcat-4.1.27/conf/workers2.properties
>>-rw-r--r--   1 tomcat   httpd        258 Aug 30 23:14
>>/usr/local/jakarta-tomcat-4.1.27/conf/workers2.properties
>>
>>The contents of this file are as follows:
>>[shm]
>>file=/usr/local/jakarta-tomcat-4.1.27/logs/shm.file
>>size=1048576
>>
>># Example unixsocket channel.
>>[channel.un:unixsocket]
>>file=/usr/local/jakarta-tomcat-4.1.27/work/jk2_tomcat.socket
>>
>># define the worker
>>[ajp13:unixsocket]
>>channel=channel.un:unixsocket
>>
>>Any ideas?
>>
>>Thx,
>>Chuck
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>  
>

Yea, I symbolically linked it there as well, but still nada. Will it not 
follow symbolic links?

Thx,
CC


Re: Error Finding config file: workers2.properties

Posted by Rhugga <to...@echeeba.com>.
Duncan Smith wrote:

>I had same problem.
>I found that if the workers2.properties file was supposed to be in
>{apache-home}/conf/
>
>Good luck :-)
>Duncan Smith
>Decker Telecom Ltd
>
>Rhugga wrote:
>
>  
>
>>I get this error during tomcat 4.2.27 startup:
>>
>>INFO: Starting Coyote HTTP/1.1 on port 8443
>>[Fri Sep 26 07:54:52 2003] (error ) [jk_config_file.c (279)]
>>config.update(): Can't find config file ${serverRoot}/conf/workers2.pr
>>operties
>>[Fri Sep 26 07:54:52 2003] ( info ) [jk_config.c (251)]
>>config.setAttribute() Error setting config: file ${serverRoot}/conf/workers
>>2.properties
>>[Fri Sep 26 07:54:52 2003] ( info ) [jk_logger_file.c (184)]
>>Initializing log file stderr
>>[Fri Sep 26 07:54:52 2003] (error ) [jk_shm.c (333)]  shm.init(): No file
>>[Fri Sep 26 07:54:52 2003] ( info ) [jk_workerEnv.c (403)]
>>workerEnv.init() ok ${serverRoot}/conf/workers2.properties
>>
>>Here is the connector definition from server.xml:
>>
>><!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
>><Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>>      port="8443" minProcessors="5" maxProcessors="75"
>>      enableLookups="true" serverRoot="/usr/local/jakarta-tomcat-4.1.27"
>>      acceptCount="100" debug="5" scheme="https" secure="true"
>>      useURIValidationHack="false" disableUploadTimeout="true">
>>     <Factory
>>         className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
>>         clientAuth="false" protocol="TLS" />
>>     <parameter>
>>         <name>serverRoot</name>
>>         <value>/usr/local/jakarta-tomcat-4.1.27</value>
>>     </parameter>
>></Connector>
>>
>>My workers2.properties file is here:
>>ganja:/usr/local/tomcat/conf #ls -l
>>/usr/local/jakarta-tomcat-4.1.27/conf/workers2.properties
>>-rw-r--r--   1 tomcat   httpd        258 Aug 30 23:14
>>/usr/local/jakarta-tomcat-4.1.27/conf/workers2.properties
>>
>>The contents of this file are as follows:
>>[shm]
>>file=/usr/local/jakarta-tomcat-4.1.27/logs/shm.file
>>size=1048576
>>
>># Example unixsocket channel.
>>[channel.un:unixsocket]
>>file=/usr/local/jakarta-tomcat-4.1.27/work/jk2_tomcat.socket
>>
>># define the worker
>>[ajp13:unixsocket]
>>channel=channel.un:unixsocket
>>
>>Any ideas?
>>
>>Thx,
>>Chuck
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>  
>

Yea, I symbolically linked it there as well, but still nada. Will it not 
follow symbolic links?

Thx,
CC


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


Re: Error Finding config file: workers2.properties

Posted by Duncan Smith <ds...@deckertelecom.net>.
I had same problem.
I found that if the workers2.properties file was supposed to be in
{apache-home}/conf/

Good luck :-)
Duncan Smith
Decker Telecom Ltd

Rhugga wrote:

> I get this error during tomcat 4.2.27 startup:
>
> INFO: Starting Coyote HTTP/1.1 on port 8443
> [Fri Sep 26 07:54:52 2003] (error ) [jk_config_file.c (279)]
> config.update(): Can't find config file ${serverRoot}/conf/workers2.pr
> operties
> [Fri Sep 26 07:54:52 2003] ( info ) [jk_config.c (251)]
> config.setAttribute() Error setting config: file ${serverRoot}/conf/workers
> 2.properties
> [Fri Sep 26 07:54:52 2003] ( info ) [jk_logger_file.c (184)]
> Initializing log file stderr
> [Fri Sep 26 07:54:52 2003] (error ) [jk_shm.c (333)]  shm.init(): No file
> [Fri Sep 26 07:54:52 2003] ( info ) [jk_workerEnv.c (403)]
> workerEnv.init() ok ${serverRoot}/conf/workers2.properties
>
> Here is the connector definition from server.xml:
>
> <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>       port="8443" minProcessors="5" maxProcessors="75"
>       enableLookups="true" serverRoot="/usr/local/jakarta-tomcat-4.1.27"
>       acceptCount="100" debug="5" scheme="https" secure="true"
>       useURIValidationHack="false" disableUploadTimeout="true">
>      <Factory
>          className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
>          clientAuth="false" protocol="TLS" />
>      <parameter>
>          <name>serverRoot</name>
>          <value>/usr/local/jakarta-tomcat-4.1.27</value>
>      </parameter>
> </Connector>
>
> My workers2.properties file is here:
> ganja:/usr/local/tomcat/conf #ls -l
> /usr/local/jakarta-tomcat-4.1.27/conf/workers2.properties
> -rw-r--r--   1 tomcat   httpd        258 Aug 30 23:14
> /usr/local/jakarta-tomcat-4.1.27/conf/workers2.properties
>
> The contents of this file are as follows:
> [shm]
> file=/usr/local/jakarta-tomcat-4.1.27/logs/shm.file
> size=1048576
>
> # Example unixsocket channel.
> [channel.un:unixsocket]
> file=/usr/local/jakarta-tomcat-4.1.27/work/jk2_tomcat.socket
>
> # define the worker
> [ajp13:unixsocket]
> channel=channel.un:unixsocket
>
> Any ideas?
>
> Thx,
> Chuck
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


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


Re: Error Finding config file: workers2.properties

Posted by Duncan Smith <ds...@deckertelecom.net>.
I had same problem.
I found that if the workers2.properties file was supposed to be in
{apache-home}/conf/

Good luck :-)
Duncan Smith
Decker Telecom Ltd

Rhugga wrote:

> I get this error during tomcat 4.2.27 startup:
>
> INFO: Starting Coyote HTTP/1.1 on port 8443
> [Fri Sep 26 07:54:52 2003] (error ) [jk_config_file.c (279)]
> config.update(): Can't find config file ${serverRoot}/conf/workers2.pr
> operties
> [Fri Sep 26 07:54:52 2003] ( info ) [jk_config.c (251)]
> config.setAttribute() Error setting config: file ${serverRoot}/conf/workers
> 2.properties
> [Fri Sep 26 07:54:52 2003] ( info ) [jk_logger_file.c (184)]
> Initializing log file stderr
> [Fri Sep 26 07:54:52 2003] (error ) [jk_shm.c (333)]  shm.init(): No file
> [Fri Sep 26 07:54:52 2003] ( info ) [jk_workerEnv.c (403)]
> workerEnv.init() ok ${serverRoot}/conf/workers2.properties
>
> Here is the connector definition from server.xml:
>
> <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>       port="8443" minProcessors="5" maxProcessors="75"
>       enableLookups="true" serverRoot="/usr/local/jakarta-tomcat-4.1.27"
>       acceptCount="100" debug="5" scheme="https" secure="true"
>       useURIValidationHack="false" disableUploadTimeout="true">
>      <Factory
>          className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
>          clientAuth="false" protocol="TLS" />
>      <parameter>
>          <name>serverRoot</name>
>          <value>/usr/local/jakarta-tomcat-4.1.27</value>
>      </parameter>
> </Connector>
>
> My workers2.properties file is here:
> ganja:/usr/local/tomcat/conf #ls -l
> /usr/local/jakarta-tomcat-4.1.27/conf/workers2.properties
> -rw-r--r--   1 tomcat   httpd        258 Aug 30 23:14
> /usr/local/jakarta-tomcat-4.1.27/conf/workers2.properties
>
> The contents of this file are as follows:
> [shm]
> file=/usr/local/jakarta-tomcat-4.1.27/logs/shm.file
> size=1048576
>
> # Example unixsocket channel.
> [channel.un:unixsocket]
> file=/usr/local/jakarta-tomcat-4.1.27/work/jk2_tomcat.socket
>
> # define the worker
> [ajp13:unixsocket]
> channel=channel.un:unixsocket
>
> Any ideas?
>
> Thx,
> Chuck
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Error Finding config file: workers2.properties

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
> INFO: Starting Coyote HTTP/1.1 on port 8443
> [Fri Sep 26 07:54:52 2003] (error ) [jk_config_file.c (279)]
> config.update(): Can't find config file ${serverRoot}/conf/workers2.pr
> operties
> [Fri Sep 26 07:54:52 2003] ( info ) [jk_config.c (251)]
> config.setAttribute() Error setting config: file
${serverRoot}/conf/workers
> 2.properties
> [Fri Sep 26 07:54:52 2003] ( info ) [jk_logger_file.c (184)]
> Initializing log file stderr
> [Fri Sep 26 07:54:52 2003] (error ) [jk_shm.c (333)]  shm.init(): No file
> [Fri Sep 26 07:54:52 2003] ( info ) [jk_workerEnv.c (403)]
> workerEnv.init() ok ${serverRoot}/conf/workers2.properties

This seams to be a still present bug of mod_jk2 java sources. Aparently, the
only way to define that property, "serverRoot" is to define and export it as
an environment variable in one of the satrtup scripts, "catalina.sh" or
"startup.sh".

Nix.


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


Error Finding config file: workers2.properties

Posted by Rhugga <to...@echeeba.com>.
I get this error during tomcat 4.2.27 startup:

INFO: Starting Coyote HTTP/1.1 on port 8443
[Fri Sep 26 07:54:52 2003] (error ) [jk_config_file.c (279)] 
config.update(): Can't find config file ${serverRoot}/conf/workers2.pr
operties
[Fri Sep 26 07:54:52 2003] ( info ) [jk_config.c (251)] 
config.setAttribute() Error setting config: file ${serverRoot}/conf/workers
2.properties
[Fri Sep 26 07:54:52 2003] ( info ) [jk_logger_file.c (184)] 
Initializing log file stderr
[Fri Sep 26 07:54:52 2003] (error ) [jk_shm.c (333)]  shm.init(): No file
[Fri Sep 26 07:54:52 2003] ( info ) [jk_workerEnv.c (403)] 
workerEnv.init() ok ${serverRoot}/conf/workers2.properties

Here is the connector definition from server.xml:

<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
      port="8443" minProcessors="5" maxProcessors="75"
      enableLookups="true" serverRoot="/usr/local/jakarta-tomcat-4.1.27"
      acceptCount="100" debug="5" scheme="https" secure="true"
      useURIValidationHack="false" disableUploadTimeout="true">
     <Factory
         className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
         clientAuth="false" protocol="TLS" />
     <parameter>
         <name>serverRoot</name>
         <value>/usr/local/jakarta-tomcat-4.1.27</value>
     </parameter>
</Connector>

My workers2.properties file is here:
ganja:/usr/local/tomcat/conf #ls -l 
/usr/local/jakarta-tomcat-4.1.27/conf/workers2.properties
-rw-r--r--   1 tomcat   httpd        258 Aug 30 23:14 
/usr/local/jakarta-tomcat-4.1.27/conf/workers2.properties

The contents of this file are as follows:
[shm]
file=/usr/local/jakarta-tomcat-4.1.27/logs/shm.file
size=1048576

# Example unixsocket channel.
[channel.un:unixsocket]
file=/usr/local/jakarta-tomcat-4.1.27/work/jk2_tomcat.socket

# define the worker
[ajp13:unixsocket]
channel=channel.un:unixsocket

Any ideas?

Thx,
Chuck



Error Finding config file: workers2.properties

Posted by Rhugga <to...@echeeba.com>.
I get this error during tomcat 4.2.27 startup:

INFO: Starting Coyote HTTP/1.1 on port 8443
[Fri Sep 26 07:54:52 2003] (error ) [jk_config_file.c (279)] 
config.update(): Can't find config file ${serverRoot}/conf/workers2.pr
operties
[Fri Sep 26 07:54:52 2003] ( info ) [jk_config.c (251)] 
config.setAttribute() Error setting config: file ${serverRoot}/conf/workers
2.properties
[Fri Sep 26 07:54:52 2003] ( info ) [jk_logger_file.c (184)] 
Initializing log file stderr
[Fri Sep 26 07:54:52 2003] (error ) [jk_shm.c (333)]  shm.init(): No file
[Fri Sep 26 07:54:52 2003] ( info ) [jk_workerEnv.c (403)] 
workerEnv.init() ok ${serverRoot}/conf/workers2.properties

Here is the connector definition from server.xml:

<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
      port="8443" minProcessors="5" maxProcessors="75"
      enableLookups="true" serverRoot="/usr/local/jakarta-tomcat-4.1.27"
      acceptCount="100" debug="5" scheme="https" secure="true"
      useURIValidationHack="false" disableUploadTimeout="true">
     <Factory
         className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
         clientAuth="false" protocol="TLS" />
     <parameter>
         <name>serverRoot</name>
         <value>/usr/local/jakarta-tomcat-4.1.27</value>
     </parameter>
</Connector>

My workers2.properties file is here:
ganja:/usr/local/tomcat/conf #ls -l 
/usr/local/jakarta-tomcat-4.1.27/conf/workers2.properties
-rw-r--r--   1 tomcat   httpd        258 Aug 30 23:14 
/usr/local/jakarta-tomcat-4.1.27/conf/workers2.properties

The contents of this file are as follows:
[shm]
file=/usr/local/jakarta-tomcat-4.1.27/logs/shm.file
size=1048576

# Example unixsocket channel.
[channel.un:unixsocket]
file=/usr/local/jakarta-tomcat-4.1.27/work/jk2_tomcat.socket

# define the worker
[ajp13:unixsocket]
channel=channel.un:unixsocket

Any ideas?

Thx,
Chuck



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


Re: Tomcat and native libs.

Posted by Christopher Williams <cc...@ntlworld.com>.
I'm no Unix expert, but I believe that signal 11 is a segmentation fault
(i.e. you're accessing either an invalid memory address or one which you are
not allowed to use).  The most likely cause is a NULL pointer access.  What
you could try doing is handling signal 11 in your code.  In the remainder of
your native code you could set a global variable to the name of the current
function being executed and your signal handler could print this to STDOUT.
Then at least you can start to isolate where the problem is occurring.

Do something like the following:

#include <signal.h>
#include <siginfo.h>

char *g_currFn = "";

if (SIG_ERR == sigset(11, handler)) {
    // Bummer...
}
...

void handler(int sig) {
    // Print signal and offending function to STDERR
    psignal(sig, (const char *) g_currFn);
}

int myfunc(int) {
    g_currFn = "myfunc";
    ...
}


Something that is eminently possible is that your native code is relying on
a Java class that is, say, in $JAVA_HOME/jre/lib/ext and is being loaded by
the standard Java classloader but is not being loaded by the Tomcat loader.
In this case the call:
jclass clz = env->FindClass("example/somewhere/something/ClassIWant");
jmethodID mid = env->GetMethodID(clz, "<init>", "()V");

will access an invalid pointer and crash the virtual machine.  I know; I've
done it.

Hope this helps.

Chris.



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


Re: Tomcat and native libs.

Posted by Christopher Williams <cc...@ntlworld.com>.
I'm no Unix expert, but I believe that signal 11 is a segmentation fault
(i.e. you're accessing either an invalid memory address or one which you are
not allowed to use).  The most likely cause is a NULL pointer access.  What
you could try doing is handling signal 11 in your code.  In the remainder of
your native code you could set a global variable to the name of the current
function being executed and your signal handler could print this to STDOUT.
Then at least you can start to isolate where the problem is occurring.

Do something like the following:

#include <signal.h>
#include <siginfo.h>

char *g_currFn = "";

if (SIG_ERR == sigset(11, handler)) {
    // Bummer...
}
...

void handler(int sig) {
    // Print signal and offending function to STDERR
    psignal(sig, (const char *) g_currFn);
}

int myfunc(int) {
    g_currFn = "myfunc";
    ...
}


Something that is eminently possible is that your native code is relying on
a Java class that is, say, in $JAVA_HOME/jre/lib/ext and is being loaded by
the standard Java classloader but is not being loaded by the Tomcat loader.
In this case the call:
jclass clz = env->FindClass("example/somewhere/something/ClassIWant");
jmethodID mid = env->GetMethodID(clz, "<init>", "()V");

will access an invalid pointer and crash the virtual machine.  I know; I've
done it.

Hope this helps.

Chris.



RE: Re[2]: Tomcat and native libs.

Posted by Daniel Kowalik <da...@reuters.pl>.
Hi Anton, sorry i haven't replied earlier. The native code is ok. It
works perfectly without Tomcat. It's related to reloading web
application. I've actually worked it out. But by taking a bit differen
way.

Bests
daniel

-----Original Message-----
From: Anton Tagunov [mailto:atagunov@mail.cnt.ru] 
Sent: 20 września 2003 18:58
To: Tomcat Users List
Subject: Re[2]: Tomcat and native libs.


Hello Daniel!

Can it be that the native code is plainly crashing?
Or may it be related to reloading a web application?

DK> Unexpected Signal : 11 occurred at PC=0xFE0EAFE8 Function=[Unknown. 
DK> Nearest: JVM_FindPrimitiveClass+0x1BB8] 
DK> Library=/usr/j2sdk1.4.1_04/jre/lib/sparc/client/libjvm.so
DK> Current Java thread:

Anton


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


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


Re[2]: Tomcat and native libs.

Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello Daniel!

Can it be that the native code is plainly crashing?
Or may it be related to reloading a web application?

DK> Unexpected Signal : 11 occurred at PC=0xFE0EAFE8
DK> Function=[Unknown. Nearest: JVM_FindPrimitiveClass+0x1BB8]
DK> Library=/usr/j2sdk1.4.1_04/jre/lib/sparc/client/libjvm.so
DK> Current Java thread:

Anton


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


Re[2]: Tomcat and native libs.

Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello Daniel!

Can it be that the native code is plainly crashing?
Or may it be related to reloading a web application?

DK> Unexpected Signal : 11 occurred at PC=0xFE0EAFE8
DK> Function=[Unknown. Nearest: JVM_FindPrimitiveClass+0x1BB8]
DK> Library=/usr/j2sdk1.4.1_04/jre/lib/sparc/client/libjvm.so
DK> Current Java thread:

Anton


RE: Tomcat and native libs.

Posted by Daniel Kowalik <da...@reuters.pl>.
Hi,
>Have you tried synchronizing access to the native methods?  Yes.

>Does Tomcat and the JVM crash when you only have one servlet using the
native code? 
Yes, everything crashes when the first servlet gets the instance of
shared object. Lets say the shared object is called Data. The servlet
gets the Data instance by "Data data = Data.getInstance();" and in Data
object it looks like this: "private static Data instance = new Data();"
and then the getter method. Data in it's constructor tries to get access
to Tibco Rendezvous and create a session. And exactly at this moment
everything crashes.

>Alternatively, can you have two instances of the object so that it is
not shared? 
No, i need to have it like this. This shared object gets the data, which
is then shared among other servlets. 

>What are the messages printed by the JVM when it crashes?
Unexpected Signal : 11 occurred at PC=0xFE0EAFE8
Function=[Unknown. Nearest: JVM_FindPrimitiveClass+0x1BB8]
Library=/usr/j2sdk1.4.1_04/jre/lib/sparc/client/libjvm.so
Current Java thread:
Dynamic libraries:
0x10000 	/usr/j2sdk1.4.1_04/bin/java
0xff360000 	/usr/lib/libthread.so.1
0xff3a0000 	/usr/lib/libdl.so.1
0xff280000 	/usr/lib/libc.so.1
0xff350000 	/usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
0xfe000000 	/usr/j2sdk1.4.1_04/jre/lib/sparc/client/libjvm.so
0xff210000 	/usr/lib/libCrun.so.1
0xff1f0000 	/usr/lib/libsocket.so.1
0xff100000 	/usr/lib/libnsl.so.1
0xff1c0000 	/usr/lib/libm.so.1
0xff240000 	/usr/lib/libw.so.1
0xff0c0000 	/usr/lib/libmp.so.2
0xff090000
/usr/j2sdk1.4.1_04/jre/lib/sparc/native_threads/libhpi.so
0xff060000 	/usr/j2sdk1.4.1_04/jre/lib/sparc/libverify.so
0xff020000 	/usr/j2sdk1.4.1_04/jre/lib/sparc/libjava.so
0xfe7d0000 	/usr/j2sdk1.4.1_04/jre/lib/sparc/libzip.so
0xfe5a0000 	/usr/lib/locale/pl_PL.ISO8859-2/pl_PL.ISO8859-2.so.2
0xfa0c0000 	/usr/j2sdk1.4.1_04/jre/lib/sparc/libnet.so
0xefe80000 	/work/jni/solaris/libsass3jni.so  - This one is
suspected.
0xf11e0000 	/usr/lib/libposix4.so.1
0xf0f10000 	/usr/lib/libaio.so.1
Local Time = Fri Sep 19 11:28:06 2003
Elapsed Time = 9
#
# HotSpot Virtual Machine Error : 11
# Error ID : 4F530E43505002E6 01
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1_04-b01 mixed mode)
#
# An error report file has been saved as hs_err_pid871.log.
# Please refer to the file for further information.
#


>Are you sure that your native library is even beng found and loaded? 
It looks like. JVM says it's loaded. See the crash message. I've marked
the suspected library.

BTW, i've patched the system as it was suggested by sun. The funny thing
is that it runs without any problems if used without Tomcat. 

Bests
Daniel


-----Original Message-----
From: Christopher Williams [mailto:ccwilliams3@ntlworld.com] 
Sent: 19 września 2003 11:21
To: Tomcat Users List
Subject: Re: Tomcat and native libs.


  What are the messages printed by the JVM when it crashes?  Are you
sure that your native library is even beng found and loaded?



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


RE: Tomcat and native libs.

Posted by Daniel Kowalik <da...@reuters.pl>.
Hi,
>Have you tried synchronizing access to the native methods?  Yes.

>Does Tomcat and the JVM crash when you only have one servlet using the
native code? 
Yes, everything crashes when the first servlet gets the instance of
shared object. Lets say the shared object is called Data. The servlet
gets the Data instance by "Data data = Data.getInstance();" and in Data
object it looks like this: "private static Data instance = new Data();"
and then the getter method. Data in it's constructor tries to get access
to Tibco Rendezvous and create a session. And exactly at this moment
everything crashes.

>Alternatively, can you have two instances of the object so that it is
not shared? 
No, i need to have it like this. This shared object gets the data, which
is then shared among other servlets. 

>What are the messages printed by the JVM when it crashes?
Unexpected Signal : 11 occurred at PC=0xFE0EAFE8
Function=[Unknown. Nearest: JVM_FindPrimitiveClass+0x1BB8]
Library=/usr/j2sdk1.4.1_04/jre/lib/sparc/client/libjvm.so
Current Java thread:
Dynamic libraries:
0x10000 	/usr/j2sdk1.4.1_04/bin/java
0xff360000 	/usr/lib/libthread.so.1
0xff3a0000 	/usr/lib/libdl.so.1
0xff280000 	/usr/lib/libc.so.1
0xff350000 	/usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
0xfe000000 	/usr/j2sdk1.4.1_04/jre/lib/sparc/client/libjvm.so
0xff210000 	/usr/lib/libCrun.so.1
0xff1f0000 	/usr/lib/libsocket.so.1
0xff100000 	/usr/lib/libnsl.so.1
0xff1c0000 	/usr/lib/libm.so.1
0xff240000 	/usr/lib/libw.so.1
0xff0c0000 	/usr/lib/libmp.so.2
0xff090000
/usr/j2sdk1.4.1_04/jre/lib/sparc/native_threads/libhpi.so
0xff060000 	/usr/j2sdk1.4.1_04/jre/lib/sparc/libverify.so
0xff020000 	/usr/j2sdk1.4.1_04/jre/lib/sparc/libjava.so
0xfe7d0000 	/usr/j2sdk1.4.1_04/jre/lib/sparc/libzip.so
0xfe5a0000 	/usr/lib/locale/pl_PL.ISO8859-2/pl_PL.ISO8859-2.so.2
0xfa0c0000 	/usr/j2sdk1.4.1_04/jre/lib/sparc/libnet.so
0xefe80000 	/work/jni/solaris/libsass3jni.so  - This one is
suspected.
0xf11e0000 	/usr/lib/libposix4.so.1
0xf0f10000 	/usr/lib/libaio.so.1
Local Time = Fri Sep 19 11:28:06 2003
Elapsed Time = 9
#
# HotSpot Virtual Machine Error : 11
# Error ID : 4F530E43505002E6 01
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1_04-b01 mixed mode)
#
# An error report file has been saved as hs_err_pid871.log.
# Please refer to the file for further information.
#


>Are you sure that your native library is even beng found and loaded? 
It looks like. JVM says it's loaded. See the crash message. I've marked
the suspected library.

BTW, i've patched the system as it was suggested by sun. The funny thing
is that it runs without any problems if used without Tomcat. 

Bests
Daniel


-----Original Message-----
From: Christopher Williams [mailto:ccwilliams3@ntlworld.com] 
Sent: 19 września 2003 11:21
To: Tomcat Users List
Subject: Re: Tomcat and native libs.


  What are the messages printed by the JVM when it crashes?  Are you
sure that your native library is even beng found and loaded?



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


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


Re: Tomcat and native libs.

Posted by Christopher Williams <cc...@ntlworld.com>.
Have you tried synchronizing access to the native methods?  Does Tomcat and
the JVM crash when you only have one servlet using the native code?
Alternatively, can you have two instances of the object so that it is not
shared?  What are the messages printed by the JVM when it crashes?  Are you
sure that your native library is even beng found and loaded?



Re: Tomcat and native libs.

Posted by Christopher Williams <cc...@ntlworld.com>.
Have you tried synchronizing access to the native methods?  Does Tomcat and
the JVM crash when you only have one servlet using the native code?
Alternatively, can you have two instances of the object so that it is not
shared?  What are the messages printed by the JVM when it crashes?  Are you
sure that your native library is even beng found and loaded?



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


Tomcat and native libs.

Posted by Daniel Kowalik <da...@reuters.pl>.
Hi, i've got a simple application with a couple of servlets using one
shared object. The problem is that this shared object uses native libs
and there is no way to avoid it. And whenever servlet gets the instance
of this shared object, Tomcat crashes and also crashes the whole JVM.
When i use this obejct outside tomcat, in a standalone application,
everything is ok. I've gave it a try  on solaris and windows and in both
cases i've got the same results. Of course native libs are for sol and
win respectively.  And here is the question: shall i somehow inform
Tomcat about native libs? (Theese are already on LD_LIBRARY_PATH
variable). 


Bests
daniel


Tomcat and native libs.

Posted by Daniel Kowalik <da...@reuters.pl>.
Hi, i've got a simple application with a couple of servlets using one
shared object. The problem is that this shared object uses native libs
and there is no way to avoid it. And whenever servlet gets the instance
of this shared object, Tomcat crashes and also crashes the whole JVM.
When i use this obejct outside tomcat, in a standalone application,
everything is ok. I've gave it a try  on solaris and windows and in both
cases i've got the same results. Of course native libs are for sol and
win respectively.  And here is the question: shall i somehow inform
Tomcat about native libs? (Theese are already on LD_LIBRARY_PATH
variable). 


Bests
daniel


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