[
https://issues.jboss.org/browse/MODCLUSTER-639?page=com.atlassian.jira.pl...
]
Radoslav Husar commented on MODCLUSTER-639:
-------------------------------------------
Here are some steps to simulate a bad proxy:
1. Configure mod_cluster to use good and bad proxy
{noformat}
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=proxy1:add(host=127.0.0.1,port=9090
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=proxy2:add(host=127.0.0.1,port=9190
/subsystem=modcluster/mod-cluster-config=configuration/:write-attribute(name=proxies,
value=[proxy1, proxy2]
{noformat}
2. Start a fake bad proxy with a python script
{code}
import socket
import sys
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.bind(('localhost', 9190))
except socket.error as e:
sys.exit()
s.listen(5)
while 1:
conn, addr = s.accept()
print 'Connection ' + addr[0] + ':' + str(addr[1])
{code}
[~aogburn] I think you got the right direction, just the extra state is unecessary.
proxy reset requests can allow for other MCMPs to bad proxy
-----------------------------------------------------------
Key: MODCLUSTER-639
URL:
https://issues.jboss.org/browse/MODCLUSTER-639
Project: mod_cluster
Issue Type: Bug
Components: Core & Container Integration (Java)
Affects Versions: 1.3.8.Final
Reporter: Aaron Ogburn
Assignee: Radoslav Husar
Priority: Critical
There's a timing issue between proxy reset requests and other MCMPs. This can allow
for some severe start up delays if there is a configured proxy that is down or
unresponsive. Start up is seen to be stalled as it tries to send enable-apps to the bad
proxy:
{code}
"ServerService Thread Pool -- 72" #134 prio=5 os_prio=0 tid=0x00007f84581fa9f0
nid=0x6718 runnable [0x00007f83c1561000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
- locked <0x00000000eb0a4700> (a java.io.InputStreamReader)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.readLine(BufferedReader.java:324)
- locked <0x00000000eb0a4700> (a java.io.InputStreamReader)
at java.io.BufferedReader.readLine(BufferedReader.java:389)
at
org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(DefaultMCMPHandler.java:529)
at
org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(DefaultMCMPHandler.java:605)
- locked <0x00000000fcaac598> (a
org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler$Proxy)
at
org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(DefaultMCMPHandler.java:429)
at org.jboss.modcluster.ModClusterService.enable(ModClusterService.java:375)
at org.jboss.modcluster.ModClusterService.start(ModClusterService.java:361)
at
org.wildfly.mod_cluster.undertow.UndertowEventHandlerAdapter.onDeploymentStart(UndertowEventHandlerAdapter.java:136)
- locked <0x00000000fcaac7a8> (a
org.wildfly.mod_cluster.undertow.UndertowEventHandlerAdapter)
at org.wildfly.extension.undertow.Host$1.invoke(Host.java:192)
at
org.wildfly.extension.undertow.UndertowService.fireEvent(UndertowService.java:249)
- locked <0x00000000fcaa4598> (a java.util.Collections$SynchronizedList)
at org.wildfly.extension.undertow.Host.registerDeployment(Host.java:189)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:103)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
{code}
This can occur because a reset request places the proxy back in an OK state, which then
allows the ENABLEs or any MCMP through.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)