Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
apache mod_jk负载平衡glassfish群集实例问题_Apache_Jakarta Ee_Glassfish_Mod Jk - Fatal编程技术网

apache mod_jk负载平衡glassfish群集实例问题

apache mod_jk负载平衡glassfish群集实例问题,apache,jakarta-ee,glassfish,mod-jk,Apache,Jakarta Ee,Glassfish,Mod Jk,我有一个Java EE6 EAR应用程序部署在一个开源GlassFish v3.1服务器上,该服务器运行在Windows 2003 R2服务器上,两个集群上各有两个实例。为了负载平衡工作负载,我使用带有mod_jk的apachehttp服务器。然而,当我查看jk状态页面时,我看到工作只被分发到每个集群中的一个实例,尽管所有四个实例的lbfactor都是相同的1。有什么想法吗 以下是我的workers.properties配置: worker.list=loadbalancerLocal,sta

我有一个Java EE6 EAR应用程序部署在一个开源GlassFish v3.1服务器上,该服务器运行在Windows 2003 R2服务器上,两个集群上各有两个实例。为了负载平衡工作负载,我使用带有mod_jk的apachehttp服务器。然而,当我查看jk状态页面时,我看到工作只被分发到每个集群中的一个实例,尽管所有四个实例的lbfactor都是相同的1。有什么想法吗

以下是我的workers.properties配置:

worker.list=loadbalancerLocal,status

worker.status.type=status

worker.ViewerLocalInstance1.type=ajp13
worker.ViewerLocalInstance1.host=localhost
worker.ViewerLocalInstance1.port=8109
worker.ViewerLocalInstance1.lbfactor=1
worker.ViewerLocalInstance1.socket_keepalive=1
worker.ViewerLocalInstance1.socket_timeout=1000


worker.ViewerLocalInstance2.type=ajp13
worker.ViewerLocalInstance2.host=localhost
worker.ViewerLocalInstance2.port=8209
worker.ViewerLocalInstance2.lbfactor=1
worker.ViewerLocalInstance2.socket_keepalive=1
worker.ViewerLocalInstance2.socket_timeout=1000

worker.ViewerLocalInstance3.type=ajp13
worker.ViewerLocalInstance3.host=localhost
worker.ViewerLocalInstance3.port=8309
worker.ViewerLocalInstance3.lbfactor=1
worker.ViewerLocalInstance3.socket_keepalive=1
worker.ViewerLocalInstance3.socket_timeout=1000

worker.ViewerLocalInstance4.type=ajp13
worker.ViewerLocalInstance4.host=localhost
worker.ViewerLocalInstance4.port=8409
worker.ViewerLocalInstance4.lbfactor=1
worker.ViewerLocalInstance4.socket_keepalive=1
worker.ViewerLocalInstance4.socket_timeout=1000

worker.loadbalancerLocal.type=lb
worker.loadbalancerLocal.sticky_session=True
worker.loadbalancerLocal.balance_workers=ViewerLocalInstance1,ViewerLocalInstance2,ViewerLocalInstance3,ViewerLocalInstance4
这是我的mod_jk的httpd配置

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"

JkMount /Viewer/* loadbalancerLocal
JkMount /Viewer loadbalancerLocal
JkMount /jkstatus/* status

您已打开粘性会话。试着把它关掉。如果已经设置了jvmRoute,则可能还需要取消设置它