[omniORB] nameServer Connection - localhost vs. 127.0.0.1

Ando Noriaki n-ando at aist.go.jp
Wed Jul 8 18:17:34 BST 2009


Hello

I faced same problem on Ubuntu 9.04 and omniORB-4.1.3.
>From Ubuntu 9.04, IPv6 is disabled in default settings.
I have some question as follows.

1. LibcWrapper::getAddrInfo() returns multiple address infomation
 including ipv6 (localhost as ::1) address and ipv4 (localhost as 127.0.0.1)
 address on the Ubuntu 9.04. (order: ipv6->ipv4)

2. However tcpAddress::Connect() tries to connect to only the first
ipv6 address.
 Is there loop for multiple addresses which returned by getaddrinfo()?

3. I modified tcpAddress::Connect() and added tcpAddress::tryConnect()
 functions as follows. (see also attached patch) This works well at least
 in my environment. How do you think about it?

<pseudo code>
giopActiveConnection* tcpAddress::Connect(...) {
  AddrInfo* ai0 =getAddrInfo(); // this returns multiple addresses

  for (AddrInfo* ai = ai0; ai != 0; ai = ai->next()) {
     giopActiveConnection* connection = tryConnect(ai, ...);
     if (connection != 0) return connection;
  }
  return 0;
}

tcpAddress::tryConnect() is almost same as original tcpAddress::Connect()

4. sslAddress::Connect() and unixAddress::Connect() might need same patch?

Best regards,
Noriaki Ando


2009/6/18 Duncan Grisby <duncan at grisby.org>:
> On Thursday 18 June, =?ISO-8859-15?Q?Michael_J=E4ntsch?= wrote:
>
>> ok, I now found the problem.
>>
>> For those who are interested:
>> The PC where it did not work was set up to use ipv6 for localhost
>> ::1     localhost ip6-localhost ip6-loopback (in /etc/hosts)
>>
>> I am not sure why that made the whole communication break but it did.
>> Maybe some problem with omniOrb and ipv6???
>
> IPv6 should work fine on Linux.
>
> Please can you send a trace from traceLevel 25 from both omniNames and
> your client code on the machine that's failing?
>
> Cheers,
>
> Duncan.
>
> --
>  -- Duncan Grisby         --
>  -- duncan at grisby.org     --
>   -- http://www.grisby.org --
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>



-- 
Noriaki Ando, Ph.D.
          National Institute of Advanced Industrial Science and Technology
          Intelligent Systems Research Institute
          Tsukuba Central 2, 1-1-1 Umezono, Tsukuba, Ibaraki 305-8568 JAPAN.
          TEL: +81-29-861-5981 FAX: +81-29-861-5971
          e-mail: n-ando at aist.go.jp, n-ando at ieee.org
          RT-Middleware: http://www.openrtm.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: omniORB4_getaddrinfo_ipv6.patch
Type: application/octet-stream
Size: 2284 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090708/a206f4c1/omniORB4_getaddrinfo_ipv6.obj


More information about the omniORB-list mailing list