-
Notifications
You must be signed in to change notification settings - Fork 3
Bug: wrong network interface used when forwarding CORBA traffic #5
Comments
Hi @stanislaw55 :) That's an interesting point. I had a quick look and it turns out it's possible to bind the client socket to a specific interface before connecting: reader, writer = await asyncio.open_connection(
some_host, some_port, local_addr=(local_interface, 0)) This would have to be added here: tango-gateway/tangogateway/gateway.py Lines 78 to 79 in 5170d47
Also, note that the server interface can already be specified using the tango-gateway/tangogateway/cli.py Lines 35 to 38 in befdbec
Accepting both interfaces as command line arguments would be pretty neat! I'm not sure what the terminology should be though:
How should the left/right part of this diagram be called:
|
Hi @vxgmichel I forgot to mention previously that the problem is only related to events using ZMQ. Synchronous communication using CORBA works just fine. Bind address works as I agree that some kind of proper terminology is a real need for this project. Personally I have something like network A with real TANGO database and only server and network B whit just TANGO clients. Tango Gateway is sitting in between. I'll try setting |
@vxgmichel, the code you pointed to only checks connectivity. The actual connection is made in here (I think) tango-gateway/tangogateway/gateway.py Line 151 in befdbec
After investigating code it seems to work like this: From what I think, when @vxgmichel what do you think about my idea? |
Hi,
I've found (in my opinion) bug in Tango Gateway.
When Device Server and client are in different networks (say A and B) and Tango Gateway is in both of them (has network interface with different addresses in both A and B), it can choose wrong interface to forward traffic.
From client point of view, it looks like Device Server is completely down despite is running properly.
Client in network B connects to network interface of gateway B. Gateway then chooses to forward traffic to interface for network A.
It's non-deterministic bug and it happens for me when testing with Docker from time to time.
I'll try to come up with a fix
The text was updated successfully, but these errors were encountered: