Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

[Plex] Cannot control Plex - Resolved #5668

Closed
staehler opened this issue Sep 22, 2018 · 7 comments
Closed

[Plex] Cannot control Plex - Resolved #5668

staehler opened this issue Sep 22, 2018 · 7 comments
Labels

Comments

@staehler
Copy link

staehler commented Sep 22, 2018

Hi,
I cannot control plex although it worked already.

I get the following log:

2018-09-22 20:29:52.094 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/PlexWZPause] {item=PlexWZPause, bridgemarker=true, command=ON, timestamp=1537640992046} | {org.osgi.service.event.EventHandler}={port=32400, service.id=461, service.bundleid=244, service.scope=bundle, refresh=5000, component.name=org.openhab.binding.plex.binding, component.id=291, token=xxxxxxxxxx, host=192.168.x.y, event.topics=openhab/command/*, service.pid=org.openhab.plex} | Bundle(org.openhab.binding.plex_1.13.0.201809190110 [244])]
java.lang.NullPointerException: null
        at org.openhab.binding.plex.internal.PlexConnector.getHost(PlexConnector.java:417) ~[?:?]
        at org.openhab.binding.plex.internal.PlexConnector.sendCommand(PlexConnector.java:238) ~[?:?]
        at org.openhab.binding.plex.internal.PlexBinding.internalReceiveCommand(PlexBinding.java:147) ~[?:?]
        at org.openhab.core.binding.AbstractBinding.receiveCommand(AbstractBinding.java:94) ~[?:?]
        at org.openhab.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:45) ~[?:?]
        at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415) [3:org.apache.karaf.services.eventadmin:4.2.1]
        at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82) [3:org.apache.karaf.services.eventadmin:4.2.1]
        at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104) [3:org.apache.karaf.services.eventadmin:4.2.1]
        at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:166) [3:org.apache.karaf.services.eventadmin:4.2.1]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]

Has anybody an idea, what this means?

I'm running
openhab2 2.4.0~20180919034315-1 on debian
Plex Media Server 1.13.5.5332-21ab172de on QNAP
Plex Home Theater 1.8.0.148-573b6d73 on MacMini.

Which information do you need for further investigation? Thanks in advance.

@9037568
Copy link
Contributor

9037568 commented Sep 22, 2018

As always, you should really attach a debug log if you want to try to get to the root cause.

However, here is a jar which should eliminate this Null Pointer Exception.

And here's the code change for this.

@staehler
Copy link
Author

Hi Chris,
thanks for your reply and sorry for the delay. I attached my debug log now. Hope you can see something - I'm no developer ...
test.log

@9037568
Copy link
Contributor

9037568 commented Sep 25, 2018

This log does not show the initialization, but the error seems clear enough.
It appears the server in question does not exist:

2018-09-24 20:28:54.232 [DEBUG] [.binding.plex.internal.PlexConnector] - 192-168-2-1.cf073ad3381244a6b493a4cc8501b98e.plex.direct
java.net.UnknownHostException: 192-168-2-1.cf073ad3381244a6b493a4cc8501b98e.plex.direct

192-168-2-1.cf073ad3381244a6b493a4cc8501b98e.plex.direct

If the device running openHAB can successfully resolve this hostname (e.g. with ping or similar command-line utility), then perhaps there's a failure in the new OH 2.4 related to networking.

@staehler
Copy link
Author

staehler commented Sep 25, 2018

Thanks for looking. Than it must be a bug, as my openhab server can ping, nslookup and telnet plex 32400 my plex server.
The plex binding worked long time for me absolutely reliable, so there must have been introduced a bug with the last updates. Unfortunately I cannot say, which upgrade was responisble for it.

This post is already labeled as bug. Do I have to do any further thing or is this registered for debugging now?

BTW: the network binding works as expected. It recognises all my devices correctly. And it seems that others dont have issues ... hmmm, strange.

@9037568
Copy link
Contributor

9037568 commented Sep 25, 2018

If you're issuing a ping to plex, that's not the right value.

The question is, what do you get when you ping this specific address?

192-168-2-1.cf073ad3381244a6b493a4cc8501b98e.plex.direct

If that succeeds on the OH device, then this is a network issue and we'll need input from OH2/ESH.
Especially if you can verify this same setup works correctly on an earlier version of OH2 like 2.3, etc.

@9037568 9037568 changed the title Cannot control Plex [Plex] Cannot control Plex Sep 25, 2018
@staehler
Copy link
Author

staehler commented Sep 26, 2018 via email

@staehler
Copy link
Author

With your hint I could resolve my problem, thanks a lot.
This hostname was not pingable or resolvable, then I found this comment.
That's what I had to do in my fritzbox (for them who might see the same problem):
Add to
Heimnetz -> Netzwerk -> Netzwerkeinstellungen -> DNS-Rebind-Schutz
*.plex.direct

Voila, it works :-)

@staehler staehler changed the title [Plex] Cannot control Plex [Plex] Cannot control Plex - Resolved Sep 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants