PlexConnect running on wrt router (Merlin for Asus), can't find Remote PMS

Hi,

I have PlexConnect installed on an Asus router (running Merlin firmware) using the guide for Tomato firmware. After taking some time configuring, the app can now run on my local network.
However, it can’t find PMS on different network. I did a thorough test and would like to post the observation results here for you to offer me support. Thanks in advance.

My setup for testing:

  • Two PMSes: PMS Dell is claimed by Account Dell; a library is shared from PMS DC to PMS Dell. Settings are left as defaults, i.e. GDM is enabled and no IP (range) is set for signin-without-authentication.
  • Two Routers: Both have their WAN ports connected to the modem LAN ports, creating two separate subnets.
  • PlexConnect is installed only on Router 1.
  • True/False: the enable_plexgdm value
  • Signin/NOSignin: signin or not signin Plex.tv (only use Account Dell)

A) Everything else is connected to Router 1, only PMS Dell is connected to Router 2:
. Signin, True or False: finds 1 server, shows nothing in Library, but show shared things in Shared Library. Log shows that PlexConnect is informed of 2 servers by Plex.tv, tries querying and only receives response from PMS DC.

. NOSignin, True: finds no server, no errors in log.

. NOSignin, False: finds no server, log shows an error of “no route to host”.

Nov 21,2018 19:06:43 PlexAPI: No Response from Plex Media Server
Nov 21,2018 19:06:43 PlexAPI: We failed to reach a server. Reason: [Errno 113] No route to host
Nov 21,2018 19:06:43 PlexAPI: Traceback:
Traceback (most recent call last):
  File "/tmp/mnt/Flair/entware/PlexConnect/PlexAPI.py", line 449, in getXMLFromPMS
    response = urllib2.urlopen(request, timeout=20)
  File "/opt/lib/python2.7/urllib2.py", line 154, in urlopen
  File "/opt/lib/python2.7/urllib2.py", line 429, in open
  File "/opt/lib/python2.7/urllib2.py", line 447, in _open
  File "/opt/lib/python2.7/urllib2.py", line 407, in _call_chain
  File "/opt/lib/python2.7/urllib2.py", line 1241, in https_open
  File "/opt/lib/python2.7/urllib2.py", line 1198, in do_open
URLError: <urlopen error [Errno 113] No route to host>

B) Everything is on the same network, connecting to Router 1:
. Signin, True or False: finds both servers, everything works normally.

. NOSignin, True: finds no server, no errors in log.

. NOSignin, False: finds no server, log shows an error of “HTTP Error 401 Unauthorize

. Before the configuring & fixing, at first I couldn’t use the sign in feature and got some SSL error. However, “NOSignin, False” worked and was the only method that worked then (note: even when no IP (range) was set for signin-without-authentication).

Thanks for sharing your tests.

Let’s start with GDM. When a server announces itself (Plex uses GDM and DLNA, other media servers use DLNA, Apple uses Bonjour, etc) it issues a broacast. These broacasts do not cross WAN ports. They are only visible within the LAN (or VLAN). In your case you have PlexConnect installed in the router, so probably the router is filtering the broadcast and PlexConnect can’t find any PMS.

Also, when PlexConnect finds PMS’s (using GDM, or using the ip_pms setting), you also need to include in List of IP addresses and networks that are allowed without auth all the ATV’s and also the IP of the device where PlexConnect is installed (your Router 1). PMS does not accepts blanks, so you have to code something like 1.1.1.1/24,2.2.2.2/24. If not, PlexConnect will tell you that no libraries are available.

PlexConnect finds PMS’s through GDM or ip_pms (not both). If you signin to Plex.tv, PlexConnect will merge more servers to its list. This includes servers that your friends have shared with you.

The servers whose list comes from plex.tv carries two optins to connect, local and remote. PlexConnect tests the local option first, and if it doesn’t find local access available it tests the remote access. That’s why the We failed to reach a server message appears in the PlexConnect log. It’s not exactly an error (I plan to remove it).

Hi moody_blue,

A) Today I reset everything and installed PlexConnect from scratch. I found the additional step that fixed the SSL error which in turn enabled a successful installation. Based on the Tomato guide, there is only one more package that needs to be installed.

opkg install ca-certificates

There is an existed certificates bundle (203KB), but somehow python didn’t read data from that. So as the above package just installed about 200 individual certs, the sign in feature just worked.
So, as it’s the last bit to solve the SSL error, I think you’d want to update the wiki so others won’t have to take time to find the fix like me :slight_smile:
(Btw, here is the StackOverlow discussion that gave me some idea, they talked about many other workarounds.)

B) One other thing I have to say sorry. With the fresh installation today, the “NOSignin, False” mode only worked when I put the IPs/IP range (192.168.5.0/24) to that List of IP addresses and networks that are allowed without auth field :expressionless: I always said that it worked without putting any IP to that field, and I actually never remembered doing that, but the test today obviously gave another result. So, sorry about that :slight_smile:

C) Alright, back to our current issues.
C1) Local network, NOSignin: I put the IP range to the without auth field, and PlexConnect still can not find the PMS’s through GDM. Regarding the broadcast feature, my other DLNA servers still can be detected normally. So, unless I have time to try PlexConnect on some computer, I don’t know if PlexConnect installed on a router is restricted by the router.

C2) About connecting to remote PMS, to confirm that I understand things correctly, we only care about “Signin” and don’t need to care about GDM. So, as We failed to reach a server and no route to host are log messages for finding local access, what kind of log messages should we notice for finding remote access? I currently don’t see any messages for debugging remote access.

Thanks for the opkg install ca-certificates requirement, I’ve updated the original post to include it.

Regarding broadcast services, you need to check if merlin firmware allows python programs to listen to them. Maybe the firewall is to be blamed if not…

The We failed to reach a server message is the same for local and remote servers. If you can ping a PMS server from the other LAN, PlexConnect should be able to find it locally. Otherwise it will try to find it remotely.

In fact this is not the logic, PlexConnect will try to find servers BOTH local and remote, and pick the local instance if it can access it locally. This is not consistent with other Plex clients and I don’t like this. Maybe someday I will change it.

You can run two different PMS servers with the same userid (in this case the servers themselves need different names). This is often the preferred alternative, and if you plan to subscribe Plex Pass in the future, its benefits will be applied to both servers (automated metadata backup is a key PP benefit, even if you don’t use other PP functions).

You are in a double-NAT situation and remote access to PMS is not trivial. To use PlexConnect signin you need that PMS servers are properly setup to allow remote connections. If you need help pls let me know.

PlexConnect needs to be installed in a device that is available even if ATV’s are using other applications. A router is a perfect choice in terms of availability but may have insuficient speed to handle image rendering and other CPU demanding tasks. Not to mention that these tasks may interfere with router stability. In case you decide to maintain PlexConnect installed in a router pls share your experience.

To make it clear, here is a rough diagram of my setup.

Actually, I only setup one network in my house and every device is on the same subnet. I have a site-to-site VPN to another house where I’m intending to have another PMS, that’s why I thought of testing remote PMS with PlexConnect. I don’t know if adding Router 2 like that is a proper way to test the remote setup.

So, regarding broadcast services, may you suggest some way to test if the router supports and/or python can listen? Do I need to try some DNAT, REDIRECT commands for iptables regarding the ports mentioned in Plex wiki (I noticed 5353 for Avahi, 32410-32414 for GDM)? The 32400 port of the PMS Dell is forwarded properly. When I did the tests, I always noted and configured the port forwarding on the corresponding router to ensure the remote access menu had a green tick.

Well, buying the ATV was a mistake of mine, because ATV services/apps are almost useless in my country. I have only used it to watch Youtube, and that’s just occasional too. Knowing about PlexConnect, I just thought of giving it a try to make my ATV a bit less useless :sweat_smile: And knowing about hardware limitations of ATV and routers, especially when I only have the ATV connect wirelessly via 2.4GHz radio, I don’t expect much from them. Currently I just use it to show family photos for some short time when we sit. That’s not really necessary though as home members all have Plex client on their devices.

@moody_blue: I decided to try a normal (a.k.a standard) setup on a Windows 8 laptop today, and it turned out that GDM still wouldn’t work.

Would possibly disabling GDM and using dedicated internal ip’s resolve the problem?

Hi mschlotz, well it’s just something I and moody_blue are discussing. If you read my previous posts, you would know that I tried some tests and made it work without GDM. So I’m focusing on making it work with GDM.

Sorry, coffee hadn’t kicked in yet … :wink:

@nmhung1985 This is not a private discussion between us, everyone is welcome to help.

My normal setup is PlexConnect and PMS on the same QNAP NAS, and I’m not using GDM. But I’ve installed PlexConnect in Windows 10 to test GDM. I had to disable services using port 80 (with net stop http) and authorize my LAN in PMS.

I’ve tested GDM and it works Ok. If it does not work on your side you need to attach your PlexConnect.log (and not just a fraction of it).

@moody_blue
I performed many tests during past weeks, and forgot to take notes at some steps, so I felt everything was messed up. As there were new firmware versions for my routers (both stock and Merlin modded ones) came out recently, I decided to reset everything and perform fresh tests again. I got some observations, think that might help you to improve PlexConnect.

  • I left Dell-E5470 and DC computers as they are, because they’re my production computers so I couldn’t just “reset everything” on them.
  • I took another Dell Venue laptop instead, formatted and installed the newest Windows 10 LTSC 2019 (i.e. Enterprise demo version) on it to prevent bloatware interference. Another thing that might be noted is Windows Defender was disabled. Plex Media Server, PlexConnect and Python 2.7.15 64-bit were installed.
  • The routers were flashed and reset completely. (After googling, I think they can be considered to have support for multicast as using the ifconfig command in terminal would show MULTICAST).
  1. Testing with Router 1 running stock firmware:

a. At first, for true fresh test, only the Venue connected to the Router 1.
ATV didn’t show anything in Library section. But I noticed that in “Plex Media Server found”, it reported there was 1! Took a look at the log screen, and it showed that GDM worked! Voila! However, the log stated that PlexConnect got some HTTP 401 Authorization error.

b. Connect E5470 and DC to the Router 1 network, and GDM also found them (not consistently though, especially the E5470) and obviously I still got the 401 error.

c. I came across a guide from miapple.me, and I thought what if I used the Plex version they mentioned? Actually, it was strange they used 0.9.11.7.803-87d0708 which was a 2013 version for their Windows 10 (which was released in 2015) guide.
I installed the old version on the Venue. It turned out that worked! All stuffs from Venue showed up on ATV!

d. Reverted to the new 1.14 version, and things came back to starting point, got 401 error again.
Tried 1.10 version which didn’t work, either.

  1. Testing with Router 2 running Merlin firmware:
    All the errors, logs, events etc… everything were the same as on Router 1. The only difference was E5470 and DC names showed up in Library section on ATV, but only with “Search” boxes like this:
    ===E5470===
    Search
    ===DC===
    Search
    ===Venue===
    Music
    Photos
    Search

Clicking those “Search” boxes would lead to Search section and nothing wouldn’t work there, obviously.

  1. Tried setting up a PlexConnect instance on E5470 (didn’t try the old Plex version on it): turned out GDM worked quite similarly, but got more hit and miss, considering the E5470 has been used for some time and got things changed many times.

  2. Tried setting up a PlexConnect instance on Router 2: never showed any sign of finding out servers, always gave 0 result. Plus the results from previous tests, I think we can confirm that GDM never works on this kind of installation.

  3. Testing the Remote PMS function: I didn’t make any changes to files, settings beside setting up these 2 scenarios:

  • Venue on Router 1, other computers on Router 2 and PlexConnect ran on E5470
  • E5470 on Router 1, other computers on Router 2 and PlexConnect ran on Venue
    Didn’t work.
  1. Finally, the most weird thing: After Remote PMS tests, GDM wouldn’t locate other servers except the server on the same computer! The situation is summarized in one sentence, but in fact I took the whole day to try to make it work like Point 1 & 2 without success. Very strange, indeed. I reset/reflashed all the routers, restarted computers, deleted PlexConnect folders and re-deployed them again, etc… numerous times. But in the end, I had to surrender.
    That’s why for Point 2, I had to describe the menu with text instead of a photo. There is no way to reproduce what I got in Point 1 & 2 several days ago.

In summary, regarding the GDM function:

  1. PlexConnect can access and list contents of old Plex version. On new versions, it would give HTTP 401 Authorization error.
  2. Things just don’t really work stably, hit and miss here and there. And gone as in Point 6.

So, alright, maybe there are issues with my routers, my wireless environment, devices etc… But at least for the Summary 1, do you have any thoughts? Is it considered some kind of bug that you could take a look?

When PMS 1.1.3 was announced, it came with a new security scheme:

  1. When PMS is logged in to plex.tv, all clients need to be logged in as well. There is however the possibility to authorize some IP’s so that they can access PMS without being logged into plex.tv
  2. When PMS is not logged in to plex.tv the Plex clients can access it locally, but not remotely

Discovering servers through GDM and/or DLNA requires multicast to be active in the router. Multicast does not work accross the WAN port (maybe it can cross it if that port is bridged with LAN ports, but I can’t test this). Multicast does not work accross VLAN’s by design. And probably will not work through VPN.

PMS servers can be discovered using GDM/DLNA but their libraries will show up empty unless you authorize the IP’s as stated in the PMS 1.1.3 announcement. Did you authorize the IP’s during your tests ? It is necessary to authorize the IP of the device running PlexConnect plus all ATV’s.

If you use PMS versions older than 1.5.1 you are on your own. See this announcement. Several Plex clients (PlexWeb, Roku, etc) will refuse to work with older servers. Remote access (through plex.tv) will not be allowed. Probably the metadata collectors will not work also.

In summary, it is highly recommended to use a recent PMS version and have the ATV’s signed-in if the Plex servers are also signed-in. Regarding GDM, I can modify the timeout value if necessary.

As the tests had many configurations/steps, I just didn’t mention what I consider “basic” in the post.

  • For GDM test: yes, I authorized the local subnet “192.168.5.0/24” in the List of IP addresses and networks that are allowed without auth of all Plex servers. Actually, I just left that setting throughout the tests.
  • For Remote PMS test: I signed into my Plex.tv accounts. I know multicast restriction for local LAN, so I didn’t try GDM in this kind of test.
  • My production computers are running new version (i.e 1.13). And as mentioned in earlier posts, when ATV is signed in and servers are in the same network as ATV and PlexConnect, everything works normally. I just installed the old version purely for testing, and only on the testing laptop Dell-Venue.

Sorry for my previous long post, wish there was some way to summarize my days of testing shorter. Now, I think I should mention that I’d like to shift our focus to the GDM function per the result I got with the old Plex version vs new versions.

  1. It’s interesting to know about the 1.1.3 announcement. I’ll try with a pre-1.1.3 and a 1.1.3 to check.
  2. Googling and searching more, on Asus users forums, I saw some people got frustrated with multicast issue. Some even suggested that Asus routers “have more multicast issues, especially with Apple devices, than other manufacturers”. I doubt that though. But people also shared some workarounds/fixes regarding changing Multicast Rate setting which has some kind of OFDM, CCK stuffs. I think that might explain the results I told in the previous post. So, I’ll also give those workarounds a try.

Maybe PlexConnect uses another IP range that needs to be authorized. What is in your log ? Mine reads this, so I know that PlexConnect is running in 10.100.10.100:

Dec 04,2018 08:10:25 PlexConnect: IP_self: 10.100.10.100

What happens if you also authorize 192.168.4.5 ?

If the above does not work, pls do the following:

  1. Restart Plex Media Server
  2. Restart PlexConnect
  3. Repeat the GDM test with one of your ATVs
  4. Post the Plex Media Server.log and the PlexConnect.log in your next post

Sorry for my late reply. Just after your last post, I performed the tests to retrieve the logs. But I was requested to go on a sudden business trip, and when coming back home several days ago I got sickness (still having headache now). Anyway, I’m attaching the logs now. Maybe at this time of the year, you’re busy. If any, I’ll ping you later in January :slight_smile:

Btw, here is a demo webgui of my Asus router for your reference (“IGMP Snooping” and “Multicast rate” are two noticeable settings here. Anyway, changing them did not make any difference):
http://demoui.asus.com/Advanced_WAdvanced_Content.asp

Plex Media Server-Plex1.14-GDM-NotOK.log (378.3 KB)
Plex Media Server-oldPlex-GDM-OK.log (68.4 KB)
PlexConnect-Plex1.14-GDM-NotOK.log (257.2 KB)
PlexConnect-oldPlex-GDM-OK.log (1.3 MB)

In your case PlexConnect is trying to connect PlexConnect using IP 127.0.0.1. This is unusual. Are you using DNS rebinding protection, or reverse proxy ? Try authorizing 127.0.0.1 in Plex Media Server.

I don’t know anything about that. But your comment gave me some idea. I reverted both the Dell laptops to a fresh installation, i.e. not activated and with just some little tweaks and apps (non-networking related)
Dell-Venue: install the old PMS 0.9
Dell-E5470: install the new PMS 1.14
May not be related, but mention here anyway: the router was also reset to factory defaults once again.

I tried PlexConnect on the E5470. And it could see all two PMS’es! Also, PlexConnect reported “Received data from” the 192.168.1.x IPs of the PMS’es. Now I have a proof photo attached here :wink: The new log is also attached.

The TV is now put in another room. People sleeping there. So tomorrow I’ll do some more tests and report back.
PlexConnect-onE5470-GDMOK-ALL PMS.log (209.2 KB)

Good. There’s no need to use loglevel=High, you can use Normal instead.