-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network Emulator getNetworkInterfaces #823
Comments
To me, on Linux, this happens if the Ethernet interface has no link (cable unplugged) disregarding if the interface is configured or not. Plugging the Ethernet cable is enough as a workaround. Emulator bundles should be pure Java. For example I believe they are used in the Windows port @malikm |
I agree that the emulator bundle should be capable of running on all platforms. I could imagine however that the emulator bundle does not use any network interfaces at all. Just uses a dummy set of interfaces. Like the other emulator bundles do. |
@dwoodard1: This is a total mess. Background: The only need for all this is the auto-configuration of the MQTT client ID from the MAC address of the primary network interface whose name is different on the Mac, Windows and Linux. On Linux this is further complicated by the Consistent Network Device Naming Kura first checks the value of
In both cases the MAC address of the primary network interface returned by the SystemService will be null and the MQTT client ID will not be auto-configured. As a result Kura will not attempt to connect to the MQTT broker. This is not shown in the Web UI, only in the Kura log. One option is to move the OS specific code for Mac and Windows from the SystemService to the net.emulator, adding the code for Linux. This is not ideal though and you still have the problem 1) above (Linux Consistent Network Device Naming). Another option is to remove the OS specific code entirely and add a warning in the Web UI if the MQTT client ID cannot be auto-configured and it must then be manually entered. In practice this should only be needed from the Kura emulator. About NN installers, they only support Linux (RPI, Beaglebone etc). I believe we could replace org.eclipse.kura.emulator.net with org.eclipse.kura.linux.net in the distrib and it should always work. |
So, is there a solution or workaround for this?.. I mean, I am simply running the Kura Emulator inside Eclipse and the error appears always, in the console/log, when starting the platform. I am using my CentOS 7 and connecting or disconnecting the network cable link does not make any difference. Regards, |
what is the name of the network interface in your CentOS box? |
any luck assigning |
It works if I set kura.primary.network.interface=enp0s25 in the kura.properties for the Emulator project... but only when I have the network cable linked, otherwise it fails with this exception:
Regards, |
This issue is stale because it has been open for 60 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
The network emulator bundle uses java.net.NetworkInterface.getNetworkInterfaces() for retrieving a list of network interfaces. This method has a shortcoming in that it only returns configured interfaces. Interfaces that have not been configured are not returned. This is not ideal for those using the "no networking" versions of Kura. The emulator getNetworkInterfaces() method should be updated to use standard Linux utilities (ip, etc.) to retrieve network interface information.
The text was updated successfully, but these errors were encountered: