[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jacorb-developer
Subject:    Re: [jacorb-developer] Narrow of Event Channel (running behind a
From:       Nicolas Noffke <Nicolas.Noffke () prismtech ! com>
Date:       2007-02-06 8:47:43
Message-ID: 45C840AF.1000409 () prismtech ! com
[Download RAW message or body]

Hi Rama,
the general problem here is that the server isn't aware that it's behind
a NAT device and adds its local endpoint to its IOR. You could try to
play around with jacorb's proxy properties, but that usually results in
very fragile setups, because that's just a dumb replace of host/port
information in the IOR and may lead to the server being inaccessible
from the protected network.

You may want to have a look at Xtradyne's I-DBC
(http://www.xtradyne.com/products/i-dbc/i-dbc.htm) which directly
addresses your problem, but it's not free, I'm afraid.

Regards,
  Nicolas


Nalla wrote:
> I have problem connecting my client program to the JacOrb Event Channel. My
> Corba Server is behind a firewall. Here are the details:
> 
> The JacOrb Corba Server which is also running the event service is behind a
> firewall. The firewall address is 12.34.56.78. The internal address of the
> machine running the Server inside the firewall is 192.168.1.101. I have
> setup port forwarding on my LinkSys Router (also a firewall) to forward all
> incoming requests on 12.34.56.78 at certain range of ports to the internal
> machine 192.168.1.101 which is behind the router/firewall.
> 
> The client does not use the IOR file mechanism to bind to the NameService.
> Instead, it uses the corbaloc mechanism to bind to the NameService that is
> running on the Server behind the firewall. The client's jacorb.properties is
> setup using the following property in order to use the corbaloc feature:
> 
> ORBInitRef.NameService=corbaloc::12.34.56.78:3034/StandardNS/NameServer-POA/_root
> 
> Now, the client program is able to connect to the server by successfully
> binding to the NameService. The client also was able to successfully
> obtain/bind (resolve and narrow) one of the server interfaces. However, I am
> unable to successfully connect to the Event Channel. I am using the
> PushSupplier/PushConsumer model. The client program was trying to connect to
> the internal address 192.168.1.101 which is behind the firewall while trying
> to narrow the EventChannel reference. I have not specified the internal
> address (192.168.1.101) of the server any where in the client's
> jacorb.properties. I have specified only the external address 12.34.56.78 in
> the jacorb.properties while defining the ORBInitRef.NameService using
> corbaloc. I am thinking that some how while resolving the EventChannel using
> the namingContext.resolve(), the client was sent the internal address
> 192.168.1.101 and hence the reason for the client program trying to connect
> to the internal address 192.168.1.101 during the
> org.omg.CosEventChannelAdmin.EventChannelHelper.narrow() operation.
> 
> Is there a way to specify to the server so that the client's narrow
> operation on the EventChannelHelper class uses the external ip address
> (i.e., in this case 12.34.56.78? Following shows the exception stack trace.
> 
> Thanks,
> -Rama
> 
> jaco client.MyClient
> [jacorb.orb] INFO :
>         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>         JacORB V 2.2.3, www.jacorb.org
>         (C) The JacORB project 10-Dec-2005
>         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> [jacorb.orb.intercept] INFO : InterceptorManager started with 0 SIs, 0 CIs
> and 1
>  IORIs
> [jacorb.orb.giop] INFO : ClientConnectionManager: created new
> ClientGIOPConnecti
> on to 12.34.56.78:1118 (17ce4e7)
> [jacorb.orb.iiop] INFO : Connected to 12.34.56.78:1118 from local port 3524
> Bound to Xyz Interface.
> [jacorb.orb] INFO :
>         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>         JacORB V 2.2.3, www.jacorb.org
>         (C) The JacORB project 10-Dec-2005
>         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> [jacorb.orb.intercept] INFO : InterceptorManager started with 0 SIs, 0 CIs
> and 1
>  IORIs
> [jacorb.orb.giop] INFO : ClientConnectionManager: created new
> ClientGIOPConnecti
> on to 12.34.56.78:1118 (140c281)
> [jacorb.orb.iiop] INFO : Connected to 12.34.56.78:1118 from local port 3525
> [jacorb.orb.giop] INFO : ClientConnectionManager: created new
> ClientGIOPConnecti
> on to 192.168.1.101:1121 (146c1d4)
> [jacorb.orb.iiop] INFO : Retrying to connect to 192.168.1.101:1121
> [jacorb.orb.iiop] INFO : Retrying to connect to 192.168.1.101:1121
> [jacorb.orb.iiop] INFO : Retrying to connect to 192.168.1.101:1121
> [jacorb.orb.iiop] INFO : Retrying to connect to 192.168.1.101:1121
> [jacorb.orb.iiop] INFO : Retrying to connect to 192.168.1.101:1121
> org.omg.CORBA.TRANSIENT: Retries exceeded, couldn't reconnect to
> 192.168.1.101:1
> 121
>         at
> org.jacorb.orb.iiop.ClientIIOPConnection.connect(ClientIIOPConnection
> .java:218)
>         at
> org.jacorb.orb.giop.GIOPConnection.sendMessage(GIOPConnection.java:83
> 5)
>         at
> org.jacorb.orb.giop.GIOPConnection.sendRequest(GIOPConnection.java:80
> 5)
>         at
> org.jacorb.orb.giop.ClientConnection.sendRequest(ClientConnection.jav
> a:302)
>         at
> org.jacorb.orb.giop.ClientConnection.sendRequest(ClientConnection.jav
> a:282)
>         at org.jacorb.orb.Delegate.invoke_internal(Delegate.java:912)
>         at org.jacorb.orb.Delegate.invoke(Delegate.java:857)
>         at org.jacorb.orb.Delegate.is_a(Delegate.java:1268)
>         at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:49)
>         at
> org.omg.CosEventChannelAdmin.EventChannelHelper.narrow(EventChannelHe
> lper.java:57)
>         at client.PushConsumerThread.<init>(MyClient.java:95)
>         at client.MyClient.bindToEventChannel(MyClient.java:339)
>         at client.MyClient.setupServerComm(MyClient.java:321)
>         at client.MyClient.<init>(MyClient.java:299)
>         at client.MyClient.main(MyClient.java:1094)
> Exception in thread "main" java.lang.NullPointerException
>         at client.PushConsumerThread.<init>(MyClient.java:101)
>         at client.MyClient.bindToEventChannel(MyClient.java:339)
>         at client.MyClient.setupServerComm(MyClient.java:321)
>         at client.MyClient.<init>(MyClient.java:299)
>         at client.MyClient.main(MyClient.java:1094)
> 


-- 
Nicolas Noffke                        nicolas.noffke@prismtech.com
OpenFusion CORBA & OpenSlice DDS      http://prismtech.com/middleware


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic