Discussion:
[omniORB] Multiple Addresses and NAT problem
Hunt, Dave
2006-11-22 22:10:59 UTC
Permalink
Dear all,

We have a PC on a LAN with two IP addresses; it connects to the WAN via one
router, and has a corba link to another network via a second router.
This second router applies Network Address Translation (NAT).
We are using omniOrb 4.0.7 on a Windows XP platform.
The link worked fine before we introduced NAT. I have experimented with
environment variable OMNIORB_USEHOSTNAME, and more recently omniorb
endPoint.
Either the omninames server or the Servant program fail to come up (omniorb
initialisation problems) dependant upon which things I attempt to tweak
(such as putting the port number of 2809 on the end of endPoint).
Does anyone have any ideas or examples of what should be done in these
circumstances ?

Thanks in advance,
Dave Hunt
Luke Deller
2006-11-23 04:54:56 UTC
Permalink
Post by Hunt, Dave
We have a PC on a LAN with two IP addresses; it connects to the WAN
via
Post by Hunt, Dave
one router, and has a corba link to another network via a second
router.
Post by Hunt, Dave
This second router applies Network Address Translation (NAT).
We are using omniOrb 4.0.7 on a Windows XP platform.
The link worked fine before we introduced NAT. I have experimented
with
Post by Hunt, Dave
environment variable OMNIORB_USEHOSTNAME, and more recently omniorb
endPoint.
Either the omninames server or the Servant program fail to come up
(omniorb initialisation problems) dependant upon which things I
attempt
Post by Hunt, Dave
to tweak (such as putting the port number of 2809 on the end of
endPoint).
Post by Hunt, Dave
Does anyone have any ideas or examples of what should be done in these
circumstances ?
Which side of the NAT router has its IP addresses hidden? In which
direction(s) are you trying to do CORBA calls?

If you need a client to connect to an IP which is different from what
the server thinks its IP is, then you'll need to use the
endPointNoListen configuration option to tell the server to publish an
IP in IORs which is usable by the client.

http://omniorb.sourceforge.net/omni40/omniORB/omniORB008.html#htoc101

If you need to do CORBA calls in both directions but your NAT router
only allows you to make TCP connections in one direction, then you
probably need to enable bi-directional GIOP:
http://omniorb.sourceforge.net/omni40/omniORB/omniORB008.html#toc43

Regards,
Luke.

**********************************************************************************************

Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege. If you are not
the intended recipient you must not use, distribute or copy this
email. If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this
email are not necessarily the views of XPlan Technology.

It is the duty of the recipient to virus scan and otherwise test the
information provided before loading onto any computer system.
Xplan Technology does not warrant that the
information is free of a virus or any other defect or error.
**********************************************************************************************
Hunt, Dave
2006-11-23 17:03:59 UTC
Permalink
This post might be inappropriate. Click to display it.
Harri Pasanen
2006-11-23 19:10:41 UTC
Permalink
Try:
Remove the omninames log files, which contain persistent connection
info.
Add bidir to your transport rule.
Understand what is visible from where -- nameclt resolve, catior, ping
are your tools.

You cannot listen on an external NAT:ted ip address, but you must
publish it.
See to comments in orb.conf for more info.

You can also use ssh tunneling with the above.

Harri
Post by Hunt, Dave
Thanks for replies.
From our PC we make calls to another machine, linked by two
routers. The
corba calls are made both ways.
My PC hosts the Name service.
To clarify, my PC had one NIC card, two ip addresses, 172.16.155.94
and 172.16.155.98 ( the one for the corba link).
The order that omniOrb picks up these addresses seems to affect
which IOR it reports, but I don't have any control over this!
I got around this by using the env var
OMNIORB_USEHOSTNAME=172.16.155.98 and it worked ok.
Since then, I added NAT to both routers on the corba link, and
changing this variable failed to work.
I've tried using the endPoint and endPointNoListen variables; I've
added my new external address to the network configuration of my XP
machine, 172.16.156.122. I've tried starting the omniNames service
thus :- omniNames -ignoreport -ORBendPoint
giop:tcp:192.16.156.122:2809.
Thus far, the omniNames service fails to start up.
A typical error trace is show below :-
C:\Program Files\Thales\Common>omninames -start
omniORB: Distribution date: Fri Jan 13 13:47:35 GMT 2006 dgrisby
omniORB: 172.16.155.94
omniORB: 172.16.156.122
omniORB: 172.16.155.98
omniORB: 127.0.0.1
omniORB: Maximum supported GIOP version is 1.2
omniORB: Native char code sets: UTF-8 ISO-8859-1.
omniORB: Transmission char code sets: UTF-8(1.2) UTF-8(1.1)
ISO-8859-1(1.2) ISO-8859-1(1.1) ISO-8859-1(1.0).
omniORB: Native wide char code sets: UTF-16.
omniORB: Transmission wide char code sets: UTF-16(1.2).
omniORB: Information: the omniDynamic library is not linked.
omniORB: DefaultInitRef (file) =
omniORB: DefaultInitRef (args) =
omniORB: InitRef = NameService=corbaname::172.16.155.98
omniORB: abortOnInternalError = 0
omniORB: abortOnNativeException = 0
omniORB: acceptBiDirectionalGIOP = 0
omniORB: acceptMisalignedTcIndirections = 0
omniORB: bootstrapAgentHostname =
omniORB: bootstrapAgentPort = 900
omniORB: clientCallTimeOutPeriod = 0
omniORB: clientTransportRule = * unix,ssl,tcp
omniORB: configFile = [none]
omniORB: connectionWatchImmediate = 0
omniORB: connectionWatchPeriod = 50000
omniORB: diiThrowsSysExceptions = 0
omniORB: dumpConfiguration = 0
omniORB: endPoint = giop:tcp:172.16.156.122
omniORB: endPoint = giop:tcp::2809
omniORB: endPointPublishAllIFs = 0
omniORB: giopMaxMsgSize = 2097152
omniORB: giopTargetAddressMode = KeyAddr
omniORB: id = omniORB4
omniORB: inConScanPeriod = 180
omniORB: lcdMode = 0
omniORB: maxGIOPConnectionPerServer = 5
omniORB: maxGIOPVersion = 1.2
omniORB: maxInterleavedCallsPerConnection = 5
omniORB: maxServerThreadPerConnection = 100
omniORB: maxServerThreadPoolSize = 100
omniORB: maxSocketRecv = 131072
omniORB: maxSocketSend = 131072
omniORB: nativeCharCodeSet = ISO-8859-1
omniORB: nativeWCharCodeSet = UTF-16
omniORB: objectTableSize = 0
omniORB: offerBiDirectionalGIOP = 0
omniORB: omniORB_27_CompatibleAnyExtraction = 0
omniORB: oneCallPerConnection = 1
omniORB: outConScanPeriod = 120
omniORB: poaHoldRequestTimeout = 0
omniORB: poaUniquePersistentSystemIds = 1
omniORB: principal = [Null]
omniORB: scanGranularity = 5
omniORB: serverCallTimeOutPeriod = 0
omniORB: serverTransportRule = * unix,ssl,tcp
omniORB: strictIIOP = 1
omniORB: supportBootstrapAgent = 0
omniORB: supportCurrent = 1
omniORB: supportPerThreadTimeOut = 0
omniORB: tcAliasExpand = 0
omniORB: threadPerConnectionLowerLimit = 9000
omniORB: threadPerConnectionPolicy = 1
omniORB: threadPerConnectionUpperLimit = 10000
omniORB: threadPoolWatchConnection = 1
omniORB: traceExceptions = 1
omniORB: traceFile = [stderr]
omniORB: traceInvocations = 0
omniORB: traceLevel = 40
omniORB: traceThreadId = 0
omniORB: unixTransportDirectory = /tmp/omni-%u
omniORB: unixTransportPermission = 777
omniORB: useTypeCodeIndirections = 1
omniORB: verifyObjectExistsAndType = 1
omniORB: Initialising incoming endpoints.
giop:tcp:172.16.156.122
omniORB: throw INITIALIZE from objectAdapter.cc:262
(NO,INITIALIZE_TransportError)
Failed to initialise the POAs. Is omniNames already running?
omniORB: ORB not destroyed; no final clean-up.
Tweaking things as mentioned above results in the same failure to
create an endpoint.
Any ideas ?
Thanks,
Dave Hunt
_______________________________________________
omniORB-list mailing list
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
Privileged or confidential information may be contained in this message. If you are not the addressee of this message please notify the sender by return and thereafter delete the message, and you may not use, copy, disclose or rely on the information contained in it. Internet e-mail may be susceptible to data corruption, interception and unauthorised amendment for which Wall Street Systems does not accept liability. Whilst we have taken reasonable precautions to ensure that this e-mail and any attachments have been swept for viruses, Wall Street Systems does not accept liability for any damage sustained as a result of viruses. Statements in this message or attachments that do not relate to the business of Wall Street Systems are neither given nor endorsed by the company or its Directors.
evgeni.rojkov at durr.com ()
2006-11-23 22:33:53 UTC
Permalink
It looks like using endPoint = giop:tcp:10.50.65.239 (without port)
does not work correctly (conflict with port 2809 (?), omniNames(?),
configuration error(?))
......
omniORB: endPoint = giop:tcp:10.50.65.239
omniORB: endPoint = giop:tcp::2809
....
omniORB: Error: Unable to create an endpoint of this description:
giop:tcp:10.50.65.239
----
Using endPoint = giop:tcp:10.50.65.239:12345 (with port) works and solves my
problem
(endPointPublishAllIFs=1 helps me as well).

