Giter Club home page Giter Club logo

Comments (23)

pannal avatar pannal commented on September 20, 2024 1

Pretty sure it gets the server list from the plex.tv API, but haven't been in that part of the codebase in a while and can't check right now.

I think a kodi debug log is in order, maybe there's something obvious in there.

from plex-for-kodi.

pannal avatar pannal commented on September 20, 2024 1

Maybe set kodi to debug logging, that should be enough.

from plex-for-kodi.

pannal avatar pannal commented on September 20, 2024 1

Hmm, I can't seem to find anything specific about PM4K in there, but it looks like your system itself has issues resolving hosts. Kodi itself later as well:

GetImageHash - unable to stat url https://download.osmc.tv/kodi/addons/nexus/script.commands/icon.png
2023-09-04 10:54:16.911 T:681     error <general>: CCurlFile::Stat - <https://download.osmc.tv/kodi/addons/nexus/script.pystone.benchmark/resources/images/icon.png> Failed: Couldn't resolve host name(6)

Edit: your route doesn't look great, either (if it stays that way after boot):

Sep 04 10:34:36 osmc connmand[252]: eth0 {add} address 169.254.87.255/16 label eth0 family 2
Sep 04 10:34:36 osmc connmand[252]: eth0 {add} route 169.254.0.0 gw 0.0.0.0 scope 253 <LINK>
Sep 04 10:34:36 osmc connmand[252]: eth0 {add} route 0.0.0.0 gw 0.0.0.0 scope 253 <LINK>
Sep 04 10:34:36 osmc connmand[252]: eth0 {add} route 0.0.0.0 gw 0.0.0.0 scope 253 <LINK>

Edit 2: that route usually means that DHCP doesn't work.

from plex-for-kodi.

pannal avatar pannal commented on September 20, 2024 1

As far as I can tell the pi itself has networking issues. It doesn't seem to be an issue with plex by now. Or can you ping the outside world and/or domains with it? Your logs looked like you can't.

from plex-for-kodi.

pannal avatar pannal commented on September 20, 2024 1

If you want me to have another look, disable the (extremely noisy) debug logging in osmc/elec and enable the PM4K debug logging (addon settings in kodi, not inside the plugin). Then post the log again.

Maybe I can find a pointer to what the problem is.

from plex-for-kodi.

pannal avatar pannal commented on September 20, 2024 1

Hmm, so any connection attempt to https://192-168-0-249.358b36844dee42b09acd4fc1bf9a34cc.plex.direct:32400 times out.

What's curious to me is that there's a local connection, which should work, but doesn’t: http://192.168.0.231:32500 - that port seems incorrect, and the IP is different, as well - how is your PMS configured? Got any "additional server urls" set up? Can you take Screenshots?

Also, it might help if you could do the reachability tests on the client itself (using curl, wget or something). Maybe we can figure this out.

I'd also try wget/curl on the plex.direct URL from above and look at your DNS server's log.

Edit: is your PMS not exposed to the internet? I can only see local ips published to plex.tv.

from plex-for-kodi.

pannal avatar pannal commented on September 20, 2024

The official apps use some magic to circumvent the DNS rebind issue. Are you sure you've whitelisted plex.direct in your DNS service? Please double check its logs.

from plex-for-kodi.

p-money666 avatar p-money666 commented on September 20, 2024

Yes 100% whitelisted Plex.direct along with tons of other Plex domains I found on GitHub to be on the safe side.

I've checked the logs and nothing from Plex is being blocked, everything is being allowed (plex.direct, plex.tv etc).

Before this I thought the issue was my ISP given router (it doesn't allow DNS changes/whitelisting).

So I installed pihole JUST to make sure Plex was 100% whitelisted. After reading several threads about the rebinding issue I also chose a DNS resolver that doesn't use DNSSEC and I also unchecked DNSSEC from the pihole settings.

So I'm all out of ideas on where the blockage is now! For most people disabling DNSSEC and whitelisting plex.direct does the trick.

May have to go old school and reboot the router/restart the DNS resolver to make sure all these changes have been reflected.

from plex-for-kodi.

pannal avatar pannal commented on September 20, 2024

Hmm. Otherwise you could check the kodi debug logs and maybe find out why PM4K doesn't see your servers. Maybe you enforced SSL on the Plex server or something?

Pretty much out of ideas here. DNS rebinding is always the issue.

from plex-for-kodi.

p-money666 avatar p-money666 commented on September 20, 2024

Hmm. Otherwise you could check the kodi debug logs and maybe find out why PM4K doesn't see your servers. Maybe you enforced SSL on the Plex server or something?

Pretty much out of ideas here. DNS rebinding is always the issue.

Plex server is set to preferred for SSL and on the client end it's "allowed on the same network". Even when I set SSL to ignore it's still an issue.

I'll have to check the logs although I don't even know what I'm looking for or where but I'll have a search.

It must be something to do with the DNS rebinding because I notice for me and many others this issue started at the same time which is also when the official Plex for Kodi app broke (python issues etc). Ever since then I've had issues and thought it was because I changed ISPs/router.

But my other Plex apps work perfectly it's just the Pi.

from plex-for-kodi.

p-money666 avatar p-money666 commented on September 20, 2024

I thought I cracked it by choosing 'ethernet' under preferred network device in PMS (it was previously any because the 2nd option was my VPN). But changing this made no difference either.

I've never used "manual servers" before on the Plex clients so maybe I can try that. Never had to use it before cause it always found the local server automatically.

from plex-for-kodi.

pannal avatar pannal commented on September 20, 2024

Pretty weird, yeah. Manual servers can work, though.

from plex-for-kodi.

p-money666 avatar p-money666 commented on September 20, 2024

Just disconnected my VPN completely on the PC my Plex Server is hosted on. Also noted down the IP address so I can try and connect manually.

Both made no difference.

Have no clue why it's broken like this even on clean installs. I'd prefer if it was broken everywhere haha but the fact it's only the Pi shows it's a very local issue.

I even tried to use older versions of your app (stable).

One question I have for you: it recognises the name of my server and shows the spinning circle, does it get this info from my Plex account or does it mean it's half connected?

Not that it makes a difference but I was curious.

Cheers

from plex-for-kodi.

p-money666 avatar p-money666 commented on September 20, 2024

Cheers I'll check the log file now. Do I need to change any of the default log settings in Kodi and/or PX4K before I view the log?

from plex-for-kodi.

p-money666 avatar p-money666 commented on September 20, 2024

Maybe set kodi to debug logging, that should be enough.

I've pasted the log below. Quite a few references to the plex.direct server connection attempt that I saw but can't understand; maybe you can!

https://gist.github.com/p-money666/5991ff9aa2a487fd6a19e30a0f753ffc

Hopefully the culprit is somewhere in there.

Cheers!

from plex-for-kodi.

p-money666 avatar p-money666 commented on September 20, 2024

Any idea what could be causing that?

The issue I'm having is everything was working perfectly fine before out of the box. So sometimes I'm making tweaks that weren't an issue before and might be making things worse!

I've ruled out a lot of ethernet/switch issues because I unplugged the ethernet on my pi and turned the WiFi on..still couldn't find my Plex server.

Trying to tick off everything in the chain.
I disabled VPN so it can't be that.
Tried my router's ISP default DNS/DHCP that didn't work
Changed to pi hole just to whitelist Plex.direct that didn't work

And the ultimate annoyance is the official Plex app doesn't have this problem! So I'm debating whether I'll need to get a different 3rd party device to run the official Plex app cause that seems to be the only one that works. Which is a shame cause my pi is more than capable of direct playing everything on my server even 4K stuff.

Edit: just realised what might work is if I install an older version of libreelec/Kodi (Leia etc) with the official Plex kodi app again and hopefully that works like it was doing all this time?

I'm sure I read some people rolled it back when this all started to fix the problem.

from plex-for-kodi.

p-money666 avatar p-money666 commented on September 20, 2024

Yes I'm able to download add-ons, use plex.tv/link to register my Plex account on initial boot etc all on the Pi so outside internet connectivity is definitely there.

Interestingly, the official Plex app loads on the latest OSMC (I think it was fully broken on libreelec). It let me sign into Plex but once again couldn't find the server.

My last throw of the dice is I'm going to install a fresh libreelec OS (v10-matrix not v11-nexus) with the official Plex app and see if that works.

Because I'm pretty sure that was the last time it worked perfectly.

Edit: nope that didn't work either. I'm totally lost! Pretty sure I've eliminated everything from the network chain one by one and I'm still having issues only on the Pi.

from plex-for-kodi.

p-money666 avatar p-money666 commented on September 20, 2024

Finally I've managed to get something to work.

As a last act of desperation I decided to flash the latest LibreElec V12.0 nightly build from scratch on my RPi4.

I tried the official Plex app..didn't load.
I tried the PM4K add-on...same issue wouldn't connect to my server.

As a final act of desperation I tried the Composite add-on again (plexbmc fork). It works! For the first time in over 6 months my pi is able to playback media from my Plex server.

The interface is absolutely horrible because it's all kodi-fide but I'll have to live with it.

I have no idea what's causing all this crazyness and who knows if it was even the nightly that fixed things.

I'm tempted to freeze any updates on anything now and just lock in the current state because this has wasted too much of my time haha.

Thanks for helping out with various suggestions and I hope one day I can get your add-on to work because nothing beats the Plex interface for me.

Cheers!

from plex-for-kodi.

p-money666 avatar p-money666 commented on September 20, 2024

I followed your instructions (hopefully correctly!) and used the Kodi log add-on to upload it here:

https://paste.kodi.tv/teluhisizi

Please let me know your thoughts! As mentioned before, the Composite add-on is working perfectly in the exact same environment.

from plex-for-kodi.

p-money666 avatar p-money666 commented on September 20, 2024

Hey, I'm glad you've managed to find the suspect entries which at least lets us target something specific!

The following screens show:

  1. My PMS is mostly on the default settings.
  2. That the server is secured and online (works on 3 other clients so this is a certain).
  3. Remote access is disabled (always has been; I've never used Plex outside of my house/network - it's always been local playback via Direct Play).
  4. PM4K add-on via Kodi/RPi4 is on the authorised device list; along with numerous other clients on the same page that are working fine.
  5. My PMS is up to date (latest stable build from 24/07/2023).
  6. IPv6 is enabled (tried to disable it - no difference).
  7. Secure connections changed from required to preferred.
  8. GDM is enabled (have not tried disabling this on PMS side but have tried on PM4K side). Didn't play with it too much as it seemed helpful for local discovery.
  9. Preferred network interface; selected Ethernet (other option is VPN tunnel).
  10. My PMS is hosted on my desktop PC (where I'm writing this comment from); which is 24/7 connected to the internet and all sites are accessible and work fine. I use a VPN however this makes no difference since I've tried to use split tunnelling as well as totally disabling the VPN - server still does not connect.

image

image

image

image

image

I've carried out reachability tests on the client and it's definitely connected to the 'outside world'. It has a direct ethernet connection and I can grab add-ons/subs/upload logs/check for updates and the usual sudo package update checks work too.

Hopefully this is the beginning of the end! But I have no idea where the outlier is when it comes to PM4K vs Composite Add-On and my other clients that don't have any issues.

Thanks again and let me know if you need anything else!

from plex-for-kodi.

pannal avatar pannal commented on September 20, 2024

Yes,

Please go into detail about those:

What's curious to me is that there's a local connection, which should work, but doesn’t: http://192.168.0.231:32500 - that port seems incorrect, and the IP is different, as well - how is your PMS configured? Got any "additional server urls" set up? Can you take Screenshots?

I'd also try wget/curl on the plex.direct URL from above and look at your DNS server's log.

Also, which OS is your desktop using, where the PMS runs on?

Edit: can you try setting Plex's "Custom server access URLs" to https://yourpmsip:port and the same for http? (you might need to enable expert mode in the settings GUI

from plex-for-kodi.

pannal avatar pannal commented on September 20, 2024

Closing this for now. Please reopen if necessary.

from plex-for-kodi.

p-money666 avatar p-money666 commented on September 20, 2024

Hey pal

Just to let you know I bought an rpi5, installed libreelec nightly, installed your add-on and everything seems to be working perfectly with zero tweaking whatsoever.

Nothing else network/plex server wise has changed on my end.

I have no idea why the rpi4 didn't work for your add on despite formatting it endlessly and using different kodi/Plex builds.

Anyway I'm glad I finally get to use this it looks amazing. Any issues and I'll raise a new ticket.

Cheers!

from plex-for-kodi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.