You should not run Nexus as a war. This is not recommended and about to be completely deprecated. Run it from the bundle download that has a preconfigure Eclipse Jetty instance in it.
Nexus kills forwarding from apache to tomcat
题
I'm trying to run Nexus as a war in tomcat6. It deploys, starts and initializes and doesn't show any errors in the logs but it kills forwarding from apache to tomcat.
We are using libapache2-mod-jk
and this should be correctly configured. Hudson is also running as a war and also doesn't work anymore. If I remove nexus from tomcat everything works fine again.
The error I found was in /var/log/apache2/mod_jk.log
:
[error] ajp_send_request::jk_ajp_common.c (1630): (ajp13_worker) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
Config looks like this /etc/libapache2-mod-jk/workers.properties
#------ worker list ------------------------------------------
#---------------------------------------------------------------------
#
#
# The workers that your plugins should create and work with
#
worker.list=ajp13_worker
#
#------ ajp13_worker WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
#
#
# Defining a worker named ajp13_worker and of type ajp13
# Note that the name and the type do not have to match.
#
worker.ajp13_worker.port=8009
worker.ajp13_worker.host=localhost
worker.ajp13_worker.type=ajp13
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
# ----> lbfactor must be > 0
# ----> Low lbfactor means less work done by the worker.
worker.ajp13_worker.lbfactor=1
#
# Specify the size of the open connection cache.
#worker.ajp13_worker.cachesize
#
#------ DEFAULT LOAD BALANCER WORKER DEFINITION ----------------------
#---------------------------------------------------------------------
#
#
# The loadbalancer (type lb) workers perform wighted round-robin
# load balancing with sticky sessions.
# Note:
# ----> If a worker dies, the load balancer will check its state
# once in a while. Until then all work is redirected to peer
# workers.
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13_worker
And in /etc/apache2/sites-available/default-ssl
######## Tomcat
JkMount /agilefant/* ajp13_worker
JkMount /hudson/* ajp13_worker
JKMount /nexus/* ajp13_worker
Any idea?
解决方案
不隶属于 StackOverflow