LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   apache tomcat connector fails (https://www.linuxquestions.org/questions/linux-server-73/apache-tomcat-connector-fails-943233/)

sanjay87 05-04-2012 05:07 AM

apache tomcat connector fails
 
Hi

when i tried to conect apache page it delivering 503 error .I had configured apache to listen to tomcat but it fails any help regarding these error

MOD_JK LOG


[
Quote:

Fri May 04 18:42:58 2012] [8822:140070339680224] [info] jk_open_socket::jk_connect.c (622): connect to 127.0.0.1:8081 failed (errno=13)
[Fri May 04 18:42:58 2012] [8822:140070339680224] [info] ajp_connect_to_endpoint::jk_ajp_common.c (959): Failed opening socket to (127.0.0.1:8081) (errno=13)
[Fri May 04 18:42:58 2012] [8822:140070339680224] [error] ajp_send_request::jk_ajp_common.c (1585): (worker1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=13)
[Fri May 04 18:42:58 2012] [8822:140070339680224] [info] ajp_service::jk_ajp_common.c (2540): (worker1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Fri May 04 18:42:58 2012] [8822:140070339680224] [error] ajp_service::jk_ajp_common.c (2559): (worker1) connecting to tomcat failed.
[Fri May 04 18:42:58 2012] [8822:140070339680224] [info] jk_handler::mod_jk.c (2618): Service error=-3 for worker=worker1
[Fri May 04 18:59:21 2012] [8976:140235393103840] [error] init_jk::mod_jk.c (3172): Initializing shm:/etc/httpd/logs/jk-runtime-status.8976 errno=13. Load balancing workers will not function properly.
[Fri May 04 18:59:21 2012] [8976:140235393103840] [info] init_jk::mod_jk.c (3189): mod_jk/1.2.30 initialized
[Fri May 04 18:59:21 2012] [8977:140235393103840] [error] init_jk::mod_jk.c (3172): Initializing shm:/etc/httpd/logs/jk-runtime-status.8977 errno=13. Load balancing workers will not function properly.

Quote:

vi /etc/httpd/conf

Listen 80
Include /etc/httpd/conf/httpd-prod.conf


#
JkWorkersFile "/etc/httpd/conf/workers.properties"
JkLogFile "logs/mod_jk.log"

JkLogLevel debug,error,info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# workers.properties

ps=/


worker.list=worker1

worker.worker1.port=8081

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




Quote:

server.xml
<?xml version='1.0' encoding='utf-8'?>
<Server port="8007" shutdown="SHUTDOWN">

<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Service name="Catalina">

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8081" URIEncoding="UTF-8" />
<Connector port="8081" protocol="AJP/1.3" redirectPort="8081" />

<Engine name="Catalina" defaultHost="localhost">

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

<Listener className="org.apache.jk.config.ApacheConfig"
modJk="/etc/httpd/modules/mod_jk.so" />

</Host>
</Engine>
</Service>
</Server>
[/QUOTE]

acid_kewpie 05-04-2012 05:25 AM

well the logs very very clearly say there's nothing to connect to on 127.1:8081 so you need to make there be something...

sanjay87 05-04-2012 07:48 AM

Thanks all for ur reply

disable selinux and made of soft reboot of my vps server ,Now mod_jk get initialsed



Fri May 04 18:42:58 2012] [8822:140070339680224] [info] jk_open_socket::jk_connect.c (622): connect to 127.0.0.1:8081 failed (errno=13)
[Fri May 04 18:42:58 2012] [8822:140070339680224] [info] ajp_connect_to_endpoint::jk_ajp_common.c (959): Failed opening socket to
[Fri May 04 21:42:48 2012] [2771:140554366535648] [info] init_jk::mod_jk.c (3189): mod_jk/1.2.30 initialized
[Fri May 04 21:42:48 2012] [2772:140554366535648] [info] init_jk::mod_jk.c (3189): mod_jk/1.2.30 initialized


All times are GMT -5. The time now is 09:54 AM.