Thank you for help !
Regards, Evgeni
Vladislav Vrtunski
2006-11-23 22:43:59 UTC
Permalink
Post by evgeni.rojkov at durr.com ()
It looks like using endPoint = giop:tcp:10.50.65.239 (without port)
does not work correctly (conflict with port 2809 (?), omniNames(?),
configuration error(?))
configuration error, try

endPoint = giop:tcp:10.50.65.239:

Note the ":" at the end. This will make omniORB find the suitable port
to use.
Post by evgeni.rojkov at durr.com ()
......
omniORB: endPoint = giop:tcp:10.50.65.239
omniORB: endPoint = giop:tcp::2809
....
giop:tcp:10.50.65.239
----
Using endPoint = giop:tcp:10.50.65.239:12345 (with port) works and solves my
problem
(endPointPublishAllIFs=1 helps me as well).
Thank you for help !
Regards, Evgeni
_______________________________________________
omniORB-list mailing list
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
Luke Deller
2006-11-24 06:25:59 UTC
Permalink
Post by Hunt, Dave
omniORB: endPoint = giop:tcp:172.16.156.122
...
Post by Hunt, Dave
giop:tcp:172.16.156.122
This error is because you're missing a trailing colon in your endPoint
string.

Regards,
Luke.

**********************************************************************************************

Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege. If you are not
the intended recipient you must not use, distribute or copy this
email. If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this
email are not necessarily the views of XPlan Technology.

It is the duty of the recipient to virus scan and otherwise test the
information provided before loading onto any computer system.
Xplan Technology does not warrant that the
information is free of a virus or any other defect or error.
**********************************************************************************************
Duncan Grisby
2006-11-29 16:18:01 UTC
Permalink
Post by Hunt, Dave
Since then, I added NAT to both routers on the corba link, and changing this
variable failed to work.
I've tried using the endPoint and endPointNoListen variables; I've added my
new external address to the network configuration of my XP machine,
172.16.156.122. I've tried starting the omniNames service thus :-
omniNames -ignoreport -ORBendPoint giop:tcp:192.16.156.122:2809.
The problem is that 192.16.156.122 is not one of your machine's IP
addresses, but you have asked it to listen on that address. It can't
possibly do that. What you can do is tell it to publish that address in
IORs, even though it's listening on a different address. You use
-ORBendPointNoListen for that, or the new -ORBendPointPublish in omniORB
4.1.0.

You are still likely to encounter problems if you pass object references
backwards and forwards, however, since the endpoints you are publishing
are not valid everywhere. You may find it better to publish hostnames,
and use suitable hosts files or DNS set up to map names to addresses
appropriately.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Continue reading on narkive:
Loading...