Hue emulation upnp server: address test failed

Hi,

I accidentally upgraded everything and now my working configuration is no longer. :slight_smile: I’ve got much of it back, but I’m getting a weird upnp error in the Hue Emulation.

I’m now running openhab 2.5.5 on a raspberry pi 2 B, Jessie.

Edit: I got further along by using the iptables forwarding rule in the documentation. Now I’m getting this error in the logs:

2020-05-22 14:20:20.873 [WARN ] [ueemulation.internal.upnp.UpnpServer] - Could not send UPNP response: Cannot assign requested address (sendto failed)

Notably, I am getting /description and /api/status pages that make sense on the port 80 lookups. How can I get more visibility into what’s happening that leads to “Cannot assign requested address?”

Thanks!!
Rudy

old error for searchers:

Self test

To access any links you need be in pairing mode!

Pairing mode: On (V1) [Enable]----://192.168.1.2:8080/api/status/link | [Enable with bridge V1 emulation]----://192.168.1.2:8080/api/status/link?V1=true

22 published lights (see —://192.168.1.2:8080/api/testuser/lights)
30 published sensors (see ----://192.168.1.2:8080/api/testuser/sensors)

UPnP discovery test

upnp announcement thread not running

serial no name
00000000 OnHub
626932033E3A openHAB Hue Emulation (192.168.1.2)

Reachability test

URL Responds? Ours?
http://192.168.1.2:8080/description.xml yes yes
http://192.168.1.2/description.xml no no
http://[fe80:0:0:0:e320:3871:42f8:197b]:8080/description.xml yes yes
http://[fe80:0:0:0:e320:3871:42f8:197b]/description.xml no no

Users

  • testuser On-the-go-user#openhab 2020-05-22T13:17:42.48

How can I debug this further?

2020-05-22 12:11:35.947 [WARN ] [ueemulation.internal.upnp.UpnpServer] - Upnp server: Address test failed
java.util.concurrent.CompletionException: java.lang.LinkageError: ClassCastException: attempting to castbundleresource://36.fwk13970914/javax/ws/rs/client/ClientBuilder.class to bundleresource://36.fwk13970914/javax/ws/rs/client/ClientBuilder.class
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_152]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) [?:1.8.0_152]
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:604) [?:1.8.0_152]
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) [?:1.8.0_152]
at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443) [?:1.8.0_152]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_152]
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_152]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_152]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_152]
Caused by: java.lang.LinkageError: ClassCastException: attempting to castbundleresource://36.fwk13970914/javax/ws/rs/client/ClientBuilder.class to bundleresource://36.fwk13970914/javax/ws/rs/client/ClientBuilder.class
at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:97) ~[?:?]

Thanks!
Rudy

Still no luck.

I stopped openhab, used “openhab-cli clear-cache” and restarted. I’m back to that original java exception:

2020-05-22 14:36:51.413 [WARN ] [ueemulation.internal.upnp.UpnpServer] - Upnp server: Address test failed
java.util.concurrent.CompletionException: java.lang.LinkageError: ClassCastException: attempting to castbundleresource://35.fwk4794326/javax/ws/rs/client/ClientBuilder.class to bundleresource://35.fwk4794326/javax/ws/rs/client/ClientBuilder.class
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_152]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) [?:1.8.0_152]
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:604) [?:1.8.0_152]
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) [?:1.8.0_152]
at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443) [?:1.8.0_152]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_152]
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_152]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_152]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_152]
Caused by: java.lang.LinkageError: ClassCastException: attempting to castbundleresource://35.fwk4794326/javax/ws/rs/client/ClientBuilder.class to bundleresource://35.fwk4794326/javax/ws/rs/client/ClientBuilder.class
at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:97) ~[?:?]
at javax.ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:126) ~[?:?]
at org.openhab.io.hueemulation.internal.upnp.UpnpServer.performAddressTest(UpnpServer.java:249) ~[?:?]
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) ~[?:1.8.0_152]
… 6 more

And now I get this on /api/status:

Self test

To access any links you need be in pairing mode!

Pairing mode: On (V1) Enable | Enable with bridge V1 emulation

22 published lights (see ----://192.168.1.2:8080/api/testuser/lights)
30 published sensors (see ----://192.168.1.2:8080/api/testuser/sensors)

UPnP discovery test

upnp announcement thread not running

serial no name
00000000 OnHub

Reachability test

URL Responds? Ours?

Users

  • lALdJZsNossUY5gQikov8517uj7T8MdBOcQUQKXW On-the-go-user#openhab 2020-05-22T14:20:31.638
  • testuser On-the-go-user#openhab 2020-05-22T14:40:01.199

What version did you upgrade from? There are some other threads on this, I don’t remember the fix.

I believe bridge ip or port needs a reset.

Hi all,
same for me
[WARN ] [ueemulation.internal.upnp.UpnpServer] - Upnp server: Address test failed

Tinkerboard Openhab 2.5.5_1 debian buster

How to reset IP of the bridge or bridge port and why?
Is it realy nessesary to change the bridge IP every time of an openhab update? Can´t be true?

What was the fix?

cheers
Stef

The reset I am speaking of what not a change of ip. It has been some period of time since I did it.

In one of the hue binding updates some of my settings didn’t carryover properly. I had to go verify all the ip and port settings in my config files.

Once fixed have never seen the problem again.

Hi,
thanks for the answer.

I haven’t changed at any time the conf-files by hand!
So what must I check in these files?
What are rhe correct settings?

Thanks
Stef

Here is my things line:

Bridge hue:bridge:00212E048A08 [ ipAddress="192.168.107.20", port=8090, userName="FFB147B65E" ]

I believe the port= is where my problem was. Because I ran on a non-standard port this changed slightly. Has been over a year so don’t remember, but has been working with no issues since then.

Hi,
when i change the port to 8090 the bridge toggle online offline online …
in papaerui, which is as shown in the pic, the port 80 is given .

Can anybody tell me, which is port the correct?

Thanks

Only you can tell is what port is correct… it depends on what port your bridge runs on. My hue emulated bridge runs on 8090. A real hue bridge typically run on 80 I believe.

Do you use config files or paper ui? Your earlier post mentioned config files.

Hi,
as i have posted in my first reply: i never changed conf-files by hand!
The pict attached shows clearly paper UI !
In your answer you say that you clear conf-files that’s why i answer: never change … see above

So at least: on which Port runs a original Hue bridge?

Gruß Stefan Heinz
Send mobile

80 is the port

I already proposed my help to solve this problem but I got no feedback.
You are welcome if you want to help me solving this issue.

1 Like

After a reboot i saw in the tail:

2020-06-13 14:44:26.930 [INFO ] [io.hueemulation.internal.ConfigStore] - Hue Emulation pairing disabled
2020-06-13 14:44:28.151 [WARN ] [ulation.internal.HueEmulationService] - The UPnP Server service has not been started!

How can a UPnP server in hueemulation be started - this should fix the problem!

Cheers
Stef