Tomcat 503 Service Unavailable

Posted on  by admin
All Places > JBoss AS > Tomcat Integration > Discussions

Hi all,
I have some trouble in integrating the JBoss 4.0.2 and the Apache 2.0.54.
When I run http://MyServerName/jmx-console in browser IE, I get a error information '503 Service Temporarily Unavailable',
Someone can tell me what is the wrong?
thank you.
Regards,
Carson
The mod_jk.log record is below.
21:05:49 2005][info] jk_handler::mod_jk.c (1975): Service error=0 for worker=loadbalancer
[Wed Jun 29 21:13:33 2005][info] jk_open_socket::jk_connect.c (433): connect to 127.0.0.1:8009 failed with errno=61
[Wed Jun 29 21:13:33 2005][info] ajp_connect_to_endpoint::jk_ajp_common.c (877): Failed connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
[Wed Jun 29 21:13:33 2005][info] ajp_send_request::jk_ajp_common.c (1227): Error connecting to the Tomcat process.
[Wed Jun 29 21:13:33 2005][info] ajp_service::jk_ajp_common.c (1724): Sending request to tomcat failed, recoverable operation attempt=1
[Wed Jun 29 21:13:34 2005][info] jk_open_socket::jk_connect.c (433): connect to 127.0.0.1:8009 failed with errno=61
[Wed Jun 29 21:13:34 2005][info] ajp_connect_to_endpoint::jk_ajp_common.c (877): Failed connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
[Wed Jun 29 21:13:34 2005][info] ajp_send_request::jk_ajp_common.c (1227): Error connecting to the Tomcat process.
[Wed Jun 29 21:13:34 2005][info] ajp_service::jk_ajp_common.c (1724): Sending request to tomcat failed, recoverable operation attempt=2
[Wed Jun 29 21:13:35 2005][info] jk_open_socket::jk_connect.c (433): connect to 127.0.0.1:8009 failed with errno=61
[Wed Jun 29 21:13:35 2005][info] ajp_connect_to_endpoint::jk_ajp_common.c (877): Failed connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
[Wed Jun 29 21:13:35 2005][info] ajp_send_request::jk_ajp_common.c (1227): Error connecting to the Tomcat process.
[Wed Jun 29 21:13:35 2005][info] ajp_service::jk_ajp_common.c (1724): Sending request to tomcat failed, recoverable operation attempt=3
[Wed Jun 29 21:13:35 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=node1 failed
[Wed Jun 29 21:13:35 2005][info] service::jk_lb_worker.c (627): service failed, worker node1 is in error state
[Wed Jun 29 21:13:35 2005][info] service::jk_lb_worker.c (677): All tomcat instances are busy or in error state
[Wed Jun 29 21:13:35 2005]loadbalancer carson 2.954000
[Wed Jun 29 21:13:35 2005][info] jk_handler::mod_jk.c (1975): Service error=0 for worker=loadbalancer
My confige files.
mod_jk.conf
# 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.d/workers.properties
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
# JkLogLevel info
JkLogLevel debug
# 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'
# 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 /tmp/jk.shm
# Add jkstatus for managing runtime data
<Location /jkstatus/>
JkMount jkstatus
Order deny,allow
Deny from all
Allow from 127.0.0.1
JkMount /*.jsp loadbalancer
JkMount /*.jspx loadbalancer
JkMount /gas* loadbalancer
JkMount /wap* loadbalancer
JKMount /jmx-console loadbalancer
workers.properties
# 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
worker.loadbalancer.sticky_session=1
worker.loadbalancer.local_worker_only=1
worker.list=loadbalancer
# Status worker for managing load balancer
worker.status.type=status
#(1) local_worker should be commented out to enable load-balancing. Otherwise, only fail-over is available.
server.xml
changed part is below.
jboss-service.xml
changed part is below.
true

0

If Tomcat is not started type 'tomcat4' at the console, or 'tomcat5' if you are running iManager 2.7; then view the logger screen. The logger screen should show the reason for Tomcat not starting successfully if there are problems. If there are no errors, watch for a line that indicates that Tomcat is listening on a port (e.g. Before this change, typing 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 modjk.log. Last Updated: 2020/3/22Categories: Troubleshooting 6 Subscribe Symptoms note: this article is a “503 service unavailable” error when connecting to the vCenter.

Tomcat 503 Service Temporarily Unavailable

reset

Hi krish,

I think this topic can help you to understand :

regards,

mathieu

0
reset

Does the Error trace indicate the error is coming from BW? If you have the complete error message, then you may be able to see the reference to bw or tomcat code lines. As per your new response, there is a load balancer involved. Its possible that the load balancer itself is returning 503 error. So, probably with tracing, you can see if the error is coming from BW or LB. One thing is 100 requests/sec, is not same as 100 concurrent requests. Do you mean 100 concurrent requests. In that case, if the intent is to have 100 requests processed simultaneously, you should not be setting maxjobs and flowlimit. For HTTP starters, flowlimit is probably redundant or may not work properly as this can be easily controlled through max/min proc setting. Are these requests involving large payloads?

Few things to try out

  1. Try to bypass load balancer and hit the bw service directly and see if you see errors
  2. remove the flowlimit/maxjobs
  3. If you have more concurrent requests than maxproc, acceptCount will come into picture, but the acceptCount requires some tweaks to TCP settings on some platforms. If the maxproc is limiting, then you should see an error in BW logs. Try increasing maxprocessors assuming that acceptCount is not working on this platform.
  4. Try to use httpComponents instead of tomcat for the receiver. HttpComponents is better for high concurrency, but its less performant compared to tomcat for lower concurrency. But it may still be in your limits, its just relative observation.
  5. I am not sure if you are getting few 503 errors or all of them are getting errored out. If its the case, try httpComponents again. There is a workaround if the issue is specific to tomcat.
0
reset

Dear Mathieu,

You are right, we wanted to catch this error or record the timestamp of Tomcat logs to note exactly what time the request reached Tomcat.

This will clearly give us an indication whether it is problem of Tomcat not able to process the load or some nework delay happening in between. There is a hardware loadbalancer sitting between Client's Application Server and Tibco Tomcat server.

Your comments are welcome on this.

BR

Krish

0
reset
Tomcat 503 Service Unavailable

Your comments on this.

Service

The answer of the support is correct regarding your question on the 'trace' configuration.

My understanding was that you wanted to catch the 503 error in your BW process that expose the service, not to make more logs. But I might have misunderstood your needs.

regards,

mathieu

0
reset

Dear Mathieu,

We received this response from TIBCO for tracking tomcat server:

-------------------------------------------------------------------------------------------------------------------------------------------

How to configure the debug tracing for tomcatwebserver in BW?

Body:

We can open the debug tracing for tomcat and our BWengine.

Youcan change the log4j.properties which locatesTIBCO_HOME/bw/BW_VERSION/lib/log4j.properties to enable the tomcat debugtracing. Just append below lines in it and restart BW. Then you can find theTomcat debug information.

log4j.logger.com.tibco.bw.service.binding.bwhttp.tomcat.TomcatServer=DEBUG,tibco_bw_log

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG,tibco_bw_log

log4j.logger.org.apache.catalina.core=DEBUG,tibco_bw_log

log4j.logger.org.apache.catalina.session=DEBUG,tibco_bw_log

Please becare of these debug tracing properties, they will generate much more log thanbefore.

For BWengine, please add below proerties into the deployed tra file.

Trace.Startup=true

Trace.JC.*=true

Trace.Engine=true

Haproxy Tomcat 503 Service Unavailable

Trace.Task.*=true

Trace.Info.*=true

Install Tomcat Service

Trace.Warn.*=true

Tomcat Service File

Trace.Error.*=true

Trace.Debug.*=true

Tomcat 503 Service Temporarily Unavailable

bw.plugin.http.server.debug=true

Apache Tomcat 503 Service Temporarily Unavailable

-------------------------------------------------------------------------------------------------------------------------------------------------------

Your comments on this.

Tomcat 503 Service Unavailable

BR

Krish