Bugs item #913634, was opened at 2004-03-10 17:32
Message generated for change (Comment added) made by ejort
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=913634&group_id=22866

Category: JBossMQ
Group: v3.2
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Tim De Vos (tdevos)
Assigned to: Adrian Brock (ejort)
Summary: Wrong IP used in OIL and UIL

Initial Comment:
Operating system used: Windows 2000 server
JDK: 1.4.2_03
JBoss version tested: 3.2.3
Description:

The following test-environment is used:

On location A:
- JBoss 3.2.3 binded to 192.168.0.1
- There is a router/firewall with all necessary ports open 
on location A with external IP (example): 212.212.212.1 
(DNS name "locationA")
- The DNS name "locationA" is internally (only on 
location A) resolved to 192.168.0.1. This is done by 
editing the hosts file in windows.
- JBoss is started with -blocationA and -
Djava.rmi.server=locationA

On location B:
- A JMS runs on a machine with IP 192.168.0.31. The 
client connects to "locationA".
- There is a router/firewall with all necessary ports open 
on location B with external IP (example): 212.212.212.2

If the client on location B connects to locationA then a 
connection is made. However the client now tries to 
establisch a connection to 192.168.0.1 (the internal IP 
of locationA). Instead it should use the hostname and 
resolve it to the correct IP. The problem is that the 
server IP is sent to the client using serialization. It 
should be looked up again.

You can fix it by changing 
org.jboss.mq.il.uil2.UILServerIL (line 576):

if( localAddr != null )
               socket = socketFactory.createSocket(addr, 
port, localAddr, localPort);
            else
               socket = socketFactory.createSocket(addr, 
port);
            break;

to the following code:

if( localAddr != null ) {              
               socket = socketFactory.createSocket
(addr.getHostName(), port, localAddr, localPort);
            }
            else {                    
               socket = socketFactory.createSocket
(addr.getHostName(), port);
            }

I tested with OIL and UIL2 but probably OIL2 and others 
have the same problem. So OILServerIL.java and others 
have to be changed also.

Tim De Vos


----------------------------------------------------------------------

>Comment By: Adrian Brock (ejort)
Date: 2004-03-18 14:16

Message:
Logged In: YES 
user_id=9459

There is a 24 hour delay before it becomes available to
anonymous CVS.

When I said the "other ILs", I meant the TCP/IP versions.
There is nothing wrong with the HTTP/JVM/RMI ILs
other than the RMI version is slow and HTTP does polling which
has some latency.

Currently there are 4 TCP/IP ILs OIL/OIL2/UIL/UIL2 - only
UIL2 is actively
developed. It is on my TODO list to rewrite OIL using
similar techniques
to UIL2 (i.e. without the stupid synchronization)

Bug reports are not really the place for this type of
discussion.

Regards,
Adrian

----------------------------------------------------------------------

Comment By: Tim De Vos (tdevos)
Date: 2004-03-17 17:03

Message:
Logged In: YES 
user_id=994826

I checked out the nightly build of 3.2.4 but I can`t find a 
property useServerHost in the source-code. 

is this correct?

Will the HTTP IL also be deprecated?

Regards,

Tim De Vos

----------------------------------------------------------------------

Comment By: Adrian Brock (ejort)
Date: 2004-03-16 21:45

Message:
Logged In: YES 
user_id=9459

I have added the system property
org.jboss.mq.il.uil2.useServerHost
on the client which when set to true will connect to the
HostName
rather than the ip address.

The other ILs are deprecated.

Regards,
Adrian

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=913634&group_id=22866


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to