Ignoring of required ethernet interface by NetUtil

Hi @kai, like others have said before, if both network interfaces are in the same subnet (for good reasons), this will not do… ;o|

I can confirm that. I have a MAC VLAN interface and it’s impossible to get openHAB to use the right interface :neutral_face:

I just noticed something ‘funny’. Although OH reports in the log file that it is ignoring the interface with the lower IP address, it still uses that interface when I open the BasicUI as shown by a netstat command.

The log file reports:

[WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.1.2
[INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.4:8080
[INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.4:8443

But netstat -an shows:

$ netstat -an | grep 8080
tcp6       0      0 :::8080                 :::*                    LISTEN
tcp6       0      0 192.168.1.2:8080        192.168.1.152:51959     ESTABLISHED
...

Go figure… :roll_eyes:

Same problem here with Docker image. I have another docker internal network (192.168.100.0/24), which is NOT reachable from the outside, but OH is listening exactly on that IP. I need it to listen on one of the IPs in 192.168.1.0/24:

2019-04-16 11:39:25.526 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.1.111
2019-04-16 11:39:25.531 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.1.101
2019-04-16 11:39:25.638 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.100.1:8080
2019-04-16 11:39:25.638 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.100.1:8443

Is there any way to fix this? I’m testing with 2.5.0M1.

1 Like