简体   繁体   English

HTTPD mod_jk重定向到glassfish服务器无法正常工作

[英]Httpd mod_jk redirection to glassfish server doesnot work properly

I have this web-application hosted on Glassfish server which works fine if it is accessed directly on port 8080 over HTTP or 8181 over HTTPS. 我将这个Web应用程序托管在Glassfish服务器上,如果通过HTTP直接在端口8080或通过HTTPS直接在端口8080上访问它,则可以正常运行。

In my production environment we have a front-end Webserver which is exposed over Internet. 在我的生产环境中,我们有一个通过Internet公开的前端Web服务器。 It is Apache httpd service, which comes bundled with RHEL server. 它是RHEL服务器随附的Apache httpd服务。 This web server redirects requests using mod_jk module to appropriate back-end Application server. 该Web服务器使用mod_jk模块将请求重定向到适当的后端应用程序服务器。 So I have configured my Glassfish server to have a JKListener listening on port xxx and Web server is configured to redirect any requests for my new web application to Glassfish JKListener. 因此,我已将Glassfish服务器配置为在端口xxx上侦听JKListener,并且将Web服务器配置为将对新Web应用程序的任何请求重定向到Glassfish JKListener。

At first it seems working fine, redirect happens as expected. 起初看起来工作正常,重定向按预期进行。 But soon my web application stops responding, and nothing happens till I restart Glassfish server. 但是很快我的Web应用程序停止响应,在重新启动Glassfish服务器之前什么也没有发生。

On digging into logs of mod_jk I found following errors - 在研究mod_jk的日志时,我发现以下错误-

1 - 

 [info] ajp_send_request::jk_ajp_common.c [1234] (worker) all endpoints are dissconnected , detected by connect check [1], cping (0), send (0)

2 -

 [info] jk_handler::mod_jk.c (2618): Service error=-3 for worker=worker1

 [error] ajp_service::jk_ajp_common.c (2559): (worker1) connecting to tomcat failed.

 [info] ajp_service::jk_ajp_common.c (2540): (worker1) sending request to tomcat failed 
 (recoverable), because of error during request sending (attempt=2)

 [error] ajp_send_request::jk_ajp_common.c (1585): (worker1) connecting to backend      failed. Tomcat is probably not started or is listening on the wrong port (errno=111)

 [info] ajp_connect_to_endpoint::jk_ajp_common.c (959): Failed opening socket to   (A.B.C.D:xxx) (errno=111)

First log item was also repeated many times when everything seems working fine 当一切看起来都正常时,第一个日志项也被重复了很多次

There was nothing available regarding this in glassfish logs, below are the details of environment 玻璃鱼原木中没有与此相关的信息,以下是环境的详细信息

  1. Front end web server : RHEL 4.5, Apache Httpd 2.0.57 前端网络服务器:RHEL 4.5,Apache Httpd 2.0.57
  2. Web application server : RHEL 5.4 , glassfish 3.1.2.2 Web应用程序服务器:RHEL 5.4,glassfish 3.1.2.2
  3. Web application - uses JSF 2.1, Primefaes 3.5, using Primepush for server sent events Web应用程序-使用JSF 2.1,Primefaes 3.5,使用Primepush进行服务器发送的事件

Did you add your page exception to virtualhosts? 您是否将页面例外添加到虚拟主机? Try this : http://www.codefactorycr.com/glassfish-behind-apache.html 试试这个: http : //www.codefactorycr.com/glassfish-behind-apache.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM