Since upgrade to openHAB 2.5m2 using the official docker image the following warning shows up in logfile every 2 minutes:
[ueemulation.internal.upnp.UpnpServer] - Could not send UPNP response: Cannot assign requested address (sendto failed)
Does anybody know the reason for this warning?
I don’t know which address cannot be assigned? I am running the container in host network mode - so there should not be any address problems.
There might already be something running on that host that is bound to the UPNP port. This is a known problem when running OH and Plex on the same machine. I don’t remember which port is the default, I think it’s 5000 or something like that.
Thanx for you feedback. I checkt ports on my host system an there is nothing listening at port 1900 or 5000.
The only place where port 1900 is defined is in the docker ports section:
ports:
- "8080:8080" # HTTP port of the web interface
- "8443:8443" # HTTPS port of the web interface
- "8101:8101" # SSH port of the karaf console
- "5007:5007" # LSP port for validating rules
- "1883:1883" # MQTT port
- "8883:8883" # MQTT SSL port
- "3671:3671" # KNX port
- "4304:4304" # OneWire
- "8008:8008" # Chromecast
- "8009:8009" # Chromecast
- "5353:5353" # Multicast DNS (mDNS)
- "3813:3813" # Spotify Connect
- "3689:3689" # Digital Audio Access Protocol (DAAP)
- "554:554" # Realtime Streaming Protocol (RTSP)
- "5297:5297" # Bonjour
- "5298:5298" # XMPP
# - "1900:1900" # UPNP discovery
network_mode: host
Docker should ignore the ports section when running in “network_mode: host”.
I will try without port 1900. I am very busy at the moment so I will give feedback the next few days.
@rlkoshak Your posts helped me a lot improving my rules, patterns etc. - Thanx a lot for this great work!
The problem is not gone. Tried openhab 2.5m3 and removed the ports section in docker compose file but nothing changed. I am still getting the log messages every few minutes.
I agree that the warning should at least include the source IP address. Might be a broadcast address that the java process is not allowed to send to or similar if sendto fails.
This Topic is about the HueEmulation UPNP warning.
The Topic is marked as SOLVED, but I can’t find a solution.
The following warning shows up in logfile every 2 minutes:
[ueemulation.internal.upnp.UpnpServer] - Could not send UPNP response: Cannot assign requested address (sendto failed)
I have the same problem here (like @TheLexus), without Docker. There is nothing (beside openhab itself) on port 1900 or 5000.
As written above: The warning should be altered to include the problematic address. I have no Java setup on my systems so cannot change it. The warning is also not problematic. One interface failed, but the upnp message has probably been send via another network interface and the hue emulation works nontheless.
Java just has a very bad development story when it comes to enumerating network interfaces that work for a given IP protocol.
Is there any final solution on this for OH 2.5? I still have this problem with the Hue emulation binding 2.5.4… Could we suppress the warning at least somehow?
After a complete restart it disappeared indeed. Thanks!
On a second note…
I had to upgrade to the hueemulation binding 2.5.4 in the end, which seemed to make hueemulation run on IPv4 addresses again.
Nevertheless I kept getting the same UPNP error every once in a while and it took me some time to find out that I had to put in a manual discovery address inside PaperUI/Services/IO/Hueemulation/Optional Discovery address - the own address of my RPI. If left blank, it seemed that Hueemulation took 127.0.0.1:8080 as an address and perhaps that’s why it probably threw the error message.
After putting the IPv4 address of my RPI in, there’re no more error messages.