tango-controls / JTango

TANGO kernel Java implementation. JTango moved to https://gitlab.com/tango-controls/JTango
http://tango-controls.org
8 stars 14 forks source link

Event reconnection (client side) problem when the remote device server is running on a host with several network interfaces #71

Closed bourtemb closed 5 years ago

bourtemb commented 5 years ago

Event reconnection problems can occur in the following conditions. A Java client has already subscribed to Tango events on a device server which is running on a host with several network interfaces and the first endpoint listed in the return value of ZmqEventSubscriptionChange is an endpoint on a network which is not accessible from the java client. In this case, the event reconnection does not work properly. It looks like a call similar to ZmqEventConsumer.checkZmqAddress() is missing in ZmqEventConsumer.reconnectToEvent() and ZmqEventConsumer.reconnectToChannel() methods.

ZmqEventConsumer.checkZmqAddress() is modifying the DeviceData which was returned by ZMQEventSubscriptionChange command and put an available endpoint as the first elements of the StringArray part of the DevVarLongStringArray DeviceData. These first elements are the ones (and only ones) which seem to be used by ZMQUtils.connectHeartbeat() and ZMQUtils.connectEvent() (more precisely by ZMQUtils.getBufferToConnectEvent() and ZMQUtils.getBufferToConnectHeartbeat() methods).

bourtemb commented 5 years ago

There is also a problem because ZmqEventConsumer.checkZmqAddress() is not taking advantage of the additional info (channel names and heartbeat names) returned by C++ device servers using recent cppTango versions. ZmqEventConsumer.checkZmqAddress() is erasing this additional information.

bourtemb commented 5 years ago

@Ingvord , do you know whether this issue was fixed at some point in the past in the versions which were rolled back?

Ingvord commented 5 years ago

@bourtemb , I do not think so.

Pascal-Verdier commented 5 years ago

Bug is fixed. Will be available in JTango-9.5.14