Bug 1172419

Summary: EAP6 unable to use ports > 32767
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Qi Yong <yoqi>
Component: EJBAssignee: David M. Lloyd <david.lloyd>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.1CC: joallen, sjadhav, wili
Target Milestone: ER1   
Target Release: EAP 6.4.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1139680, 1176638    
Bug Blocks:    

Description Qi Yong 2014-12-10 02:26:06 UTC
Description of problem:
there is a bug in JBoss ClusterTopologyMessageHandler class line 110
http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss/jboss-ejb-client/1.0.24.Final/org/jboss/ejb/client/remoting/ClusterTopologyMessageHandler.java
Clustering mechanism in JBoss is sending messages between cluster nodes.

The suspicion is that in this message port is written as unsigned short but then is read as signed short - which results in negative port number:
 
11/28-07:43:54, 203 - INFO  RemotingConnectionClusterNodeManager(  83)  - Could not create a connection for cluster node ClusterNode{clusterName='ejb', nodeName='nykpsr000002249:portfolio_uat6_381_nykpsr000002249', clientMappings=[ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='10.60.77.168', destinationPort=-31869}], resolvedDestination=[Destination address=10.60.77.168, destination port=-31869]} in cluster ejb: java.lang.IllegalArgumentException: port out of range:-31869
                at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
                at java.net.InetSocketAddress.<init>(InetSocketAddress.java:224)
                at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:132)
                at org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:75)
                at org.jboss.ejb.client.remoting.RemotingConnectionManager.getConnection(RemotingConnectionManager.java:51)
                at org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager.getEJBReceiver(RemotingConnectionClusterNodeManager.java:77)
                at org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:416)
                at org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:390)
                at java.util.concurrent.FutureTask.run(FutureTask.java:262)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                at java.lang.Thread.run(Thread.java:744)
 
Due to this bug we are unable to use ports > 32767.

Version-Release number of selected component (if applicable):
6.2.1

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
unable to set prots > 32767

Expected results:
could set ports > 32767

Additional info:

Comment 3 Jan Martiska 2015-01-19 09:19:56 UTC
Verified in EAP 6.4.0.ER1 / jboss-ejb-client 1.0.28.Final