You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rob Shortt <ro...@infointeractive.com> on 2003/04/02 20:27:05 UTC
mod_jk2 inprocess tomcat / apache
Hi everyone. This is a long message so please bear with me. :)
I am attempting to get tomcat running 'inprocess' from mod_jk2 under
apache on solaris. I am getting random results, which is very annoying,
hopefully someone can help.
Versions:
os: sparc solaris 8, 32 bit
apache-2.0.44
tomcat-4.1.24
mod_jk2 from jakarta-tomcat-connectors-4.1.24-src
java - j2se-1.4.1-b21
I wish to use the inprocess method of running tomcat because I would
like my users to not have to maintain a 'running' tomcat server as well
as apache.
I have a few problems, which probably stem from a larger problem.
When I start apache, tomcat doesn't always get started, but does
sometimes! When starting apache I see in the error_log:
[Wed Apr 02 13:59:13 2003] [error] workerEnv.initChannel() init failed
for channel.jni:jni
[Wed Apr 02 13:59:13 2003] [error] workerEnv.initWorkers() init failed
for worker.jni:onStartup
[Wed Apr 02 13:59:13 2003] [error] workerEnv.initWorkers() init failed
for worker.jni:onShutdown
[Wed Apr 02 13:59:13 2003] [error] mod_jk child init 1 -2
I see a group of these messages for every apache thread that is started.
Most of the time I get a bunch of these and tomcat does not get
started. I then stop apache, then restart it... if I am lucky I may
only get a couple groups of these failure messages then a success,
tomcat gets started:
[Wed Apr 02 14:01:00 2003] [error] workerEnv.initChannel() init failed
for channel.jni:jni
[Wed Apr 02 14:01:00 2003] [error] workerEnv.initWorkers() init failed
for worker.jni:onStartup
[Wed Apr 02 14:01:00 2003] [error] workerEnv.initWorkers() init failed
for worker.jni:onShutdown
TomcatStarter: main()
Try org.apache.tomcat.startup.Main
Try org.apache.catalina.startup.BootstrapService
[Wed Apr 02 14:01:01 2003] [error] mod_jk child init 1 0
Starting org.apache.catalina.startup.BootstrapService
Created catalinaLoader in: /opt/jakarta-tomcat-4.1.24/server/lib
Apr 2, 2003 2:01:05 PM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Apr 2, 2003 2:01:05 PM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Apr 2, 2003 2:01:07 PM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Apr 2, 2003 2:01:42 PM org.apache.jk.apr.AprImpl init
INFO: JK2: Initialized apr
Apr 2, 2003 2:01:42 PM org.apache.jk.common.ChannelJni init
INFO: JK2: listening on channel.jni:jni
Apr 2, 2003 2:01:42 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Apr 2, 2003 2:01:42 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=3/230
config=/opt/jakarta-tomcat-4.1.24/conf/jk2.properties
I also see activity in my tomcat based application log. I have
identical results with the examples context.
Now, when it DOES load I only occasionally get a valid response. I hit
http://localhost/examples/servlets/index.html and see the page
displayed, only with a few broken images. I do a shift-reload and some
of the proken images appear, but others become broken. I hit
shift-reload a few times and I get the occasional internal server error
from apache. When either of these occur I see in the error_log:
[Wed Apr 02 14:14:37 2003] [error] lb_worker.service() all workers in
error or disabled state
[Wed Apr 02 14:14:37 2003] [error] mod_jk.handler() Error connecting to
tomcat 120000
[Wed Apr 02 14:14:37 2003] [error] lb_worker.service() all workers in
error or disabled state
[Wed Apr 02 14:14:37 2003] [error] mod_jk.handler() Error connecting to
tomcat 120000
I have read other people's posts about mod_jk2 and inprocess but have
not seen any reported problems such as these.
Now for some information on my configuration.
workers2.properties:
--------------------
[shm:]
info=Scoreboard.
file=/opt/apache/logs/jk2.shm
size=1000000
debug=9
disabled=0
[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess
[vm:]
info=Parameters used to load a JVM in the server process
JVM=/opt/j2se/jre/lib/sparc/libjvm.so
classpath=/opt/jakarta-tomcat-4.1.24/bin/tomcat-jni.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/catalina-ant.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/catalina.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/commons-beanutils.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/commons-digester.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/commons-logging.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/commons-modeler.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/jaas.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/jakarta-regexp-1.2.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/mx4j-jmx.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/servlets-cgi.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/servlets-common.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/servlets-default.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/servlets-invoker.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/servlets-manager.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/servlets-webdav.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/tomcat-coyote.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/tomcat-http11.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/tomcat-jk.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/tomcat-jk2.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/tomcat-util.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/tomcat-warp.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/activation.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/ant.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/commons-collections.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/commons-dbcp.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/commons-logging-api.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/commons-pool.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/jasper-compiler.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/jasper-runtime.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/jdbc2_0-stdext.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/jndi.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/jta.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/mail.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/naming-common.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/naming-factory.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/naming-resources.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/servlet.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/endorsed/xercesImpl.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/endorsed/xmlParserAPIs.jar
OPT=-Dtomcat.home=/opt/jakarta-tomcat-4.1.24
OPT=-Dcatalina.home=/opt/jakarta-tomcat-4.1.24
OPT=-Xmx128M
OPT=-Djava.compiler=/opt/j2se/bin/java
# yes, I know that's ugly. I had to pile in the classpath stuff out of
frustration because class not found errors kept comming up
[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
stdout=${serverRoot}/logs/stdout.log
stderr=${serverRoot}/logs/stderr.log
[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop
[uri:/examples/*]
info=Example webapp in the default context.
context=/examples
debug=9
jk2.properties:
---------------
handler.list=apr,request,container,channelJni
apr.jniModeSo=inprocess
shm.file=/opt/apache/logs/jk2.shm
In my server.xml I do have my Coyote/JK2 AJP 1.3 Connector listening on
port 8009, the default. I am not even sure if I need this for inprocess
but I am not aware of how else pache may communicate with tomcat. Can
anyone shed some light here?
Thanks for reading this!
-Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re:
DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1443/Servi
ces"..... Failured... Please, help me!
Posted by ba...@go.com.
Are you providing a user name and password?
I am not familiar with this driver, but with the IBM DB2 driver a property
of prompt=false is also needed.
At 12:40 PM 4/3/2003 -0600, Victor Gonzalez wrote:
>The message is...
>
>java.sql.SQLException: Connection refused: connect
> at net.sourceforge.jtds.jdbc.TdsConnection.allocateTds(Unknown
>Source)
> at net.sourceforge.jtds.jdbc.TdsConnection.<init>(Unknown
>Source)
> at net.sourceforge.jtds.jdbc.Driver.connect(Unknown Source)
> at java.sql.DriverManager.getConnection(DriverManager.java:512)
> at java.sql.DriverManager.getConnection(DriverManager.java:171)
> at foo.Arteli.init(Arteli.java:25)
> at org.apache.jsp.Arteli_jsp._jspService(Arteli_jsp.java:52)
> at
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
>Somebody why??
>
>The files is:
>Empresa.java
>public class Empresa {
> String foo = "Not Connected";
> int bar = -1;
> Connection conn;
> public void init() {
> try{
> conn = null;
> Class.forName("net.sourceforge.jtds.jdbc.Driver");
> Connection conn =
>DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1443/Servic
>es","sa","");
> Statement stmt = conn.createStatement();
> ResultSet rst = stmt.executeQuery("SELECT * FROM consecutivos");
> if(rst.next()){
> foo=rst.getString(1);
> bar=rst.getInt(2);
> }
> conn.close();
> }
> catch(Exception e){
> e.printStackTrace();
> }
> }
> public String getFoo() { return foo; }
> public int getBar() { return bar;}
>}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1443/Services".....
Failured... Please, help me!
Posted by Kwok Peng Tuck <pe...@makmal.net>.
Check and see if the password and username is correct for the database
you setup.
Victor Gonzalez wrote:
>The message is...
>
>java.sql.SQLException: Connection refused: connect
> at net.sourceforge.jtds.jdbc.TdsConnection.allocateTds(Unknown
>Source)
> at net.sourceforge.jtds.jdbc.TdsConnection.<init>(Unknown
>Source)
> at net.sourceforge.jtds.jdbc.Driver.connect(Unknown Source)
> at java.sql.DriverManager.getConnection(DriverManager.java:512)
> at java.sql.DriverManager.getConnection(DriverManager.java:171)
> at foo.Arteli.init(Arteli.java:25)
> at org.apache.jsp.Arteli_jsp._jspService(Arteli_jsp.java:52)
> at
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
>Somebody why??
>
>The files is:
>Empresa.java
>public class Empresa {
> String foo = "Not Connected";
> int bar = -1;
> Connection conn;
> public void init() {
> try{
> conn = null;
> Class.forName("net.sourceforge.jtds.jdbc.Driver");
> Connection conn =
>DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1443/Servic
>es","sa","");
> Statement stmt = conn.createStatement();
> ResultSet rst = stmt.executeQuery("SELECT * FROM consecutivos");
> if(rst.next()){
> foo=rst.getString(1);
> bar=rst.getInt(2);
> }
> conn.close();
> }
> catch(Exception e){
> e.printStackTrace();
> }
> }
> public String getFoo() { return foo; }
> public int getBar() { return bar;}
>}
>
>
>---------------------------------------------------------------------
>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
org/apache/jk/common/ChannelSocket.processConnection INFO: connection timeout rached.
Posted by Victor Gonzalez <vg...@cyberworks.com.mx>.
Hi guys,
Well, I will go to here point (alone, culeros!) but, I don't know
which parameter respect the timeout is necessary modify, if anyone is
very gentle to tell me, I will be very thankful, and I promise a cool
bear.
Regards,
I have...
W2k
Tomcat 4.1.18
IIS 5.0
SQL Server
Tomcat - SQL Server with jtds0.5.1
Tomcat - IIS with isapi_redirect.dll
Victor Gonzalez
***************
PD. The info message is only the message subject.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1443/Services"..... Failured... Please, help me!
Posted by Victor Gonzalez <vg...@cyberworks.com.mx>.
The message is...
java.sql.SQLException: Connection refused: connect
at net.sourceforge.jtds.jdbc.TdsConnection.allocateTds(Unknown
Source)
at net.sourceforge.jtds.jdbc.TdsConnection.<init>(Unknown
Source)
at net.sourceforge.jtds.jdbc.Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at foo.Arteli.init(Arteli.java:25)
at org.apache.jsp.Arteli_jsp._jspService(Arteli_jsp.java:52)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
Somebody why??
The files is:
Empresa.java
public class Empresa {
String foo = "Not Connected";
int bar = -1;
Connection conn;
public void init() {
try{
conn = null;
Class.forName("net.sourceforge.jtds.jdbc.Driver");
Connection conn =
DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1443/Servic
es","sa","");
Statement stmt = conn.createStatement();
ResultSet rst = stmt.executeQuery("SELECT * FROM consecutivos");
if(rst.next()){
foo=rst.getString(1);
bar=rst.getInt(2);
}
conn.close();
}
catch(Exception e){
e.printStackTrace();
}
}
public String getFoo() { return foo; }
public int getBar() { return bar;}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Anyone used jtds??
Posted by Victor Gonzalez <vg...@cyberworks.com.mx>.
Hi all,
I need a example to use a jtds, the explanation for me (I'm very
newbie!), the files confifuration, jsp and a class, well, If is is
possible.....
Regards,
Victor González
***************
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: jtds and connection examples.
Posted by Victor Gonzalez <vg...@cyberworks.com.mx>.
The jtds is for connection between Tomcat and SQL Server, and tnks by
the link, well, I hope now a sample of connection and recovery
information of it (jtds).
:)
-----Original Message-----
From: Kwok Peng Tuck [mailto:pengtuck@makmal.net]
Sent: Thursday, April 03, 2003 12:53 AM
To: Tomcat Users List
Subject: Re: jtds and connection examples.
Fortunately there is documentation for what you want and it is in the
link listed below.
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-howto.html
Included are sample configurations and a small class example.
What's jtds by the way ?
Hope it helps you out.
Victor Gonzalez wrote:
>Hi all,
> I'm really very newbie, I saw (in the list) many descriptions about
the
>database in the web.xml, and similar comments, well, I need to know,
how
>can I make it, ok, more specific, I have a tomcat and I want connect
>with SQL Server, well, I download the jtds 0.5.1 and put it in the
>c:\tomcat4.1.18\common\lib and put the jar in the classpath.... I think
>I'm ok, I check the documentation (???) and it isn't exist! Well, I
want
>(please, and I will be very thankful with you) a concise explication
>how-to create a connection a my database (SQL Server, of course),
create
>"database" in the web.xml and how I can recovery (with jtds, of course)
>from database with combinations with other requirements.... Well and
>syntax form...
>
>1. Example and explication of web.xml with sql server database
>declarations.
>2. Example and explication of file.class (or more simple, into a jsp
>file) to realize the connection with jtds.
>
>3. The recovery, well, I think check it in the javadoc, Really is more
>important the two first points (it is necessary like a base)
>
>Tnks, so much!!
>
>Regards,
>
>Victor Gonzalez
>***************
>
>
>---------------------------------------------------------------------
>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
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: jtds and connection examples.
Posted by Kwok Peng Tuck <pe...@makmal.net>.
Fortunately there is documentation for what you want and it is in the
link listed below.
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
Included are sample configurations and a small class example.
What's jtds by the way ?
Hope it helps you out.
Victor Gonzalez wrote:
>Hi all,
> I'm really very newbie, I saw (in the list) many descriptions about the
>database in the web.xml, and similar comments, well, I need to know, how
>can I make it, ok, more specific, I have a tomcat and I want connect
>with SQL Server, well, I download the jtds 0.5.1 and put it in the
>c:\tomcat4.1.18\common\lib and put the jar in the classpath.... I think
>I'm ok, I check the documentation (???) and it isn't exist! Well, I want
>(please, and I will be very thankful with you) a concise explication
>how-to create a connection a my database (SQL Server, of course), create
>"database" in the web.xml and how I can recovery (with jtds, of course)
>from database with combinations with other requirements.... Well and
>syntax form...
>
>1. Example and explication of web.xml with sql server database
>declarations.
>2. Example and explication of file.class (or more simple, into a jsp
>file) to realize the connection with jtds.
>
>3. The recovery, well, I think check it in the javadoc, Really is more
>important the two first points (it is necessary like a base)
>
>Tnks, so much!!
>
>Regards,
>
>Victor Gonzalez
>***************
>
>
>---------------------------------------------------------------------
>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
jtds and connection examples.
Posted by Victor Gonzalez <vg...@cyberworks.com.mx>.
Hi all,
I'm really very newbie, I saw (in the list) many descriptions about the
database in the web.xml, and similar comments, well, I need to know, how
can I make it, ok, more specific, I have a tomcat and I want connect
with SQL Server, well, I download the jtds 0.5.1 and put it in the
c:\tomcat4.1.18\common\lib and put the jar in the classpath.... I think
I'm ok, I check the documentation (???) and it isn't exist! Well, I want
(please, and I will be very thankful with you) a concise explication
how-to create a connection a my database (SQL Server, of course), create
"database" in the web.xml and how I can recovery (with jtds, of course)
from database with combinations with other requirements.... Well and
syntax form...
1. Example and explication of web.xml with sql server database
declarations.
2. Example and explication of file.class (or more simple, into a jsp
file) to realize the connection with jtds.
3. The recovery, well, I think check it in the javadoc, Really is more
important the two first points (it is necessary like a base)
Tnks, so much!!
Regards,
Victor Gonzalez
***************
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: mod_jk2 inprocess tomcat / apache
Posted by Mladen Turk <mt...@apache.org>.
> -----Original Message-----
> From: Rob Shortt [mailto:rob@infointeractive.com]
> Sent: 3. travanj 2003 0:01
> To: Tomcat Users List
> Subject: Re: mod_jk2 inprocess tomcat / apache
>
>
> Mladen Turk wrote:
> > Assure you have only one child process.
> > The inprocess won't work for prefork, and perchild mpm's.
> > It can work with worker mpm if you config Apache to use the single
> > child process.
> >
> > The problem is that the TC is started for every child and
> only one can
> > succeed to start (first). So that gives you those weird responses.
>
> Thanks for the insight, Mladen.
>
> I have recompiled apache with the worker mpm and in my
> httpd.conf I have: <IfModule worker.c>
> StartServers 1
> MaxClients 150
> MinSpareThreads 25
> MaxSpareThreads 75
> ThreadsPerChild 25
> MaxRequestsPerChild 0
> </IfModule>
>
Yes, but you still have MaxClients/ThreadsPerChild child processes,
meaning 6.
>
> Every second 3-5 of these messages spam the log,
> continuously. Tomcat
> is never loaded.
>
Your child JVM segfaults and makes apache to recycle the affected child.
See if you've correctly set the LD_LIBRARY_PATH (needs to find the
libapr, etc...).
Best way to check your config is to start the Apache in debug mode
(single process).
If you'll able to use the jk2 in that mode start playing with the
config.
Set the ThreadsPerChild to be equal to MaxClients, and then set the
ServerLimit to 1.
MT.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: mod_jk2 inprocess tomcat / apache
Posted by Rob Shortt <ro...@infointeractive.com>.
Mladen Turk wrote:
> Assure you have only one child process.
> The inprocess won't work for prefork, and perchild mpm's.
> It can work with worker mpm if you config Apache to use the single child
> process.
>
> The problem is that the TC is started for every child and only one can
> succeed to start (first).
> So that gives you those weird responses.
Thanks for the insight, Mladen.
I have recompiled apache with the worker mpm and in my httpd.conf I have:
<IfModule worker.c>
StartServers 1
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
'Just in case' I have also rebuilt mod_jk2. I then start apache and get
this in my error log:
[Wed Apr 02 17:48:39 2003] [error] jk2_init() Can't find child 7050 in
scoreboard
[Wed Apr 02 17:48:39 2003] [notice] Apache/2.0.44 (Unix) mod_ssl/2.0.44
OpenSSL/0.9.6g mod_jk2/2.0.3-dev configured -- resuming normal operations
[Wed Apr 02 17:48:40 2003] [error] jk2_init() Can't find child 7051 in
scoreboard
[Wed Apr 02 17:48:41 2003] [error] jk2_init() Can't find child 7052 in
scoreboard
[Wed Apr 02 17:48:41 2003] [error] jk2_init() Can't find child 7053 in
scoreboard
[Wed Apr 02 17:48:42 2003] [error] jk2_init() Can't find child 7054 in
scoreboard
[Wed Apr 02 17:48:42 2003] [error] jk2_init() Can't find child 7055 in
scoreboard
[Wed Apr 02 17:48:42 2003] [error] jk2_init() Can't find child 7056 in
scoreboard
[Wed Apr 02 17:48:42 2003] [error] jk2_init() Can't find child 7057 in
scoreboard
Every second 3-5 of these messages spam the log, continuously. Tomcat
is never loaded.
Question: Should the ScoreBoardFile directive in httpd.conf be the same
scoreboard file as the shm section in jk2.properties and
workers2.properties? As far as I know apache doesn't use ScoreBoardFile
for a single process setup, and either should mod_jk2. I tried mod_jk2
with the shm disabled in the two relevant files but it just complained.
Also I tried using the same file as ScoreBoardFile pointed to. None
of these compinations work.
Can anyone shed some light on why I am getting totally spammed with
these messages now? In testing I tried setting all of: MaxClients
MinSpareThreads MaxSpareThreads ThreadsPerChild to 1, then I only got
about 1 "can't find child" message per second.
Thanks again,
Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: mod_jk2 inprocess tomcat / apache
Posted by Mladen Turk <mt...@apache.org>.
> -----Original Message-----
> From: Rob Shortt [mailto:rob@infointeractive.com]
> Sent: 2. travanj 2003 20:27
> To: tomcat-user@jakarta.apache.org
> Subject: mod_jk2 inprocess tomcat / apache
>
>
>
> Hi everyone. This is a long message so please bear with me. :)
>
> I am attempting to get tomcat running 'inprocess' from mod_jk2 under
> apache on solaris. I am getting random results, which is
> very annoying,
> hopefully someone can help.
>
> Versions:
> os: sparc solaris 8, 32 bit
> apache-2.0.44
> tomcat-4.1.24
> mod_jk2 from jakarta-tomcat-connectors-4.1.24-src
> java - j2se-1.4.1-b21
>
Assure you have only one child process.
The inprocess won't work for prefork, and perchild mpm's.
It can work with worker mpm if you config Apache to use the single child
process.
The problem is that the TC is started for every child and only one can
succeed to start (first).
So that gives you those weird responses.
MT.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org