gpt4 book ai didi

tomcat - 使用 Apache mod_jk.c 进行负载平衡 (3791) : missing uri map for localhost

转载 作者:行者123 更新时间:2023-11-28 23:33:20 24 4
gpt4 key购买 nike

对于需求,我需要为 Web 应用程序做负载平衡。

我正在努力解决以下问题。请看日志

[Tue Jan 06 15:20:06 2015] [10548:14728] [debug] jk_shm_attach::jk_shm.c (337): Attached shared memory memory [1] size=3072 free=0 addr=0x50aa80
[Tue Jan 06 15:20:06 2015] [10548:14728] [debug] jk_child_init::mod_jk.c (3266): Initialized mod_jk/1.2.40
[Tue Jan 06 15:20:55 2015] [10548:11696] [debug] jk_translate::mod_jk.c (3623): missing uri map for localhost:/eimsgoed
[Tue Jan 06 15:20:55 2015] [10548:11696] [debug] jk_map_to_storage::mod_jk.c (3791): missing uri map for localhost:/eimsgoed
[Tue Jan 06 15:21:56 2015] [10548:11696] [debug] jk_translate::mod_jk.c (3623): missing uri map for localhost:/eimsgoed
[Tue Jan 06 15:21:56 2015] [10548:11696] [debug] jk_map_to_storage::mod_jk.c (3791): missing uri map for localhost:/eimsgoed

/eimsgoed是我在tomcat实例中部署的应用。

请查看我的 workers.properties 文件

=============================

worker.list=balancer

worker.tomcat1.type=ajp13
worker.tomcat1.port=9004
worker.tomcat1.host=localhost

worker.tomcat2.type=ajp13
worker.tomcat2.port=9024
worker.tomcat2.host=localhost

worker.tomcat3.type=ajp13
worker.tomcat3.port=9012
worker.tomcat3.host=localhost


worker.balancer.type=lb
worker.balancer.balance_workers=tomcat1,tomcat2,tomcat3

worker.list=jkstatus
worker.jkstatus.type=status

我的 httpd.conf 文件

=============

LoadModule jk_module modules/mod_jk.so

# Path to workers.properties
JkWorkersFile conf/workers.properties

# Path to jk logs
JkLogFile logs/mod_jk.log

# Jk log level [debug/error/info]
JkLogLevel debug

# Jk log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

# JkOptions for forwarding
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"



JkMount /eimsgoed balancer
JkMount /status jkstatus

我的所有 3 个 tomcat 实例的 server.xml

==============================

tomcat 1个实例

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="9004" protocol="AJP/1.3" redirectPort="9003" />

<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1">

tomcat 2实例

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="9024" protocol="AJP/1.3" redirectPort="9023" />
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat2">

tomcat 3实例

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="9012" protocol="AJP/1.3" redirectPort="9011" />

<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat3">

URI 哪里出错了?

[Tue Jan 06 15:21:56 2015] [10548:11696] [debug] jk_map_to_storage::mod_jk.c (3791): missing uri map for localhost:/eimsgoed

有关信息,我正在使用 Tomcat 7、Apache HTTP Server 2.4.10 和 Tomcat Mod_JK 连接器 1.2.40、Windows 7 操作系统

请就此问题向我提出建议。

最佳答案

这与在 VirtualHost 中指定 JKMount 的答案基本相同,但您可以只指定 JKMountCopy=On 而不是复制相同的配置。这是它的样子:

<VirtualHost _default_:443>
DocumentRoot "${SRVROOT}/htdocs"
ServerAdmin admin@example.com
ErrorLog "${SRVROOT}/logs/error.log"
TransferLog "${SRVROOT}/logs/access.log"
SSLEngine on
...
JkMountCopy On
</VirtualHost>

问题是这个配置不会被虚拟主机继承,你必须指定这个指令才能继承它。

关于tomcat - 使用 Apache mod_jk.c 进行负载平衡 (3791) : missing uri map for localhost,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27796559/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com