You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by tang jie <cr...@gmail.com> on 2006/04/27 08:06:46 UTC

jk can't connect to tomcat

I sometimes met the problem that apache can't connect to tomcat
through jk.Iwant to know why,the records of mod_jk.log  like:

[Wed Apr 26 18:46:54 2006] [error] ajp_service::jk_ajp_common.c (1758):
Error connecting to tomcat. Tomcat is probably not started or is listening
on the wrong port. worker=worker1 failed
[Wed Apr 26 18:46:54 2006] [info]  jk_handler::mod_jk.c (1985): Service
error=0 for worker=worker1
[Wed Apr 26 18:46:54 2006] [info]  jk_open_socket::jk_connect.c (444):
connect to 127.0.0.1:8010 failed with errno=111
[Wed Apr 26 18:46:54 2006] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(889): Failed opening socket to (127.0.0.1:8010) with (errno=111)
[Wed Apr 26 18:46:54 2006] [info]  ajp_send_request::jk_ajp_common.c (1248):
Error connecting to the Tomcat process.
[Wed Apr 26 18:46:54 2006] [info]  ajp_service::jk_ajp_common.c (1749):
Sending request to tomcat failed,  recoverable operation attempt=1
[Wed Apr 26 18:46:54 2006] [info]  jk_open_socket::jk_connect.c (444):
connect to 127.0.0.1:8010 failed with errno=111
[Wed Apr 26 18:46:54 2006] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(889): Failed opening socket to (127.0.0.1:8010) with (errno=111)
[Wed Apr 26 18:46:54 2006] [info]  ajp_send_request::jk_ajp_common.c (1248):
Error connecting to the Tomcat process.
[Wed Apr 26 18:46:54 2006] [info]  ajp_service::jk_ajp_common.c (1749):
Sending request to tomcat failed,  recoverable operation attempt=2
[Wed Apr 26 18:46:54 2006] [info]  jk_open_socket::jk_connect.c (444):
connect to 127.0.0.1:8010 failed with errno=111
[Wed Apr 26 18:46:54 2006] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(889): Failed opening socket to (127.0.0.1:8010) with (errno=111)
[Wed Apr 26 18:46:54 2006] [info]  ajp_send_request::jk_ajp_common.c (1248):
Error connecting to the Tomcat process.
[Wed Apr 26 18:46:54 2006] [info]  ajp_service::jk_ajp_common.c (1749):
Sending request to tomcat failed,  recoverable operation attempt=3

Re: jk can't connect to tomcat

Posted by tang jie <cr...@gmail.com>.
On 4/27/06, fooshyn <fo...@optegra.com.my> wrote:When the problem
occured,i visited Tomcat using www.xxx.com:8081.It can response successfully
and quickly.And the situation occured again a few minutes ago,I studied the
mod_jk.log,it has no log information

the application inside Tomcat that caused this to happen? Does Tomcat's
> Catalina log contain any error which might caused Tomcat to hang?


There are 2 Tomcat installed on that machine.My one uses  port  8006,8010,
8081,their configuration are:

<Server port="8006" shutdown="SHUTDOWN">

<!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8010"
               enableLookups="false" redirectPort="8443" protocol="AJP/1.3"
/>

<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector port="8081" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />

And I'm assuming that your Tomcat is running on port 8080 and not 8010
> right?
>
> My 2 cents


I studied the catalina.log,it contains the following information:
Apr 27, 2006 10:59:56 AM org.apache.jk.common.ChannelSocketprocessConnection
SEVERE: Error, processing connection
java.lang.IndexOutOfBoundsException
    at java.io.BufferedInputStream.read(BufferedInputStream.java:306)
    at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:607)
    at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:564)
    at org.apache.jk.common.ChannelSocket.processConnection(
ChannelSocket.java:672)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(
ChannelSocket.java:876)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
Apr 27, 2006 4:57:56 PM org.apache.jk.core.MsgContext action
WARNING: Error sending end packet
java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:518)
    at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:112)
    at org.apache.jk.core.MsgContext.action(MsgContext.java:293)
    at org.apache.coyote.Response.action(Response.java:182)
    at org.apache.coyote.Response.finish(Response.java:304)
    at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java
:281)
    at org.apache.catalina.connector.Response.finishResponse(Response.java
:483)
    at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:151)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
    at org.apache.jk.common.ChannelSocket.processConnection(
ChannelSocket.java:684)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(
ChannelSocket.java:876)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
Apr 27, 2006 4:57:56 PM org.apache.jk.core.MsgContext action
WARNING: Error sending end packet
java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:518)
    at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:112)
    at org.apache.jk.core.MsgContext.action(MsgContext.java:293)
    at org.apache.coyote.Response.action(Response.java:182)
    at org.apache.coyote.Response.finish(Response.java:304)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:204)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
    at org.apache.jk.common.ChannelSocket.processConnection(
ChannelSocket.java:684)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(
ChannelSocket.java:876)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)

Re: jk can't connect to tomcat

Posted by Rajeev Jha <jh...@gmail.com>.
set JK log level to debug. That may help trace the problem.
fooshyn wrote:

>Your settings seems ok to me (or maybe I missed out something). Could it be
>the application inside Tomcat that caused this to happen? Does Tomcat's
>Catalina log contain any error which might caused Tomcat to hang? 
>
>And I'm assuming that your Tomcat is running on port 8080 and not 8010
>right?
>
>My 2 cents
>
>FooShyn
>
>  
>


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


RE: jk can't connect to tomcat

Posted by fooshyn <fo...@optegra.com.my>.
Your settings seems ok to me (or maybe I missed out something). Could it be
the application inside Tomcat that caused this to happen? Does Tomcat's
Catalina log contain any error which might caused Tomcat to hang? 

And I'm assuming that your Tomcat is running on port 8080 and not 8010
right?

My 2 cents

FooShyn

-----Original Message-----
From: tang jie [mailto:crybird2002@gmail.com] 
Sent: Thursday, April 27, 2006 4:25 PM
To: Tomcat Users List
Subject: Re: jk can't connect to tomcat

The correspong setting in Tomcat::
<Connector port='8010" enableLookups="false" redirectPort="8443"
protocol="AJP/1.3">

workers.properties is:
worker.list=worker1

worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8010

The web server can run for about one day,but suddently it can't response to
the user's request.After I restartet tomcat ,it would run normally.I want to
know how it happened.What's wrong?




On 4/27/06, fooshyn <fo...@optegra.com.my> wrote:
>
>
> --Tomcat is probably not started or is listening on the wrong port--
>
> Probably the Tomcat or AJP port setting is wrong? Seems that your tomcat
> runs on port 8010...what are your settings for Tomcat AJP connector?
>
> HTH
>
> FooShyn
>
>
> -----Original Message-----
> From: tang jie [mailto:crybird2002@gmail.com]
> Sent: Thursday, April 27, 2006 2:07 PM
> To: users@tomcat.apache.org
> Subject: jk can't connect to tomcat
>
> I sometimes met the problem that apache can't connect to tomcat
> through jk.Iwant to know why,the records of mod_jk.log  like:
>
> [Wed Apr 26 18:46:54 2006] [error] ajp_service::jk_ajp_common.c (1758):
> Error connecting to tomcat. Tomcat is probably not started or is listening
> on the wrong port. worker=worker1 failed
> [Wed Apr 26 18:46:54 2006] [info]  jk_handler::mod_jk.c (1985): Service
> error=0 for worker=worker1
> [Wed Apr 26 18:46:54 2006] [info]  jk_open_socket::jk_connect.c (444):
> connect to 127.0.0.1:8010 failed with errno=111
> [Wed Apr 26 18:46:54 2006]
> [info]  ajp_connect_to_endpoint::jk_ajp_common.c
> (889): Failed opening socket to (127.0.0.1:8010) with (errno=111)
> [Wed Apr 26 18:46:54 2006] [info]  ajp_send_request::jk_ajp_common.c
> (1248):
> Error connecting to the Tomcat process.
> [Wed Apr 26 18:46:54 2006] [info]  ajp_service::jk_ajp_common.c (1749):
> Sending request to tomcat failed,  recoverable operation attempt=1
> [Wed Apr 26 18:46:54 2006] [info]  jk_open_socket::jk_connect.c (444):
> connect to 127.0.0.1:8010 failed with errno=111
> [Wed Apr 26 18:46:54 2006]
> [info]  ajp_connect_to_endpoint::jk_ajp_common.c
> (889): Failed opening socket to (127.0.0.1:8010) with (errno=111)
> [Wed Apr 26 18:46:54 2006] [info]  ajp_send_request::jk_ajp_common.c
> (1248):
> Error connecting to the Tomcat process.
> [Wed Apr 26 18:46:54 2006] [info]  ajp_service::jk_ajp_common.c (1749):
> Sending request to tomcat failed,  recoverable operation attempt=2
> [Wed Apr 26 18:46:54 2006] [info]  jk_open_socket::jk_connect.c (444):
> connect to 127.0.0.1:8010 failed with errno=111
> [Wed Apr 26 18:46:54 2006]
> [info]  ajp_connect_to_endpoint::jk_ajp_common.c
> (889): Failed opening socket to (127.0.0.1:8010) with (errno=111)
> [Wed Apr 26 18:46:54 2006] [info]  ajp_send_request::jk_ajp_common.c
> (1248):
> Error connecting to the Tomcat process.
> [Wed Apr 26 18:46:54 2006] [info]  ajp_service::jk_ajp_common.c (1749):
> Sending request to tomcat failed,  recoverable operation attempt=3
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


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


