Out of Sudden OH no Web any more

Hi,

I am running OH2 on a RasPi (Raspberry Pi 3 Model B Rev 1.2) on Raspbian (Raspbian GNU/Linux 10 (buster)).

I ran file for several month and even today. I was configuring some MQTT devices and tested something this morning. Now it is afternoon and all my web pages (Paper UI, Basic UI) where unreachable.

I rebooted the system and it looks like OH2 is running fine again. But I still can not contact it through web page (port 8080, as usual). But still: no connection.

When checking netstat -anp|grep LISTENI get:

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      654/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      951/exim4
[...]
tcp6       0      0 :::8080                 :::*                    LISTEN      586/java
tcp6       0      0 :::22                   :::*                    LISTEN      654/sshd

So looks somehow it only listens on the IPv6 interface. But as usual, I am not using IPv6 here at all. Even if this would be the issue why did this happen out of sudden?

These are the interface settings:

3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:ba:96:dc brd ff:ff:ff:ff:ff:ff
    inet 192.168.22.13/24 brd 192.168.22.255 scope global dynamic noprefixroute wlan0
       valid_lft 5930sec preferred_lft 5030sec
    inet6 fe80::76fa:c8e2:f722:eedc/64 scope link
       valid_lft forever preferred_lft forever

Main question is how to resolve the isse and go back to IPv4. What file do I have to check for the configuration here.

Remember, I can not administer OH currently through website… :frowning:

Thanks in advance for pointing to the right way!

/KNEBB

Hi,

ok, fixed in on my own.

I added -Djava.net.preferIPv4Stack=true to the /etc/default/openhab file. So the line looks like this now:
EXTRA_JAVA_OPTS="-Djava.net.preferIPv4Stack=true"
And the restarted OH2 by systemctl restart openhab2.

After this, the web interface where reachable as before. Do not ask me why this happened…it just did.

/KNEBB

1 Like