logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: mod_jk problem
Author
horizon



Joined: 16 May 2012
Posts: 2
Location: Sweden

PostPosted: Thu 17 May '12 16:59    Post subject: mod_jk problem Reply with quote

Hello, I just tried (for the very first time) to set up the following:
Apache 2.4.3
mod_jk version 1.2.36
Apache Tomcat version 7.0.27
Everything is 32-bit.

However, there seems to be something wrong with my mod_jk configuration as I'm not able to connect to Tomcat properly. Here's what I see in my mod_jk log (log level=debug):

Code:

[Thu May 17 16:48:55 2012] [2496:3772] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/MyThesis/RequestHandler' from 1 maps
[Thu May 17 16:48:55 2012] [2496:3772] [debug] find_match::jk_uri_worker_map.c (945): Attempting to map context URI '/MyThesis/*=worker1' source 'JkMount'
[Thu May 17 16:48:55 2012] [2496:3772] [debug] find_match::jk_uri_worker_map.c (958): Found a wildchar match '/MyThesis/*=worker1'
[Thu May 17 16:48:55 2012] [2496:3772] [debug] jk_handler::mod_jk.c (2621): Into handler jakarta-servlet worker=worker1 r->proxyreq=0
[Thu May 17 16:48:55 2012] [2496:3772] [debug] wc_get_worker_for_name::jk_worker.c (115): found a worker worker1
[Thu May 17 16:48:55 2012] [2496:3772] [debug] wc_get_name_for_type::jk_worker.c (292): Found worker type 'ajp13'
[Thu May 17 16:48:55 2012] [2496:3772] [debug] init_ws_service::mod_jk.c (1097): Service protocol=HTTP/1.1 method=GET ssl=false host=(null) addr=::1 name=localhost port=80 auth=(null) user=(null) laddr=::1 raddr=::1 uri=/MyThesis/RequestHandler
[Thu May 17 16:48:55 2012] [2496:3772] [debug] ajp_get_endpoint::jk_ajp_common.c (3154): acquired connection pool slot=0 after 0 retries
[Thu May 17 16:48:55 2012] [2496:3772] [debug] ajp_marshal_into_msgb::jk_ajp_common.c (626): ajp marshaling done
[Thu May 17 16:48:55 2012] [2496:3772] [debug] ajp_service::jk_ajp_common.c (2449): processing worker1 with 2 retries
[Thu May 17 16:48:55 2012] [2496:3772] [debug] ajp_send_request::jk_ajp_common.c (1623): (worker1) all endpoints are disconnected.
[Thu May 17 16:48:55 2012] [2496:3772] [debug] jk_open_socket::jk_connect.c (485): socket TCP_NODELAY set to On
[Thu May 17 16:48:55 2012] [2496:3772] [debug] jk_open_socket::jk_connect.c (609): trying to connect socket 1020 to 0.0.0.0:0
[Thu May 17 16:48:55 2012] [2496:3772] [info] jk_open_socket::jk_connect.c (627): connect to 0.0.0.0:0 failed (errno=47)
[Thu May 17 16:48:55 2012] [2496:3772] [info] ajp_connect_to_endpoint::jk_ajp_common.c (995): Failed opening socket to (0.0.0.0:0) (errno=47)
[Thu May 17 16:48:55 2012] [2496:3772] [error] ajp_send_request::jk_ajp_common.c (1629): (worker1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=47)
[Thu May 17 16:48:55 2012] [2496:3772] [info] ajp_service::jk_ajp_common.c (2622): (worker1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Thu May 17 16:48:55 2012] [2496:3772] [debug] ajp_service::jk_ajp_common.c (2471): retry 1, sleeping for 100 ms before retrying
[Thu May 17 16:48:55 2012] [2496:3772] [debug] ajp_send_request::jk_ajp_common.c (1623): (worker1) all endpoints are disconnected.
[Thu May 17 16:48:55 2012] [2496:3772] [debug] jk_open_socket::jk_connect.c (485): socket TCP_NODELAY set to On
[Thu May 17 16:48:55 2012] [2496:3772] [debug] jk_open_socket::jk_connect.c (609): trying to connect socket 1020 to 0.0.0.0:0
[Thu May 17 16:48:55 2012] [2496:3772] [info] jk_open_socket::jk_connect.c (627): connect to 0.0.0.0:0 failed (errno=47)
[Thu May 17 16:48:55 2012] [2496:3772] [info] ajp_connect_to_endpoint::jk_ajp_common.c (995): Failed opening socket to (0.0.0.0:0) (errno=47)
[Thu May 17 16:48:55 2012] [2496:3772] [error] ajp_send_request::jk_ajp_common.c (1629): (worker1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=47)
[Thu May 17 16:48:55 2012] [2496:3772] [info] ajp_service::jk_ajp_common.c (2622): (worker1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Thu May 17 16:48:55 2012] [2496:3772] [error] ajp_service::jk_ajp_common.c (2642): (worker1) connecting to tomcat failed.
[Thu May 17 16:48:55 2012] [2496:3772] [debug] ajp_reset_endpoint::jk_ajp_common.c (786): (worker1) resetting endpoint with socket -1 (socket shutdown)
[Thu May 17 16:48:55 2012] [2496:3772] [debug] ajp_done::jk_ajp_common.c (3085): recycling connection pool for worker worker1 and socket -1
[Thu May 17 16:48:55 2012] [2496:3772] [info] jk_handler::mod_jk.c (2788): Service error=-3 for worker=worker1


So it seems mod_jk cannot connect to Tomcat. Tomcat is, however, up and running and I can access it directly. Here's my mod_jk config from http.conf:

Code:

LoadModule    jk_module  modules/mod_jk.so
JkWorkersFile "conf/workers.properties"
JkShmFile     logs/_jk.shm
JkLogFile     logs/mod_jk.log
JkLogLevel    debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkMount /MyThesis/* worker1


And here's my workers.properties:

Code:

# 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


This is basically the same config I had a little more than a year ago (but that was with Apache 2.2), and it was working nicely then, but now problems. Maybe I need to change something now that I'm trying to use Apache 2.4?

Finally, this is from my server.xml for Tomcat:

Code:

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


Thanks for reading and thanks for any help!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 28 Jun '12 14:13    Post subject: Reply with quote

Quote:

connect to 0.0.0.0:0 failed (errno=47)


Under which user do you run apache? Cause it seems that mod jk is not allowed to conntect to 0.0.0.0
Back to top


Reply to topic   Topic: mod_jk problem View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules