0

我正在使用 Jboss 5.1.x 、 Apache 2.2.22 和 Mod_jk.so(1.2.37) 。当我尝试在 apache 和 jboss 之间进行集成时,我被跟踪登录 access.log 和 error.log 文件。

访问日志:-


127.0.0.1 - - [07/Sep/2013:12:48:10 +0530] "GET / HTTP/1.1" 304 -
127.0.0.1 - - [07/Sep/2013:12:48:11 +0530] "GET /favicon.ico HTTP/1.1" 404 209
127.0.0.1 - - [07/Sep/2013:12:48:14 +0530] "GET / HTTP/1.1" 304 -
127.0.0.1 - - [07/Sep/2013:12:48:15 +0530] "GET / HTTP/1.1" 304 -
127.0.0.1 - - [07/Sep/2013:12:48:19 +0530] "GET /sample HTTP/1.1" 503 323
127.0.0.1 - - [07/Sep/2013:12:48:20 +0530] "GET /sample HTTP/1.1" 503 323
127.0.0.1 - - [07/Sep/2013:12:48:24 +0530] "GET /sample HTTP/1.1" 503 323
127.0.0.1 - - [07/Sep/2013:12:48:25 +0530] "GET /sample HTTP/1.1" 503 323

错误日志:-

 [Sat Sep 07 12:46:34 2013] [notice] Apache/2.2.22 (Win32) mod_jk/1.2.37 configured -- resuming normal operations
 [Sat Sep 07 12:46:34 2013] [notice] Server built: Jan 28 2012 11:16:39
 [Sat Sep 07 12:46:34 2013] [notice] Parent: Created child process 4864
 [Sat Sep 07 12:46:34 2013] [notice] Child 4864: Child process is running
 [Sat Sep 07 12:46:34 2013] [notice] Child 4864: Acquired the start mutex.
 [Sat Sep 07 12:46:34 2013] [notice] Child 4864: Starting 64 worker threads.
 [Sat Sep 07 12:46:34 2013] [notice] Child 4864: Starting thread to listen on port 80.

错误日志:-

[Sat Sep 07 12:46:34 2013] [notice] Apache/2.2.22 (Win32) mod_jk/1.2.37 configured -- resuming normal operations
[Sat Sep 07 12:46:34 2013] [notice] Server built: Jan 28 2012 11:16:39
[Sat Sep 07 12:46:34 2013] [notice] Parent: Created child process 4864
[Sat Sep 07 12:46:34 2013] [notice] Child 4864: Child process is running
[Sat Sep 07 12:46:34 2013] [notice] Child 4864: Acquired the start mutex.
[Sat Sep 07 12:46:34 2013] [notice] Child 4864: Starting 64 worker threads.
[Sat Sep 07 12:46:34 2013] [notice] Child 4864: Starting thread to listen on port 80.

我在 apache 端使用跟随的配置文件。

Mod-jk.conf:-

LoadModule jk_module modules\mod_jk.so

JkWorkersFile conf\workers.properties
JkMountFile conf\uriworkermap.properties


JkLogFile conf\mod.jklog
JkLogLevel error
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkShmFile conf\mod.jkshm

JkMount /jkstatus/* jkstatus

JKMount /servlet* loadbalancer
JKMount /sample* loadbalancer

工人.prop:-

# Workers

worker.jkstatus.type=status
worker.jkstatus.read_only=True

worker.node-1.port=8109
worker.node-1.host=localhost
worker.node-1.type=ajp13
worker.node-1.lbfactor=1
worker.node-1.socket_timeout=5
worker.node-1.socket_keepalive=1
worker.node-1.connection_pool_timeout=300
worker.node-1.connection_pool_size=20

worker.node-2.port=8209
worker.node-2.host=localhost
worker.node-2.type=ajp13
worker.node-2.lbfactor=1
worker.node-2.socket_timeout=5
worker.node-2.socket_keepalive=1
worker.node-2.connection_pool_timeout=300
worker.node-2.connection_pool_size=20

# Load-balancing pools

worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node-1,node-2,
worker.loadbalancer.sticky_session=1

# Worker list
worker.list=loadbalancer,jkstatus

---->

当我尝试使用 localhost/sample 请求访问时,我会从浏览器窗口获得以下响应。

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

您能告诉我如何解决上述问题吗?

谢谢和问候,纳拉扬。

4

1 回答 1

1

我认为该错误是由于 mod_jk 而发生的。尽管发生了该错误,但您可以通过 apache 服务器调用您的 Web 应用程序。

通常,我们使用 AJP 连接器通过端口(8009)将 Apache 集成到 Jboss。因此,您必须在 etc/httpd/conf.d/proxy_ajp.conf 中传递您的 Web 应用程序地址,例如 ProxyPass /mywebapp/ ajp://jbossserverip:8009/mywebapp/

在您的浏览器中,输入您的 apache 服务器地址 apacherserveripaddress/mywebapp/

于 2013-09-16T07:57:48.253 回答