Network Binding causes message DHCP request packet listener online

I installed the network binding and created a ping device that contacts www.google.de every 2 minutes.
I see in the log file every 6 minutes a message caused by this. I guess it is caused by the network binding, because it wasn’t there before.

What is causing these messages? Is there a way to get rid of them as they are spamming my log file?

2023-12-30 14:44:12.284 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 14:50:27.602 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 14:56:42.927 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 15:02:58.242 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 15:09:13.580 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 15:15:28.898 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 15:21:44.219 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 15:27:59.536 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 15:34:14.854 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 15:40:30.175 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 15:46:45.496 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 15:53:00.860 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 15:59:16.190 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 16:05:31.510 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2023-12-30 16:11:46.829 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online

This is due to this line:

1 Like

Ok, thanks. So there is no way to get rid of it :frowning:

Within shell:
log:set WARN org.openhab.binding.network.internal.dhcp.DHCPPacketListenerServer

This should update also you logging configuration and retain it over OH restarts.

1 Like

And in case the level of this log is inappropriate for everybody, someone could propose a code change in Github.

1 Like

I’m running OpenHAB in Docker on a Raspberry Pi. Where exactly do I have to enter this command?
I guess to ssh into the Pi and enter the command will not do the trick…

docker exec -it <container-name> bash then you can do ssh -p 8101 openhab@127.0.0.1; default password is habopen.
Alternatively you can expose port 8181 and connect using ssh client on host system.

There is also java client which you can call. I can’t remember exact path but it might be /openhab/runtime/bin/client.sh. If you will look for client.sh you will find it for sure as there is only one script with this name.

1 Like

Thank you.
For some reason it did not work when executing the “log:set” command in a bash opened with “docker exec …”, but it did work with “ssh -p 8101 openhab@127.0.0.1

bernd@LM-21:~$ ssh pi@192.168.178.52
pi@192.168.178.52’s password:

pi@raspberrypi:~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1571aeb8ddc5 openhab/openhab:4.0.2 “/entrypoint gosu op…” 4 months ago Up 2 months (healthy) openhab400

pi@raspberrypi:~ $ docker exec -it 15 bash
root@raspberrypi:/openhab# log:set WARN org.openhab.binding.network.internal.dhcp.DHCPPacketListenerServer
bash: log:set: command not found

root@raspberrypi:/openhab# exit
exit
pi@raspberrypi:~ $ ssh -p 8101 openhab@127.0.0.1
Password authentication
Password:
openhab> log:set WARN org.openhab.binding.network.internal.dhcp.DHCPPacketListenerServer
openhab>

openhab> logout
Connection to 127.0.0.1 closed.
pi@raspberrypi:~ $ logout
Connection to 192.168.178.52 closed.
bernd@LM-21:~$

container name yo have to pass to docker exec is openhab400 or 1571aeb8ddc5. I dont see forwarded ports in your docker output so I can just guess, based on later output, that port 8101 might be forwarded (based on a fact that client ip is recognized as 192.168.178.52).
You can retry docker exec and then confirm that change was made through log:get org.openhab.binding.network.internal.dhcp.DHCPPacketListenerServer. If it will return WARN then you have access to openhab shell from your raspberry.

1 Like

I thought that a part of the ContainerID, like 15 in my case, is good enough, when it can uniquely identify a container with it.

Anyways it did already work after ssh to 127.0.0.1!
No more info messages in my log file :slight_smile: