[SOLVED] openHAB 2.5m2 Docker HueEmulation UPNP warnings every 2 minutes

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.

Default UPnP Port for discovery is 1900.

1 Like

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 have the same problem here but without Docker. There is nothing (beside openhab itself) on port 1900 or 5000.

It seems that the warning occurs every time my denon av-receiver is broadcasting a upnp message.

@David_Graeff Is there any way to get a few more informations by modifying the warning message to track down the source of that message?

1 Like

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.

How did you solve the “Could not send UPNP response: Cannot assign requested address (sendto failed)” warning?

You may need to provide more info.

Sorry, maybe my question was a bit short.

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.

Is your up address set correctly? I saw some other threads looked like a similar message.

I am also encountering the issue after upgrading to openHAB 2.5:

Initial log entry:
2019-12-16 21:05:28.000 [WARN ] [ulation.internal.HueEmulationService] - The UPnP Server service has not been started!

Afterwards every 2 minutes:
2019-12-16 21:17:59.553 [WARN ] [ueemulation.internal.upnp.UpnpServer] - Could not send UPNP response: Cannot assign requested address (sendto failed)

I am also not using docker, just plain openhabian on a raspberry pi 3

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.

2 Likes

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?

@Jagohu I believe the fix is setup of the binding. I had this issue once it was due to an incorrect setting. Something with io and port number.

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. :slight_smile:

1 Like

I had the same issue. My solution is found at this other discussion: