Connection delay for service endpoins in IcGridRegistry with a multihomed network interface

on some of our servers we configured a second IP on the normal eth0 interface. A so called multihoming/multihome.
In our example there is one IP for the LAN (10.13.0.67) and one for a RS232-IP-Bridge (192.168.1.67).

We did not configure any explicit endpoints in our adapters (just plain default or tcp), so the registry is answering calls for the services with two possible endpoints. endpoints = tcp -h 10.13.0.67 -p 65230 -t 60000:tcp -h 192.168.1.67 -p 65230 -t 60000
After receiving a ObjectPrx from the registry query and try to cast it (checkedCast) there is a 20 seconds delay in establishing the connection to the LAN endpoint. 2018-03-21 14:33:15.563 | "'retrieved endpoints from locator,...2018-06-21 14:33:36.583 | "'established tcp connection …

Is there a possibility to Wildcard the LAN IP address so only this one would be used as endpoint address, without configuring all of our services with the correct IP from the server? Or what is possible to causing the delay?

Best Answer

I'm afraid it's not easily possible right now to filter out some IP addresses.

The easiest to not run into this hang would be to configure explicitly the IP address in the object adapter endpoint with the -h option. Note that you can also provide a name that resolves to the IP address. Can't you easily provide this through the XML deployment descriptor of the server? I understand this would make your configuration slightly more complicated.

Another option would be for you to do the filtering in the server implementation. For example, after creating the object adapter in the server and before activating it, you could add the following code:

Answers

I'm afraid it's not easily possible right now to filter out some IP addresses.

The easiest to not run into this hang would be to configure explicitly the IP address in the object adapter endpoint with the -h option. Note that you can also provide a name that resolves to the IP address. Can't you easily provide this through the XML deployment descriptor of the server? I understand this would make your configuration slightly more complicated.

Another option would be for you to do the filtering in the server implementation. For example, after creating the object adapter in the server and before activating it, you could add the following code:

thanks for your answer. Yes it would be possible to specify the hostname, but I'm must check if the hostname not resolves both IP addresses for the DNS request.
I think I will try to implement your solution and establish a IP-Range "blacklist" for our servers in the registry. It fits for this kind of problem and sometime in bigger companies there are several "admin" network, which could be excluded also.

I was just trying to implement your solution in our code, but could it be, that the adapter.setPublishedEndpoints(valid.ToArray());
functionality is a new one? We are still on 3.6.2 and it seems, the adapter has no such function.

Would be a good reason to update to 3.7. Is it possible to mix 3.6 and 3.7 services in one Registry?