Unable to initialize network router

Iam getting this strange Error. Basic stuff of my Openhab instaalation is working (RP2, OH2 b4).

[ERROR] [org.jupnp.transport.Router          ] - Unable to initialize network router: org.jupnp.transport.spi.InitializationException: Could not initialize MulticastReceiverImpl: java.net.BindException: Address already in use
[ERROR] [org.jupnp.transport.Router          ] - Cause: org.jupnp.transport.spi.InitializationException: Could not initialize MulticastReceiverImpl: java.net.BindException: Address already in use
[INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
[INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
[INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui
[INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start

but my.openhab is not starting.

You have another process (or instance of OH) bound to one of the ports OH needs, one of 8080, 8443, or 8101.

Jup thats what i thougt. But how can i check this on Rasbian?

First stop OH (assuming it hasn’t crashed because of this error).

Then run:

sudo netstat -elf | grep 8080

If there is a process listening on 8080 this will give you a line that reads something like:

tcp6       0      0 :::8080                 :::*                    LISTEN      13213/java

The last column tells you that a program named “java” running on PID 13213 is listening on port 8080 in both TCP and UDP for both TCP v4 and v6.

Repeat for: 8080, 8433, 8101, and maybe 5353 and possibly 1900 and make sure all of them are either don’t exist or if there is something listening on the port.

“java” is not very useful. You can get more information by running:

ps -ef | grep 13213

where 13213 is the PID from the previous command. This will tell you the full path of the process which will usually tell you what it is. In my case, surprise surprise, OH 2.

rich     13213 13125  5 Oct05 ?        00:45:25 /usr/lib/jvm/java-8-oracle/bin/java -Dopenhab.home=/openhab -Dopenhab.conf=/openhab/conf -Dopenhab.runtime=/...
$ sudo netstat -nlp | grep 5353
udp        0      0  *                                                           386/avahi-daemon: r
udp6       0      0 :::5353                 :::*                                                                386/avahi-daemon: r
$ ps -ef | grep 386
avahi      386     1  0 13:04 ?        00:00:00 avahi-daemon: running [raspberry                                pi.local]
pi         408 32727  0 19:50 pts/0    00:00:00 grep --color=auto 386
avahi      411   386  0 13:04 ?        00:00:00 avahi-daemon: chroot helper

$  sudo netstat -nlp | grep 1900
udp        0      0  *                           1036/deCONZ
$ ps -ef | grep 1036
pi         421 32727  0 19:54 pts/0    00:00:00 grep --color=auto 1036
pi        1036   868  6 13:04 ?        00:26:54 deCONZ --auto-connect=1 --dbg-error=1 --http-port=80

so its avahi-deamon and deconz :confused: thats not good. deCONZ is my Zigbee Software from dresden electronic…
i have no idea what needs a avahi-deamon :confused: only other thing is homegear on this device…

what do you think is the easiest why to clear this problems now?

First try a reboot. If that doesn’t clear it up, and you need this other software running, change the ports of OH to something else.

I’m running on Docker so I’m not entirely certain the correct way to do this.

okay i checked it now with openhab running. it think the problem is this here? Or is the Openhab2 Task not even displayed here if the port is already blocked?

 $ sudo netstat -nlp | grep 5353
udp        0      0  *                           391/avahi-daemon: r
udp6       0      0 :::5353                 :::*                                723/java
udp6       0      0 :::5353                 :::*                                391/avahi-daemon: r

the java task is openhab2.
the other task is avahi-deamon, it must be something like apples bonjour service for finding devices. I think it comes with my Homegear Installation.
Now my question why does Openhab2 uses this port and how can i chacne it? I only find instructions for changing the http ports…

mhm okay its not the avahi-daemon its deconz… without it it displays me no error. Openhab2 seems to run perfectly now but still no connection to my.openhab :frowning: this drives me crazy

I do not know what that port is for or how to change it.

But if OH is starting up without showing errors in the log (or if you are on the latest build it is only complaining about Java Sound) then you have some other problem.

Can you ssh to the Karaf console?

ssh openhab@localhost -p 8101

Passoword is habopen

jap thats working. Puh i think the last time i did something with it was the b2. I have no plan how to go on now

Console instructions can be found here:


but how does it help me to find the error with my.openhab?

I don’t know because I don’t know the error. You can look at which bundles are running and such. I primarily had you rund the ssh to prove that OH was running at all. Since it is I have no ideas what could be the problem.

Are you running a firewall?

188 | Active   |  80 | 0.9.0.b1              | Eclipse SmartHome hue Binding
189 | Active   |  80 | 0.9.0.b1              | Eclipse SmartHome UPnP Transport Bundle
192 | Active   |  80 | 0.9.0.b1              | Eclipse SmartHome Map Transformation Service
193 | Active   |  80 | 2.0.0.b4              | my.openHAB Service Bundle

everything acts as it should, the log gives me no errror. I have my UIDD and my Secret. Is there somehow a way to check if there keys are the right ones?

PS: okay i set an higher Loglevel. Now i get some strange errors.

10:31:37.574 [DEBUG] [ache.sshd.common.io.nio2.Nio2Session] - Read 68 bytes
10:31:37.576 [DEBUG] [e.sshd.server.channel.ChannelSession] - Received SSH_MSG_CHANNEL_REQUEST window-change on channel ChannelSess         ion[id=0, recipient=0] (wantReply false)
10:31:37.579 [DEBUG] [e.sshd.server.channel.ChannelSession] - window-change for channel 0: (131 - 33), (0, 0)
10:31:42.461 [DEBUG] [io.socket.client.Manager            ] - attempting reconnect
10:31:42.463 [DEBUG] [io.socket.client.Manager            ] - readyState CLOSED
10:31:42.471 [DEBUG] [io.socket.client.Manager            ] - opening https://my.openhab.org:443/
10:31:42.472 [DEBUG] [io.socket.client.Manager            ] - connection attempt will timeout after 20000
10:31:42.479 [DEBUG] [io.socket.engineio.client.Socket    ] - creating transport 'polling'
10:31:42.480 [DEBUG] [io.socket.engineio.client.Socket    ] - setting transport polling
10:31:42.481 [DEBUG] [t.engineio.client.transports.Polling] - polling
10:31:42.482 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr poll
10:31:42.484 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr open GET: https://my.openhab.org/socket.io/?EIO=3&transport=polli         ng
10:31:42.486 [DEBUG] [ngineio.client.transports.PollingXHR] - sending xhr with url https://my.openhab.org/socket.io/?EIO=3&transpor         t=polling | data null
10:31:42.615 [DEBUG] [io.socket.engineio.client.Socket    ] - socket error io.socket.engineio.client.EngineIOException: xhr poll er         ror
10:31:42.617 [DEBUG] [io.socket.client.Manager            ] - connect_error
10:31:42.620 [DEBUG] [io.socket.client.Manager            ] - reconnect attempt error
10:31:42.622 [DEBUG] [io.socket.client.Manager            ] - will wait 5000ms before reconnect attempt
10:31:42.625 [DEBUG] [io.socket.engineio.client.Socket    ] - socket close with reason: transport error
10:31:42.626 [DEBUG] [t.engineio.client.transports.Polling] - transport not open - deferring close

whats the problem?
i run an unmodified raspbian, so no firewall

As you have an issue with my.openhab running an unmodified raspbian, did you check your java version?

Using the search function of our forum, you will find a couple of post regarding java/my.openhab problems and how to update to correct version.

mhm iam an java 8. Java -Version gives me a pretty similar output to the prerequisites http://docs.openhab.org/installation/index.html#prerequisites

i reinstalled openhab2 completly maybe something crashed during the last few updates. At the moment i cant reach myopenhab. I think the website is down?

What is your java version, it needs to be 1.8.0_101

Yes, my.openhab is down atm, Dan is working on recovery.

1 Like

okay this was the solution. Thank you so much. Maybe this is a thing which should be mentioned at the prerequirements in the tutorial.