帮助使用 mod_jk 转发到后端应用程序服务器

发布于 2024-08-09 18:35:19 字数 1788 浏览 7 评论 0原文

我之前有 mod-jk 可以工作,但是在切换服务器并修改一些文件后,它不再工作。我使用 mod_jk-1.2.28 和 JBoss 4.2.3 作为后端。

在 JBoss server.xml 文件中,我在端口 8009 上定义了 AJP 1.3 连接器,并将 jboss 绑定到服务器的新 IP 地址。我尝试转发到的应用程序部署为:

[TomcatDeployer] deploy, ctxPath=/ManualAlerts, warUrl=.../tmp/deploy/tmp8097651929280250028ManualAlertsApp.ear-contents/ManualAlerts-exp.war/

在Web服务器上,我有worker.properties,其中包含为JBoss地址和端口8009设置的worker。mod

-jk.conf有JkMount /ManualAlerts/*worker1。

难道这不应该将所有对 URL http://address/ManualAlerts/ 的 Web 服务器请求转发到后端吗应用程序名为 ManualAlerts?

mod-jk.log 显示:

[Sat Oct 31 14:19:28 2009][30709:3086014224] [error] ajp_send_request::jk_ajp_common.c (1507): (worker1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=115)
[Sat Oct 31 14:19:28 2009][30709:3086014224] [info] ajp_service::jk_ajp_common.c (2447): (worker1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Sat Oct 31 14:19:28 2009][30709:3086014224] [error] ajp_service::jk_ajp_common.c (2466): (worker1) connecting to tomcat failed.
[Sat Oct 31 14:19:28 2009][30709:3086014224] [info] service::jk_lb_worker.c (1384): service failed, worker worker1 is in error state
[Sat Oct 31 14:19:28 2009][30709:3086014224] [info] service::jk_lb_worker.c (1464): All tomcat instances are busy or in error state
[Sat Oct 31 14:19:28 2009][30709:3086014224] [error] service::jk_lb_worker.c (1469): All tomcat instances failed, no more workers left

在应用程序服务器上运行 netstat -an 显示 jboss 正在侦听 8009,并且本地地址是应用程序服务器的地址。在 mod-jk.log 中,它显示连接到 (XXX.XXX.XXX.XXX:8009) 失败,并且应用程序服务器地址在这里也是正确的。我无法弄清楚是什么导致了这个问题。

I had mod-jk working a while ago but after switching servers and modifying some files, it no longer works. I am using mod_jk-1.2.28 with JBoss 4.2.3 as the backend.

In the JBoss server.xml file I have the AJP 1.3 connector defined on port 8009 and I am binding jboss to the server's new IP address. The app I am trying to forward to is deployed as:

[TomcatDeployer] deploy, ctxPath=/ManualAlerts, warUrl=.../tmp/deploy/tmp8097651929280250028ManualAlertsApp.ear-contents/ManualAlerts-exp.war/

On the web server, I have worker.properties with a worker set for the JBoss address and port 8009.

The mod-jk.conf has JkMount /ManualAlerts/* worker1.

Shouldn't this forward all requests to the web server with the URL http://address/ManualAlerts/ to the backend app named ManualAlerts?

The mod-jk.log shows:

[Sat Oct 31 14:19:28 2009][30709:3086014224] [error] ajp_send_request::jk_ajp_common.c (1507): (worker1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=115)
[Sat Oct 31 14:19:28 2009][30709:3086014224] [info] ajp_service::jk_ajp_common.c (2447): (worker1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Sat Oct 31 14:19:28 2009][30709:3086014224] [error] ajp_service::jk_ajp_common.c (2466): (worker1) connecting to tomcat failed.
[Sat Oct 31 14:19:28 2009][30709:3086014224] [info] service::jk_lb_worker.c (1384): service failed, worker worker1 is in error state
[Sat Oct 31 14:19:28 2009][30709:3086014224] [info] service::jk_lb_worker.c (1464): All tomcat instances are busy or in error state
[Sat Oct 31 14:19:28 2009][30709:3086014224] [error] service::jk_lb_worker.c (1469): All tomcat instances failed, no more workers left

Running netstat -an on the app server shows jboss listening on 8009 and the local address is the app server's address. In the mod-jk.log it shows connect to (XXX.XXX.XXX.XXX:8009) failed, and the app-server address is correct here, too. I cannot figure out what's causing the issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

下雨或天晴 2024-08-16 18:35:19

最好发布您的 mod-jk.conf、workers.properties 和 ajp 连接定义。如果没有它们,我建议您应该尝试添加以下安装点:

JkMount /ManualAlerts worker1

It msay be s good idea to post your mod-jk.conf, workers.properties and the ajp connection definition. Without them, I'd say you should try adding the following mount point:

JkMount /ManualAlerts worker1
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文