Tomcat 8 503 Error with Apache2 mod_jk as Reverse Proxy
0
votes
1
answer
2227
views
I'm following this guide to setup Tomcat 8 on Ubuntu Server 16.04 using Apache2's mod_jk module as a reverse proxy:
https://www.digitalocean.com/community/tutorials/how-to-encrypt-tomcat-8-connections-with-apache-or-nginx-on-ubuntu-16-04
Everything works until the last step, which is to change the HTTP and AJP Connectors in server.xml to only listen on localhost. Here's the change I made to the AJP Connector:
Before this change, typing https://myhostname takes me to the Tomcat administration page; after it, I get "503 Service Unavailable". I've temporarily turned off my firewall and removed AppArmor. Here's the relevant portion of mod_jk.log:
jk_open_socket::jk_connect.c (817): connect to ::1:8009 failed (errno=111)
ajp_connect_to_endpoint::jk_ajp_common.c (1068): (ajp13_worker) Failed opening socket to (::1:8009) (errno=111)
ajp_send_request::jk_ajp_common.c (1728): (ajp13_worker) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
What could be causing this, and how can I resolve it?
Asked by Nester
(111 rep)
Jan 31, 2017, 04:42 PM
Last activity: Jun 1, 2025, 04:02 AM
Last activity: Jun 1, 2025, 04:02 AM