Solved

mod_jk errno=111 with apache2, tomcat6, on ubuntu 10.04

Posted on 2012-04-05
4
1,522 Views
Last Modified: 2012-04-16
I am experiencing a periodic mod_jk failure which leads to a 503 site error. I can netstat to Tomcat on port 8009 during these failures, so I suspect that there is an issue with the apache => tomcat threads. I have yet to find a culprit thread in a Tomcat stack trace dump.

OS: Ubuntu 10.04
Web Server: Apache2
App Server: Tomcat6

Error from mod_jk.log:
ajp_connect_to_endpoint::jk_ajp_common(c) (922): Failed opening socket to (127.0.0.1:8009) (errno=111)

workers.properties:
worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13

Server.xml:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
0
Comment
Question by:frankdux
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 13

Expert Comment

by:LinuxGuru
ID: 37820660
Have you checked if some other process is listening on port 8009?

netstat -plan | grep ":8009"

Open in new window


Also if there is a firewall try stopping the firewall and see the results.

Try telnet to the port from the server itself.

telnet localhost 8009

Open in new window


Hope this helps.
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 37825540
As root, you can lsof -i to see more detail about listening ports. Note that telnet localhost 8009 only tells you if a process is listening on the local interface (shows as lo in ifconfig) and you want to know about eth0 or whatever. Frequently processes listen on all interfaces, but this isn't necessarily the case
0
 
LVL 19

Accepted Solution

by:
ramazanyich earned 500 total points
ID: 37826433
I think it could be an issue with number of connections between apache and tomcat.
In tomcat you can add acceptCount attribute for the <Connector>. The defintion of that attribute is "The maximum queue length for incoming connection requests when all possible request processing threads are in use. Any requests received when the queue is full will be refused. Default value is 100" (check http://tomcat.apache.org/tomcat-6.0-doc/config/http.html for details)

Check the number of connections in Apache defined by MaxClients in your httpd.conf, default is 256. (check http://httpd.apache.org/docs/2.0/mod/mpm_common.html#maxclients).

If number of MaxClients is bigger that acceptCount then you can have such issues.
0
 

Author Closing Comment

by:frankdux
ID: 37851730
Thank you for the verbose explanation. There was indeed a mismatch between the Apache thread connections and the Tomcat max connections.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
V.simple question about Android packages and libraries 1 36
awk to variable in bash 2 106
I NEED A "BARE" LINUX ... 9 86
Let's Encrypt - Auto Renew Failure via Cron Job 1 24
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question