I also asked Gerhard offline for some help and he pushed me to the right direction. In fact it is important that CCU/RasperryMatic can connect on 2 ports back to OH2 server. By default these are 9125 & 9126 as per docu
So I ssh’ed into CCU and tested connecting back to OH2 server using telnet. I was able to connect on 9126 but NOT on 9125. Thus I checked OH server whats wrong on this port.
Using netstat command:
root@nuc:/var/log# netstat -tulpn |grep 91
tcp6 0 0 127.0.1.1:9125 :::* LISTEN 495/java
tcp6 0 0 192.168.23.16:9126 :::* LISTEN 495/java
udp6 0 0 :::34917 :::* 495/java
I saw that port 9125 was only listening to debian called local_hostname and not the real IP. So I checked why.
/etc/hostname gives you the real hostname and in /etc/hosts you can check which IP is mapped to this name.
And indeed, there were 2 lines using the hostname. One mapping to 172.0.1.1 and the other mapping to the real OS IP. I commented out the 127.0.1.1 line and restared Homematic binding. And tada:
root@nuc:/var/log# netstat -tulpn |grep 91
tcp6 0 0 192.168.23.16:9125 :::* LISTEN 495/java
tcp6 0 0 192.168.23.16:9126 :::* LISTEN 495/java
udp6 0 0 :::34917 :::* 495/java
OH is now listening on the real IP and immediatly the Homematic binding went online again. And most important: It remains online.
Thanks everyone for supporting me in giving troubleshooting ideas! really appreciate your help.
Thanks