Re: jk can't connect to tomcat

Posted by tang jie <cr...@gmail.com>.
The correspong setting in Tomcat::
<Connector port='8010" enableLookups="false" redirectPort="8443"
protocol="AJP/1.3">

workers.properties is:
worker.list=worker1

worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8010

The web server can run for about one day,but suddently it can't response to
the user's request.After I restartet tomcat ,it would run normally.I want to
know how it happened.What's wrong?




On 4/27/06, fooshyn <fo...@optegra.com.my> wrote:
>
>
> --Tomcat is probably not started or is listening on the wrong port--
>
> Probably the Tomcat or AJP port setting is wrong? Seems that your tomcat
> runs on port 8010...what are your settings for Tomcat AJP connector?
>
> HTH
>
> FooShyn
>
>
> -----Original Message-----
> From: tang jie [mailto:crybird2002@gmail.com]
> Sent: Thursday, April 27, 2006 2:07 PM
> To: users@tomcat.apache.org
> Subject: jk can't connect to tomcat
>
> I sometimes met the problem that apache can't connect to tomcat
> through jk.Iwant to know why,the records of mod_jk.log  like:
>
> [Wed Apr 26 18:46:54 2006] [error] ajp_service::jk_ajp_common.c (1758):
> Error connecting to tomcat. Tomcat is probably not started or is listening
> on the wrong port. worker=worker1 failed
> [Wed Apr 26 18:46:54 2006] [info]  jk_handler::mod_jk.c (1985): Service
> error=0 for worker=worker1
> [Wed Apr 26 18:46:54 2006] [info]  jk_open_socket::jk_connect.c (444):
> connect to 127.0.0.1:8010 failed with errno=111
> [Wed Apr 26 18:46:54 2006]
> [info]  ajp_connect_to_endpoint::jk_ajp_common.c
> (889): Failed opening socket to (127.0.0.1:8010) with (errno=111)
> [Wed Apr 26 18:46:54 2006] [info]  ajp_send_request::jk_ajp_common.c
> (1248):
> Error connecting to the Tomcat process.
> [Wed Apr 26 18:46:54 2006] [info]  ajp_service::jk_ajp_common.c (1749):
> Sending request to tomcat failed,  recoverable operation attempt=1
> [Wed Apr 26 18:46:54 2006] [info]  jk_open_socket::jk_connect.c (444):
> connect to 127.0.0.1:8010 failed with errno=111
> [Wed Apr 26 18:46:54 2006]
> [info]  ajp_connect_to_endpoint::jk_ajp_common.c
> (889): Failed opening socket to (127.0.0.1:8010) with (errno=111)
> [Wed Apr 26 18:46:54 2006] [info]  ajp_send_request::jk_ajp_common.c
> (1248):
> Error connecting to the Tomcat process.
> [Wed Apr 26 18:46:54 2006] [info]  ajp_service::jk_ajp_common.c (1749):
> Sending request to tomcat failed,  recoverable operation attempt=2
> [Wed Apr 26 18:46:54 2006] [info]  jk_open_socket::jk_connect.c (444):
> connect to 127.0.0.1:8010 failed with errno=111
> [Wed Apr 26 18:46:54 2006]
> [info]  ajp_connect_to_endpoint::jk_ajp_common.c
> (889): Failed opening socket to (127.0.0.1:8010) with (errno=111)
> [Wed Apr 26 18:46:54 2006] [info]  ajp_send_request::jk_ajp_common.c
> (1248):
> Error connecting to the Tomcat process.
> [Wed Apr 26 18:46:54 2006] [info]  ajp_service::jk_ajp_common.c (1749):
> Sending request to tomcat failed,  recoverable operation attempt=3
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: jk can't connect to tomcat

