Discussion:
[omniORB] tcpEndpoint::bind when using multiple network cards
Christopher Koppler
2007-09-11 17:53:01 UTC
Permalink
Hi,

I'm having a problem (using OmniORB 4.0.6 under Windows, but as far as I've seen 4.1 hasn't changed that behaviour) which I've traced to tcpEndpoint.cc:

The bind method tries (as the comment in the code also states) to find the first interface that isn't the loopback.

I have two (and sometimes three) interfaces that aren't the loopback on the server, and I need to be able to select the address of the interface (currently if I need another than the first interface the root naming context is bound to a wrong address and subsequent communication will fail) - is this possible using some configuration file entry, or do I have to change the code?

TIA, Christopher
Duncan Grisby
2007-09-11 18:05:43 UTC
Permalink
Post by Christopher Koppler
I'm having a problem (using OmniORB 4.0.6 under Windows, but as far as
I've seen 4.1 hasn't changed that behaviour) which I've traced to
The bind method tries (as the comment in the code also states) to find
the first interface that isn't the loopback.
I have two (and sometimes three) interfaces that aren't the loopback
on the server, and I need to be able to select the address of the
interface (currently if I need another than the first interface the
root naming context is bound to a wrong address and subsequent
communication will fail) - is this possible using some configuration
file entry, or do I have to change the code?
Look at the endPoint parameter:

http://omniorb.sourceforge.net/omni41/omniORB/omniORB008.html#toc42

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Christopher Koppler
2007-09-11 18:28:30 UTC
Permalink
Post by Duncan Grisby
http://omniorb.sourceforge.net/omni41/omniORB/omniORB008.html#toc42
Thanks, but I know about that, and it doesn't help.

Relevant excerpts from omniORBs trace:

omniORB: My addresses are:
omniORB: 192.168.13.10
omniORB: 157.247.28.148
omniORB: 127.0.0.1
...
omniORB: endPoint = giop:tcp:157.247.28.148:
omniORB: endPoint = giop:tcp::2809
...
omniORB: Initialising incoming endpoints.
omniORB: Explicit bind to host 157.247.28.148.
omniORB: Bind to address 157.247.28.148.
omniORB: Bind to address 0.0.0.0.
...
Starting omniNames omniORB: AsyncInvoker: thread id = 1 has started. Total threa
ds = 2
omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 2
omniORB: giopRendezvouser task execute for giop:tcp:192.168.13.10:2809
omniORB: giopRendezvouser task execute for giop:tcp:157.247.28.148:3348
for the first time.
...
...
omniORB: Dispatching remote call 'bind_new_context' to: key<NameService> (active
)
omniORB: Dispatching local call 'bind_new_context' to root/<0987e64601000d64/0>
(active)
omniORB: Creating ref to in process: root/<0987e64601000d64/1>
target id : IDL:omg.org/CORBA/Object:1.0
most derived id: IDL:omg.org/CosNaming/NamingContext:1.0
omniORB: Adding root/<0987e64601000d64/1> (activating) to object table.
omniORB: State root/<0987e64601000d64/1> (activating) -> active
omniORB: Creating ref to local: root/<0987e64601000d64/1>
target id : IDL:omg.org/CosNaming/NamingContextExt:1.0
most derived id: IDL:omg.org/CosNaming/NamingContextExt:1.0
omniORB: ObjRef(IDL:omg.org/CosNaming/NamingContext:1.0) -- deleted.
omniORB: sendChunk: to giop:tcp:127.0.0.1:3350 220 bytes
omniORB:
4749 4f50 0100 0101 d000 0000 0000 0000 GIOP............
0600 0000 0000 0000 2b00 0000 4944 4c3a ........+...IDL:
6f6d 672e 6f72 672f 436f 734e 616d 696e omg.org/CosNamin
672f 4e61 6d69 6e67 436f 6e74 6578 7445 g/NamingContextE
7874 3a31 2e30 0000 0100 0000 0000 0000 xt:1.0..........
8800 0000 0101 0200 0f00 0000 3135 372e ............157.
3234 372e 3238 2e31 3438 0000 140d 0000 247.28.148......
0e00 0000 ff00 0987 e646 0100 0d64 0000 .........F...d..
0001 0000 0300 0000 0000 0000 0800 0000 ................
0100 0000 0054 5441 0100 0000 1c00 0000 .....TTA........
0100 0000 0100 0100 0100 0000 0100 0105 ................
0901 0100 0100 0000 0901 0100 0300 0000 ................
1800 0000 0100 0000 0e00 0000 3139 322e ............192.
3136 382e 3133 2e31 3000 f90a 168.13.10...
omniORB: inputMessage: from giop:tcp:127.0.0.1:3350 284 bytes
Checkpointing Phase 1: Prepare.
omniORB: createLocalObjRef -- reusing reference from local ref list.
omniORB: createLocalObjRef -- reusing reference from local ref list.
ComniORB:
4749 4f50 0100 0100 1001 0000 0000 0000 GIOP............
0800 0000 01cd cdcd 0b00 0000 4e61 6d65 ............Name
5365 7276 6963 65cd 0500 0000 6269 6e64 Service.....bind
006e 6577 0000 0000 0300 0000 0500 0000 .new............
4153 414d 0000 0000 0100 0000 0053 414d ASAM.........SAM
0400 0000 4143 4900 0100 0000 0000 0000 ....ACI.........
1500 0000 5055 4d41 2054 6573 7462 6564 ....PUMA Testbed
204d 616e 6167 6572 00cd cdcd 1000 0000 Manager........
4143 4920 5665 7273 696f 6e20 312e 3200 ACI Version 1.2.
1c00 0000 4944 4c3a 4143 492f 4954 6573 ....IDL:ACI/ITes
7442 6564 4d61 6e61 6765 723a 312e 3000 tBedManager:1.0.
0100 0000 0000 0000 6000 0000 0101 0200 ........`.......
0e00 0000 3139 322e 3136 382e 3133 2e31 ....192.168.13.1
3000 150d 0c00 0000 46e6 8709 0000 0f1d 0.......F.......
0000 0001 0200 0000 0000 0000 0800 0000 ................
0100 0000 0054 5441 0100 0000 1c00 0000 .....TTA........
0100 0000 0100 0100 0100 0000 0100 0105 ................
0901 0100 0100 0000 0901 0100 ............
omniORB: Dispatching remote call 'bind' to: key<NameService> (active)
omniORB: Creating ref to remote: boa<0x46e6870900000f1d00000001>
target id : IDL:omg.org/CORBA/Object:1.0
most derived id: IDL:ACI/ITestBedManager:1.0
omniORB: Dispatching local call 'bind' to root/<0987e64601000d64/0> (active)
omniORB: Dispatching local call 'bind' to root/<0987e64601000d64/1> (active)



When binding new contexts, the correct endpoint (157.247.28.148) is used, but in the final bind call, only the wrong endpoint (192.168.13.10) is used. Subsequently, my client cannot communicate with the server, because it can only talk to it via 157.247.28.148.
I keep thinking I'm missing something blindingly obvious, but as I've tried most all configuration options and combinations thereof before debugging into omniORB itself, I'm not so sure.
Duncan Grisby
2007-09-14 20:42:32 UTC
Permalink
Post by Christopher Koppler
Post by Duncan Grisby
http://omniorb.sourceforge.net/omni41/omniORB/omniORB008.html#toc42
Thanks, but I know about that, and it doesn't help.
[...]
Post by Christopher Koppler
omniORB: endPoint = giop:tcp::2809
The problem is that omniNames adds its own endPoint argument by
default. You can prevent it from doing that by specifying -ignoreport on
the omniNames command line.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Loading...