Why is Connext Micro logging [Module: 4, Errcode: 215]?

By default, RTI Connext Micro will let the Network stack select the interface that will be used to receive multicast traffic. This is done by simply using INADDR_ANY (which translates to 0.0.0.0) when setting the socket option to join a multicast group (that is IP_ADD_MEMBERSHIP).

While this works in the majority of cases, some systems won’t be able to select a suitable interface, and so the operation will fail. When this happens, Connext Micro will log the following error: [Module: 4, Errcode: 215]. You may also see the setsockopt() errno code 249 (EADDRNOTAVAIL).

In the Connext Micro documentation, you can see the meaning of that error:

#define UDP_LOG_SOCKET_ADDGRP_EC   (UDP_LOG_BASE + 215)
Failed to add membership to a multicast group for a socket. 

To solve this issue, configure Connext Micro with the interface that should be used for multicast; this way, Connext Micro will use the correct address when setting the socket option. To do this, set the UDP_InterfaceFactoryProperty::multicast_interface UDP Transport property to the name of the interface that will be used to receive multicast data. For example:

udp_property->multicast_interface = DDS_String_dup("eq0");

Connext Micro will then bind multicast traffic to the “eq0” interface instead of INADDR_ANY.

Note: This issue has been seen in some QNX systems, but it may affect other platforms as well.

 

 

 
Platform: