[omniORB] Strange omniORB domain socket behavior

Duncan Grisby duncan at grisby.org
Wed Oct 4 14:02:31 BST 2006


On Monday 2 October, John Kamenik wrote:

> I am using omniORB 4.0.7 and have found that Unix Domain sockets are
> tied to the hostname and if you change the hostname the IOR no longer
> works because it cannot get a usable profile with the new hostname.
> Is there a way to get omniORB to assume "localhost" if a unix socket
> is used, instead of looking up hostname?
> 
> Simple Example (Note: programs were in Python):
> 
> oldname $ ./echo_server -f /tmp/echo.ior
> oldname $ ./echo_client -f /tmp/echo.ior "testing"
> testing
> oldname $ hostname newname
> newname $ ./echo_client -f /tmp/echo.ior "test again"
> CORBA.TRANSIENT(omniORB.TRANSIENT_NoUsableProfile,CORBA.COMPLETED_NO)

omniORB uses the hostname to tell if the IOR is for an object on the
same host, and therefore can be contacted by Unix domain sockets. If it
didn't do tha, then when it received an IOR with Unix socket info in it,
it would have no way of knowing whether it was valid to try the Unix
socket or not. It could end up contacting a local server when it was
meant to be contacting a remote one.

There is no option to put anything other than the hostname in the Unix
socket profile, and it's hardcoded to match it against the hostname when
deciding if a Unix socket can be used. If you want to change that, the
code is in src/lib/omniORB/orbcore/ior.cc.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list