Posted by fooshyn <fo...@optegra.com.my>.
--Tomcat is probably not started or is listening on the wrong port--

Probably the Tomcat or AJP port setting is wrong? Seems that your tomcat
runs on port 8010...what are your settings for Tomcat AJP connector?

HTH

FooShyn


-----Original Message-----
From: tang jie [mailto:crybird2002@gmail.com] 
Sent: Thursday, April 27, 2006 2:07 PM
To: users@tomcat.apache.org
Subject: jk can't connect to tomcat

I sometimes met the problem that apache can't connect to tomcat
through jk.Iwant to know why,the records of mod_jk.log  like:

[Wed Apr 26 18:46:54 2006] [error] ajp_service::jk_ajp_common.c (1758):
Error connecting to tomcat. Tomcat is probably not started or is listening
on the wrong port. worker=worker1 failed
[Wed Apr 26 18:46:54 2006] [info]  jk_handler::mod_jk.c (1985): Service
error=0 for worker=worker1
[Wed Apr 26 18:46:54 2006] [info]  jk_open_socket::jk_connect.c (444):
connect to 127.0.0.1:8010 failed with errno=111
[Wed Apr 26 18:46:54 2006] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(889): Failed opening socket to (127.0.0.1:8010) with (errno=111)
[Wed Apr 26 18:46:54 2006] [info]  ajp_send_request::jk_ajp_common.c (1248):
Error connecting to the Tomcat process.
[Wed Apr 26 18:46:54 2006] [info]  ajp_service::jk_ajp_common.c (1749):
Sending request to tomcat failed,  recoverable operation attempt=1
[Wed Apr 26 18:46:54 2006] [info]  jk_open_socket::jk_connect.c (444):
connect to 127.0.0.1:8010 failed with errno=111
[Wed Apr 26 18:46:54 2006] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(889): Failed opening socket to (127.0.0.1:8010) with (errno=111)
[Wed Apr 26 18:46:54 2006] [info]  ajp_send_request::jk_ajp_common.c (1248):
Error connecting to the Tomcat process.
[Wed Apr 26 18:46:54 2006] [info]  ajp_service::jk_ajp_common.c (1749):
Sending request to tomcat failed,  recoverable operation attempt=2
[Wed Apr 26 18:46:54 2006] [info]  jk_open_socket::jk_connect.c (444):
connect to 127.0.0.1:8010 failed with errno=111
[Wed Apr 26 18:46:54 2006] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(889): Failed opening socket to (127.0.0.1:8010) with (errno=111)
[Wed Apr 26 18:46:54 2006] [info]  ajp_send_request::jk_ajp_common.c (1248):
Error connecting to the Tomcat process.
[Wed Apr 26 18:46:54 2006] [info]  ajp_service::jk_ajp_common.c (1749):
Sending request to tomcat failed,  recoverable operation attempt=3


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