linux下apache和tomcat整合的问题,十万火急,各位老大快来帮帮忙

cowputer 2006-09-04 07:28:08
现象是apache和tomcat启动后,按照:8080可以访问tomcat,按照80断口访问可以看到映射到apache中根目录的web应用,但是按照80端口访问tomcat应用的时候显示连接超时,具体信息如下:
Error Code 1460: timeout
Background: The gateway could not receive a timely response from the website you are trying to access, a DNS server, or another gateway server. This might indicate that the network is congested or that the website is experiencing technical difficulties.

workers2.properties内容如下:
[logger]
level=DEBUG

[config:]
file=${serverRoot}/conf/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

# Alternate file logger
#[logger.file:0]
#level=DEBUG
#file=${serverRoot}/logs/jk2.log

[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess servers
file=${serverRoot}/logs/jk2.shm
size=1000000
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0
# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues
#logger=logger.file:0

[lb:lb]
info=Default load balancer.
debug=0

[lb:lb_1]
info=A second load balancer.
debug=0

[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
debug=0
tomcatId=localhost:8009

[channel.socket:localhost:8019]
info=A second tomcat instance.
debug=0
tomcatId=localhost:8019
lb_factor=1
group=lb
group=lb_1
disabled=0

[channel.un:/opt/33/work/jk2.socket]
info=A second channel connecting to localhost:8019 via unix socket
tomcatId=localhost:8019
lb_factor=1
debug=0

[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess

[status:]
info=Status worker, displays runtime informations

[vm:]
info=Parameters used to load a JVM in the server process
#JVM=C:\jdk\jre\bin\hotspot\jvm.dll
classpath=${TOMCAT_HOME}/bin/tomcat-jni.jar
classpath=${TOMCAT_HOME}/server/lib/commons-logging.jar
OPT=-Dtomcat.home=${TOMCAT_HOME}
OPT=-Dcatalina.home=${TOMCAT_HOME}
OPT=-Xmx128M
#OPT=-Djava.compiler=NONE
disabled=1

[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
# For Tomcat 5 use the 'stard' for startup argument
# ARG=stard
disabled=1
stdout=${serverRoot}/logs/stdout.log
stderr=${serverRoot}/logs/stderr.log

[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop
disabled=1

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

[uri:127.0.0.1:8003]
info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test it
alias=myVirtualHost:8003

[uri:127.0.0.1:8003/ex]
info=Example webapp in the virtual host. It'll go to lb_1 ( i.e. localhost:8019 )
context=/ex
group=lb_1

[uri:/examples]
info=Example webapp in the default context.
context=/examples
debug=0

[uri:/examples1/*]
info=A second webapp, this time going to the second tomcat only.
group=lb_1
debug=0

[uri:/examples/servlet/*]
info=Prefix mapping

[uri:/examples/*.jsp]
info=Extension mapping

[uri:/examples/*]
info=Map the whole webapp

[uri:/examples/servlet/HelloW]
info=Example with debug enabled.
debug=10

[uri:/med/*]
[uri:/med/servlet/*]

[uri:/dairen/*]
[uri:/dairen/servlet/*]


其中我需要访问的应用是dairen.
...全文
350 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
forandever 2007-04-26
  • 打赏
  • 举报
回复
看你用了 apache2
在论坛里面 apache 栏目里 搜索一下 以前别人问的 apache 和 tomcat 的整合的 虚拟主机 的问题 里面有我的回答。
hy_lihuan 2007-04-26
  • 打赏
  • 举报
回复
不懂了..jf
cloudgamer 2007-04-26
  • 打赏
  • 举报
回复
学习
yunfeifan 2006-09-06
  • 打赏
  • 举报
回复
只会apache 不会tomcat 帮你顶
cowputer 2006-09-04
  • 打赏
  • 举报
回复
[Mon Sep 04 20:13:21 2006] [error] ajp13.service() failed to connect endpoint errno=2 \xe3
\x81\x9d\xe3\x81\xae\xe3\x82\x88\xe3\x81\x86\xe3\x81\xaa\xe3\x83\x95\xe3\x82\xa1\xe3\x82\x
a4\xe3\x83\xab\xe3\x82\x84\xe3\x83\x87\xe3\x82\xa3\xe3\x83\xac\xe3\x82\xaf\xe3\x83\x88\xe3
\x83\xaa\xe3\x81\xaf\xe3\x81\x82\xe3\x82\x8a\xe3\x81\xbe\xe3\x81\x9b\xe3\x82\x93
[Mon Sep 04 20:13:21 2006] [error] ajp13.service() Error forwarding ajp13:/opt/33/work/jk
2.socket 1 1
[Mon Sep 04 20:13:21 2006] [notice] channelUn.close(): close unix socket -1
[Mon Sep 04 20:13:21 2006] [notice] ajp13.done() close endpoint ajp13:/opt/33/work/jk2.soc
ket error_state 1
[Mon Sep 04 20:13:21 2006] [error] lb.service() worker failed 120000 for ajp13:/opt/33/wor
k/jk2.socket
[Mon Sep 04 20:13:21 2006] [notice] lb.getWorker() All workers in error state, use the one
with oldest error
[Mon Sep 04 20:13:21 2006] [notice] lb.getWorker() We tried all possible workers 3
[Mon Sep 04 20:13:21 2006] [error] lb_worker.service() all workers in error or disabled st
ate
[Mon Sep 04 20:13:21 2006] [error] mod_jk2.handler() Error connecting to tomcat 120000, st
atus 503
[Mon Sep 04 20:15:46 2006] [error] msgAjp.receive(): Bad signature 00
[Mon Sep 04 20:15:46 2006] [notice] BAD MESSAGE: pos=4 len=4 max=8192
[Mon Sep 04 20:15:46 2006] [notice] 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
0 - ................
[Mon Sep 04 20:15:46 2006] [error] channelApr.receive(): Bad header
[Mon Sep 04 20:15:46 2006] [error] workerEnv.processCallbacks() Error reading reply
[Mon Sep 04 20:15:46 2006] [error] ajp13.service() ajpGetReply recoverable error 120000
[Mon Sep 04 20:15:46 2006] [error] ajp13.service() Error forwarding ajp13:localhost:8009
1 0
[Mon Sep 04 20:15:46 2006] [error] lb.service() worker failed 120000 for ajp13:localhost:8
009
[Mon Sep 04 20:15:46 2006] [notice] channelApr.open(): create tcp socket 151026008
[Mon Sep 04 20:15:46 2006] [error] channelApr.open() attempt to connect to 127.0.0.1:8019
(localhost) failed 111
[Mon Sep 04 20:15:46 2006] [error] ajp13.connect() failed ajp13:localhost:8019
[Mon Sep 04 20:15:46 2006] [error] ajp13.service() failed to connect endpoint errno=9 \xe4
\xb8\x8d\xe6\xad\xa3\xe3\x81\xaa\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab\xe8\xa8\x
98\xe8\xbf\xb0\xe5\xad\x90\xe3\x81\xa7\xe3\x81\x99
[Mon Sep 04 20:15:46 2006] [error] ajp13.service() Error forwarding ajp13:localhost:8019
1 1
[Mon Sep 04 20:15:46 2006] [notice] ajp13.done() close endpoint ajp13:localhost:8019 error
_state 1
[Mon Sep 04 20:15:46 2006] [error] lb.service() worker failed 120000 for ajp13:localhost:8
019
[Mon Sep 04 20:15:46 2006] [error] channelUn.connect() connect failed 2 \xe3\x81\x9d\xe3\x
81\xae\xe3\x82\x88\xe3\x81\x86\xe3\x81\xaa\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab
\xe3\x82\x84\xe3\x83\x87\xe3\x82\xa3\xe3\x83\xac\xe3\x82\xaf\xe3\x83\x88\xe3\x83\xaa\xe3\x
81\xaf\xe3\x81\x82\xe3\x82\x8a\xe3\x81\xbe\xe3\x81\x9b\xe3\x82\x93
[Mon Sep 04 20:15:46 2006] [error] ajp13.connect() failed ajp13:/opt/33/work/jk2.socket
[Mon Sep 04 20:15:46 2006] [error] ajp13.service() failed to connect endpoint errno=2 \xe3
\x81\x9d\xe3\x81\xae\xe3\x82\x88\xe3\x81\x86\xe3\x81\xaa\xe3\x83\x95\xe3\x82\xa1\xe3\x82\x
a4\xe3\x83\xab\xe3\x82\x84\xe3\x83\x87\xe3\x82\xa3\xe3\x83\xac\xe3\x82\xaf\xe3\x83\x88\xe3
\x83\xaa\xe3\x81\xaf\xe3\x81\x82\xe3\x82\x8a\xe3\x81\xbe\xe3\x81\x9b\xe3\x82\x93
[Mon Sep 04 20:15:46 2006] [error] ajp13.service() Error forwarding ajp13:/opt/33/work/jk
2.socket 1 1
[Mon Sep 04 20:15:46 2006] [notice] channelUn.close(): close unix socket -1
[Mon Sep 04 20:15:46 2006] [notice] ajp13.done() close endpoint ajp13:/opt/33/work/jk2.soc
ket error_state 1
[Mon Sep 04 20:15:46 2006] [error] lb.service() worker failed 120000 for ajp13:/opt/33/wor
k/jk2.socket
[Mon Sep 04 20:15:46 2006] [notice] lb.getWorker() All workers in error state, use the one
with oldest error
[Mon Sep 04 20:15:46 2006] [notice] lb.getWorker() We tried all possible workers 3
[Mon Sep 04 20:15:46 2006] [error] lb_worker.service() all workers in error or disabled st
ate
[Mon Sep 04 20:15:46 2006] [error] mod_jk2.handler() Error connecting to tomcat 120000, st
atus 503


拜托大家,帮帮忙啊
cowputer 2006-09-04
  • 打赏
  • 举报
回复


日志中的错误信息如下:
[Mon Sep 04 20:04:04 2006] [error] env.createBean2(): Factory error creating channel.jni:j
ni ( channel.jni, jni)
[Mon Sep 04 20:04:04 2006] [error] config.update(): Can't create channel.jni:jni
[Mon Sep 04 20:04:04 2006] [notice] config.update(): done status:
[Mon Sep 04 20:04:04 2006] [error] env.createBean2(): Factory error creating vm: ( vm, )
[Mon Sep 04 20:04:04 2006] [error] config.update(): Can't create vm:
[Mon Sep 04 20:04:04 2006] [error] env.createBean2(): Factory error creating worker.jni:on
Startup ( worker.jni, onStartup)
[Mon Sep 04 20:04:04 2006] [error] config.update(): Can't create worker.jni:onStartup
[Mon Sep 04 20:04:04 2006] [error] env.createBean2(): Factory error creating worker.jni:on
Shutdown ( worker.jni, onShutdown)
[Mon Sep 04 20:04:04 2006] [error] config.update(): Can't create worker.jni:onShutdown
[Mon Sep 04 20:04:15 2006] [notice] mod_jk2 child 28754 initialized
[Mon Sep 04 20:06:24 2006] [error] [client 218.24.162.8] File does not exist: /web/htdocs/
undergra.gif, referer: http://global.skill.ne.jp/main-skill.html
[Mon Sep 04 20:06:26 2006] [notice] channelApr.open(): create tcp socket 148439504
[Mon Sep 04 20:08:50 2006] [notice] channelApr.open(): create tcp socket 148439504
[Mon Sep 04 20:09:53 2006] [error] msgAjp.receive(): Bad signature 00
[Mon Sep 04 20:09:53 2006] [notice] BAD MESSAGE: pos=4 len=4 max=8192
[Mon Sep 04 20:09:53 2006] [notice] 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
0 - ................
[Mon Sep 04 20:09:53 2006] [error] channelApr.receive(): Bad header
[Mon Sep 04 20:09:53 2006] [error] workerEnv.processCallbacks() Error reading reply
[Mon Sep 04 20:09:53 2006] [error] ajp13.service() ajpGetReply recoverable error 120000
[Mon Sep 04 20:09:53 2006] [notice] channelApr.open(): create tcp socket 151025776
[Mon Sep 04 20:12:18 2006] [error] msgAjp.receive(): Bad signature 00
[Mon Sep 04 20:12:18 2006] [notice] BAD MESSAGE: pos=4 len=4 max=8192
[Mon Sep 04 20:12:18 2006] [notice] 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
0 - ................
[Mon Sep 04 20:12:18 2006] [error] channelApr.receive(): Bad header
[Mon Sep 04 20:12:18 2006] [error] workerEnv.processCallbacks() Error reading reply
[Mon Sep 04 20:12:18 2006] [error] ajp13.service() ajpGetReply recoverable error 120000
[Mon Sep 04 20:12:18 2006] [notice] channelApr.open(): create tcp socket 151025776
[Mon Sep 04 20:13:21 2006] [error] msgAjp.receive(): Bad signature 00
[Mon Sep 04 20:13:21 2006] [notice] BAD MESSAGE: pos=4 len=4 max=8192
[Mon Sep 04 20:13:21 2006] [notice] 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
0 - ................
[Mon Sep 04 20:13:21 2006] [error] channelApr.receive(): Bad header
[Mon Sep 04 20:13:21 2006] [error] workerEnv.processCallbacks() Error reading reply
[Mon Sep 04 20:13:21 2006] [error] ajp13.service() ajpGetReply recoverable error 120000
[Mon Sep 04 20:13:21 2006] [error] ajp13.service() Error forwarding ajp13:localhost:8009
1 0
[Mon Sep 04 20:13:21 2006] [error] lb.service() worker failed 120000 for ajp13:localhost:8
009
[Mon Sep 04 20:13:21 2006] [notice] channelApr.open(): create tcp socket 151026008
[Mon Sep 04 20:13:21 2006] [error] channelApr.open() attempt to connect to 127.0.0.1:8019
(localhost) failed 111
[Mon Sep 04 20:13:21 2006] [error] ajp13.connect() failed ajp13:localhost:8019
[Mon Sep 04 20:13:21 2006] [error] ajp13.service() failed to connect endpoint errno=9 \xe4
\xb8\x8d\xe6\xad\xa3\xe3\x81\xaa\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab\xe8\xa8\x
98\xe8\xbf\xb0\xe5\xad\x90\xe3\x81\xa7\xe3\x81\x99
[Mon Sep 04 20:13:21 2006] [error] ajp13.service() Error forwarding ajp13:localhost:8019
1 1
[Mon Sep 04 20:13:21 2006] [notice] ajp13.done() close endpoint ajp13:localhost:8019 error
_state 1
[Mon Sep 04 20:13:21 2006] [error] lb.service() worker failed 120000 for ajp13:localhost:8
019
[Mon Sep 04 20:13:21 2006] [error] channelUn.connect() connect failed 2 \xe3\x81\x9d\xe3\x
81\xae\xe3\x82\x88\xe3\x81\x86\xe3\x81\xaa\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab
\xe3\x82\x84\xe3\x83\x87\xe3\x82\xa3\xe3\x83\xac\xe3\x82\xaf\xe3\x83\x88\xe3\x83\xaa\xe3\x
81\xaf\xe3\x81\x82\xe3\x82\x8a\xe3\x81\xbe\xe3\x81\x9b\xe3\x82\x93
[Mon Sep 04 20:13:21 2006] [error] ajp13.connect() failed ajp13:/opt/33/work/jk2.socket

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