You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Paul George Constantine <pa...@stanford.edu> on 2005/07/01 19:35:41 UTC
Re: Apache2+jk+tomcat5.028+uri utf-8 [NOT] SOLVED
I'm using Fedora Core 4. I enabled port 8009 on my firewall. Here's the
relevant line from iptables -L
------
0 0 ACCEPT tcp -- any any anywhere anywhere
state NEW tcp dpt:8009
------
I used the lokkit utility to add it. Rebooted. Nothing. I had a typo in a
config file, but correcting that didn't work. I still get the browser error
------
The server is temporarily unable to service your request due to maintenance
downtime or capacity problems. Please try again later.
------
They call it a 503 error. And I'm still getting the same error in my mod_jk
log file.
Quoting Bruno Georges <Br...@glencore.com>:
> Hi
> Depending on your configuration and operating system, you may have some
> firewall restriction which prevents connecting to the port 8009.
> Please check this first, especially if you use XP SP2.
>
> Best Regards
> Bruno Georges
>
> Glencore International AG
> Tel. +41 41 709 3204
> Fax +41 41 709 3000
>
>
>
> Paul George
> Constantine To: Tomcat Users List
> <to...@jakarta.apache.org>
> <paulcon@stanfor cc:
> d.edu> Subject: Re:
> Apache2+jk+tomcat5.028+uri utf-8 SOLVED
>
> 01.07.05 09:35 Distribute:
> Please respond Personal? |-------|
> to "Tomcat Users | [ ] x |
> List" |-------|
>
>
>
>
>
>
> I've essentially done all of this, but I still get the following error in
> the browser:
> ---------------
> Internal Server Error
>
> The server encountered an internal error or misconfiguration and was
> unable
> to complete your request.
>
> Please contact the server administrator, root@localhost and inform them
> of
> the time the error occurred, and anything you might have done that may
> have
> caused the error.
>
> More information about this error may be available in the server error
> log.
> ---------------
>
> But there was no error in the server error log. In the jk log I get:
> ---------------
> [Sun Jun 26 15:55:45 2005] [info] jk_open_socket::jk_connect.c (433):
> connect to 127.0.0.1:8009 failed with errno=13
> [Sun Jun 26 15:55:45 2005] [info]
> ajp_connect_to_endpoint::jk_ajp_common.c
> (880): Failed opening socket to (127.0.0.1:8009) with (errno=13)
> [Sun Jun 26 15:55:45 2005] [info] ajp_send_request::jk_ajp_common.c
> (1239):
> Error connecting to the Tomcat process.
> [Sun Jun 26 15:55:45 2005] [info] ajp_service::jk_ajp_common.c (1737):
> Sending request to tomcat failed, recoverable operation attempt=1
> [Sun Jun 26 15:55:45 2005] [info] jk_open_socket::jk_connect.c (433):
> connect to 127.0.0.1:8009 failed with errno=13
> [Sun Jun 26 15:55:45 2005] [info]
> ajp_connect_to_endpoint::jk_ajp_common.c
> (880): Failed opening socket to (127.0.0.1:8009) with (errno=13)
> [Sun Jun 26 15:55:45 2005] [info] ajp_send_request::jk_ajp_common.c
> (1239):
> Error connecting to the Tomcat process.
> [Sun Jun 26 15:55:45 2005] [info] ajp_service::jk_ajp_common.c (1737):
> Sending request to tomcat failed, recoverable operation attempt=2
> [Sun Jun 26 15:55:45 2005] [info] jk_open_socket::jk_connect.c (433):
> connect to 127.0.0.1:8009 failed with errno=13
> [Sun Jun 26 15:55:45 2005] [info]
> ajp_connect_to_endpoint::jk_ajp_common.c
> (880): Failed opening socket to (127.0.0.1:8009) with (errno=13)
> [Sun Jun 26 15:55:45 2005] [info] ajp_send_request::jk_ajp_common.c
> (1239):
> Error connecting to the Tomcat process.
> [Sun Jun 26 15:55:45 2005] [info] ajp_service::jk_ajp_common.c (1737):
> Sending request to tomcat failed, recoverable operation attempt=3
> [Sun Jun 26 15:55:45 2005] [error] ajp_service::jk_ajp_common.c (1746):
> Error connecting to tomcat. Tomcat is probably not started or is
> listening
> on the wrong port. worker=ajp13w failed
> [Sun Jun 26 15:55:45 2005] ajp13w ill-conditioned 0.002938
> ------------
> I know that Tomcat is both started and listening on the correct port. I
> think it might have to do with permissions (errno=13 is a permission
> denied
> error), but I don't know what I need to change.
>
>
>
> Quoting Luis Sánchez Sánchez <lu...@gmail.com>:
>
> > Install mod_jk. I downloaded it from
> >
>
http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/linux/jk-1.2.10
> /
>
> >
> > Copy the jakarta-connector*.so to your apache2 modules directory.
> >
> > Activate your new module:
> >
> > I used this two files in /etc/apache/mods-avaliable:
> >
> > +-----------+
> > mod_jk.conf
> > +-----------+
> > # Where to find workers.properties
> > # Update this path to match your conf directory location (put
> > workers.properties next to httpd.conf)
> > JkWorkersFile /etc/apache2/workers.
>
> properties
> >
> > # Where to put jk logs
> > # Update this path to match your logs directory location (put
> mod_jk.log
> > next to access_log)
> > JkLogFile /var/log/apache2/mod_jk.log
> >
> > # Set the jk log level [debug/error/info]
> > JkLogLevel info
> >
> > # Select the log format
> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> >
> > #JkOptions +ForwardURICompatUnparsed
> >
> > #JkOptions +ForwardURIEscaped
> >
> > #JkOptions +ForwardURICompat
> >
> > # JkOptions indicate to send SSL KEY SIZE,
> > # la sgte linea la he comentado yo
> > JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> >
> > # JkRequestLogFormat set the request format
> > JkRequestLogFormat "%w %V %T"
> >
> > # Send everything for context /examples to worker named worker1 (ajp13)
> > JkMount /jsp-examples/* worker1
> > JkMount /blojsom/* worker1
> >
> >
> >
> > +-----------+
> > mod_jk.load
> > +-----------+
> > LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
> >
> >
> > Then link this files in /etc/apache2/mods-enabled/
> >
> >
> > Put a workers.property file in your apache2 conf dir (/etc/apache2 in
> my
> > linux). This is my workers.properties
> >
> > # Define 1 real worker using ajp13
> > worker.list=worker1
> > # Set properties for worker1 (ajp13)
> > worker.worker1.type=ajp13
> > worker.worker1.host=localhost
> > worker.worker1.port=8009
> > worker.worker1.lbfactor=50
> > worker.worker1.cachesize=10
> > worker.worker1.cache_timeout=600
> > worker.worker1.socket_keepalive=1
> > worker.worker1.reclycle_timeout=300
> >
> >
> >
> >
> > In tomcat you must use URIEncoding="UTF-8" in your connectors in
> > server.xml:
> >
> > (I forgot this connector ...)
> >
> > <Connector port="8009"
> > enableLookups="false" redirectPort="8443" debug="0"
> > protocol="AJP/1.3" URIEncoding="UTF-8"/>
> >
> >
> >
> > <Connector port="8080"
> > maxThreads="150" minSpareThreads="25"
> maxSpareThreads="75"
> > enableLookups="false" redirectPort="8443"
> > acceptCount="100"
> > debug="0" connectionTimeout="20000"
> > disableUploadTimeout="true" URIEncoding="UTF-8"/>
> >
> > Launch tomcat, launch apache2 force-reload.
> >
> >
> > --
> > Luis Sánchez Sánchez <lu...@gmail.com>
> >
> >
> > ---------------------------------------------------------------------
> > 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: Apache2+jk+tomcat5.028+uri utf-8 [NOT] SOLVED
Posted by "Steve Chen, Fu-Hsiang" <st...@intervideo.com>.
Paul:
I got the same error as you did and I posted my problem the other day
but no response at all. Seems not many people have this problem. I have
two machines both running fedora 3 and use the same configuration but
strangly, one of them have no problem using jk but the other just keep
giving same error. The only difference is the hardware but I doubt
hardware would cause jk malfunctioning. I attached the post I sent few
days back for you reference. Maybe we can discuss more about this later.
Regards
Steve
Here is my post:
----------------------------
I have searched every where and I don't find many people having the same
problem as me and I have installed JK and jboss on many machines and
only this one has problem. Here is the problem description:
I installed mod_jk1.2.10 on apache 2 to redirect dynamic contenet to
jboss 4. I followed a guide on jboss site and it works well on other
machine but this specific machine running fedora 3 just does not work. I
have verified that tomcat works well if I add port 8080 to the web
address. (for example http://localhost:8080/jspPage works but not
http://localhost/jspPage. The directory mapping is defied in
uriworkermap.properties) I attached all the configuration files and
error log in this post and hope some one can give me some idea.
Sorry for the long email ;) and thanks for your help
Steve
The jk error log message is as follows:
[Mon Jun 27 15:58:23 2005][info] jk_open_socket::jk_connect.c (433):
connect to 127.0.0.1:8009 failed with
errno=13
[Mon Jun 27 15:58:23 2005][info]
ajp_connect_to_endpoint::jk_ajp_common.c (877): Failed connecting to tomca
t. Tomcat is probably not started or is listening on the wrong host/port
(127.0.0.1:8009). Failed errno = 13
[Mon Jun 27 15:58:23 2005][info] ajp_send_request::jk_ajp_common.c
(1227): Error connecting to the Tomcat p
rocess.
[Mon Jun 27 15:58:23 2005][info] ajp_service::jk_ajp_common.c (1724):
Sending request to tomcat failed, re
coverable operation attempt=3
[Mon Jun 27 15:58:23 2005][error] ajp_service::jk_ajp_common.c (1733):
Error connecting to tomcat. Tomcat is
probably not started or is listening on the wrong port. worker=node2 failed
[Mon Jun 27 15:58:23 2005][info] service::jk_lb_worker.c (627): service
failed, worker node2 is in error st
ate
[Mon Jun 27 15:58:23 2005][info] service::jk_lb_worker.c (677): All
tomcat instances are busy or in error s
tate
[Mon Jun 27 15:58:23 2005]loadbalancer localhost 0.001220
[Mon Jun 27 15:58:23 2005][info] jk_handler::mod_jk.c (1975): Service
error=0 for worker=loadbalancer
httpd conf file:
# Include mod_jk configuration file
Include conf/mod-jk.conf
mod_jk.conf file
# Load mod_jk module
# Specify the filename of the mod_jk lib
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf/workers.properties
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
# JkOptions indicates to send SSK KEY SIZE
JkOptions +ForwardKeySize +ForwardURICompat
-ForwardDirectories
# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"
# Mount your applications
JkMount /application/* loadbalancer
# You can use external file for mount points.
# It will be checked for updates each 60 seconds.
# The format of the file is: /url=worker
# /examples/*=loadbalancer
JkMountFile conf/uriworkermap.properties
# Add shared memory.
# This directive is present with 1.2.10 and
# later versions of mod_jk, and is needed for
# for load balancing to work properly
JkShmFile logs/jk.shm # Add
jkstatus for managing runtime data
<Location /jkstatus/>
JkMount status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
*workers.properties file
*
# Define list of workers that will be used
# for mapping requests
worker.list=loadbalancer,status
# Define Node1
worker.node1.port=8009
worker.node1.host=localhost
worker.node1.type=ajp13
worker.node1.lbfactor=1
#worker.node1.local_worker=1 (1)
worker.node1.cachesize=10
# Define Node2
worker.node2.port=8009
worker.node2.host= localhost
worker.node2.type=ajp13
worker.node2.lbfactor=1
#worker.node2.local_worker=1 (1)
worker.node2.cachesize=10
# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=node1, node2
worker.loadbalancer.sticky_session=1
worker.loadbalancer.local_worker_only=1
worker.list=loadbalancer
# Status worker for managing load balancer
worker.status.type=status
uriworkermap.properties file
# Mount the Servlet context to the ajp13 worker
/jmx-console=loadbalancer
/jmx-console/*=loadbalancer
server.xml
<Engine name="jboss.web" defaultHost="localhost"
jvmRoute="node1">
.
</Engine>
jboss-service.xml
<attribute name="UseJK">true</attribute>
Paul George Constantine wrote:
>I'm using Fedora Core 4. I enabled port 8009 on my firewall. Here's the
>relevant line from iptables -L
>------
> 0 0 ACCEPT tcp -- any any anywhere anywhere
> state NEW tcp dpt:8009
>------
>I used the lokkit utility to add it. Rebooted. Nothing. I had a typo in a
>config file, but correcting that didn't work. I still get the browser error
>------
>The server is temporarily unable to service your request due to maintenance
>downtime or capacity problems. Please try again later.
>------
>They call it a 503 error. And I'm still getting the same error in my mod_jk
>log file.
>
>
>Quoting Bruno Georges <Br...@glencore.com>:
>
>
>
>>Hi
>>Depending on your configuration and operating system, you may have some
>>firewall restriction which prevents connecting to the port 8009.
>>Please check this first, especially if you use XP SP2.
>>
>>Best Regards
>>Bruno Georges
>>
>>Glencore International AG
>>Tel. +41 41 709 3204
>>Fax +41 41 709 3000
>>
>>
>>
>> Paul George
>> Constantine To: Tomcat Users List
>><to...@jakarta.apache.org>
>> <paulcon@stanfor cc:
>> d.edu> Subject: Re:
>>Apache2+jk+tomcat5.028+uri utf-8 SOLVED
>>
>> 01.07.05 09:35 Distribute:
>> Please respond Personal? |-------|
>> to "Tomcat Users | [ ] x |
>> List" |-------|
>>
>>
>>
>>
>>
>>
>>I've essentially done all of this, but I still get the following error in
>>the browser:
>>---------------
>>Internal Server Error
>>
>>The server encountered an internal error or misconfiguration and was
>>unable
>>to complete your request.
>>
>>Please contact the server administrator, root@localhost and inform them
>>of
>>the time the error occurred, and anything you might have done that may
>>have
>>caused the error.
>>
>>More information about this error may be available in the server error
>>log.
>>---------------
>>
>>But there was no error in the server error log. In the jk log I get:
>>---------------
>>[Sun Jun 26 15:55:45 2005] [info] jk_open_socket::jk_connect.c (433):
>>connect to 127.0.0.1:8009 failed with errno=13
>>[Sun Jun 26 15:55:45 2005] [info]
>>ajp_connect_to_endpoint::jk_ajp_common.c
>>(880): Failed opening socket to (127.0.0.1:8009) with (errno=13)
>>[Sun Jun 26 15:55:45 2005] [info] ajp_send_request::jk_ajp_common.c
>>(1239):
>>Error connecting to the Tomcat process.
>>[Sun Jun 26 15:55:45 2005] [info] ajp_service::jk_ajp_common.c (1737):
>>Sending request to tomcat failed, recoverable operation attempt=1
>>[Sun Jun 26 15:55:45 2005] [info] jk_open_socket::jk_connect.c (433):
>>connect to 127.0.0.1:8009 failed with errno=13
>>[Sun Jun 26 15:55:45 2005] [info]
>>ajp_connect_to_endpoint::jk_ajp_common.c
>>(880): Failed opening socket to (127.0.0.1:8009) with (errno=13)
>>[Sun Jun 26 15:55:45 2005] [info] ajp_send_request::jk_ajp_common.c
>>(1239):
>>Error connecting to the Tomcat process.
>>[Sun Jun 26 15:55:45 2005] [info] ajp_service::jk_ajp_common.c (1737):
>>Sending request to tomcat failed, recoverable operation attempt=2
>>[Sun Jun 26 15:55:45 2005] [info] jk_open_socket::jk_connect.c (433):
>>connect to 127.0.0.1:8009 failed with errno=13
>>[Sun Jun 26 15:55:45 2005] [info]
>>ajp_connect_to_endpoint::jk_ajp_common.c
>>(880): Failed opening socket to (127.0.0.1:8009) with (errno=13)
>>[Sun Jun 26 15:55:45 2005] [info] ajp_send_request::jk_ajp_common.c
>>(1239):
>>Error connecting to the Tomcat process.
>>[Sun Jun 26 15:55:45 2005] [info] ajp_service::jk_ajp_common.c (1737):
>>Sending request to tomcat failed, recoverable operation attempt=3
>>[Sun Jun 26 15:55:45 2005] [error] ajp_service::jk_ajp_common.c (1746):
>>Error connecting to tomcat. Tomcat is probably not started or is
>>listening
>>on the wrong port. worker=ajp13w failed
>>[Sun Jun 26 15:55:45 2005] ajp13w ill-conditioned 0.002938
>>------------
>>I know that Tomcat is both started and listening on the correct port. I
>>think it might have to do with permissions (errno=13 is a permission
>>denied
>>error), but I don't know what I need to change.
>>
>>
>>
>>Quoting Luis Sánchez Sánchez <lu...@gmail.com>:
>>
>>
>>
>>>Install mod_jk. I downloaded it from
>>>
>>>
>>>
>http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/linux/jk-1.2.10
>
>
>>/
>>
>>
>>
>>>Copy the jakarta-connector*.so to your apache2 modules directory.
>>>
>>>Activate your new module:
>>>
>>>I used this two files in /etc/apache/mods-avaliable:
>>>
>>>+-----------+
>>>mod_jk.conf
>>>+-----------+
>>># Where to find workers.properties
>>># Update this path to match your conf directory location (put
>>>workers.properties next to httpd.conf)
>>>JkWorkersFile /etc/apache2/workers.
>>>
>>>
>>properties
>>
>>
>>># Where to put jk logs
>>># Update this path to match your logs directory location (put
>>>
>>>
>>mod_jk.log
>>
>>
>>>next to access_log)
>>>JkLogFile /var/log/apache2/mod_jk.log
>>>
>>># Set the jk log level [debug/error/info]
>>>JkLogLevel info
>>>
>>># Select the log format
>>>JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>>>
>>>#JkOptions +ForwardURICompatUnparsed
>>>
>>>#JkOptions +ForwardURIEscaped
>>>
>>>#JkOptions +ForwardURICompat
>>>
>>># JkOptions indicate to send SSL KEY SIZE,
>>># la sgte linea la he comentado yo
>>>JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>>>
>>># JkRequestLogFormat set the request format
>>>JkRequestLogFormat "%w %V %T"
>>>
>>># Send everything for context /examples to worker named worker1 (ajp13)
>>>JkMount /jsp-examples/* worker1
>>>JkMount /blojsom/* worker1
>>>
>>>
>>>
>>>+-----------+
>>>mod_jk.load
>>>+-----------+
>>>LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
>>>
>>>
>>>Then link this files in /etc/apache2/mods-enabled/
>>>
>>>
>>>Put a workers.property file in your apache2 conf dir (/etc/apache2 in
>>>
>>>
>>my
>>
>>
>>>linux). This is my workers.properties
>>>
>>> # Define 1 real worker using ajp13
>>> worker.list=worker1
>>> # Set properties for worker1 (ajp13)
>>> worker.worker1.type=ajp13
>>> worker.worker1.host=localhost
>>> worker.worker1.port=8009
>>> worker.worker1.lbfactor=50
>>> worker.worker1.cachesize=10
>>> worker.worker1.cache_timeout=600
>>> worker.worker1.socket_keepalive=1
>>> worker.worker1.reclycle_timeout=300
>>>
>>>
>>>
>>>
>>>In tomcat you must use URIEncoding="UTF-8" in your connectors in
>>>server.xml:
>>>
>>> (I forgot this connector ...)
>>>
>>> <Connector port="8009"
>>> enableLookups="false" redirectPort="8443" debug="0"
>>> protocol="AJP/1.3" URIEncoding="UTF-8"/>
>>>
>>>
>>>
>>> <Connector port="8080"
>>> maxThreads="150" minSpareThreads="25"
>>>
>>>
>>maxSpareThreads="75"
>>
>>
>>> enableLookups="false" redirectPort="8443"
>>>acceptCount="100"
>>> debug="0" connectionTimeout="20000"
>>> disableUploadTimeout="true" URIEncoding="UTF-8"/>
>>>
>>>Launch tomcat, launch apache2 force-reload.
>>>
>>>
>>>--
>>>Luis Sánchez Sánchez <lu...@gmail.com>
>>>
>>>
>>>---------------------------------------------------------------------
>>>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
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org