HomematicGateway - Address already in use


openHAB 2 runs on RaspBerry Pi 3B (openHABian) with HM-MOD-RPI-PCB and Homegear.

Everything works so far, only in the log is the following warning:
07:03:05.279 [WARN ] [ternal.communicator.HomematicGateway] - Address already in use (Bind failed)

Any idea what the reason for this can be?

Thank you for a reply.

Your Homematic binding works, you can control HM devices but the log entry is still there? Maybe you have set the HM bridge twice? One time in the paper UI and another time in some config file?

The error means that there is already a program running that is using a port that HonematicGateway wants to use. You will need to figure out how to make the binding use a different port (I don’t know this binding) or how to make the other program using this port to use and alternative port.

Yes, my Homematic binding works.
I have found no further entry in the config files.

The homematic binding has many ports.
How can I find out which ports are occupied by other processes?

With sudo netstat -l -p --numeric-ports on the Raspi you can see the ports that are in use and the PID + process name of the programs using it.

Thanks for the tip with the port command!

I have the logging for org.openhab.binding.homematic on DEBUG put and the following has come out:
13:30:21.320 [DEBUG] [nal.communicator.server.BinRpcServer] - Stopping BIN-RPC server
13:30:21.321 [DEBUG] [nal.communicator.server.BinRpcServer] - Initializing BIN-RPC server at port 9126
13:30:21.322 [WARN ] [ternal.communicator.HomematicGateway] - Address already in use (Bind failed)

So the port 9126 is the problem.

The homematic:bridge uses the port 9126.
BIN-RPC Callback Port
Callback port of the openHAB BIN-RPC server. If no value is specified, xmlCallbackPort starts with 9126 and counts up

And java uses the port 9126.
tcp6 0 0 :::9126 :::* LISTEN 10670/java

Which port should I change and what value can I use then?

Hi Rudi,

how did you solve this problem?


Hi Martin,

no, the problem is existent.