Remote Access Not Working

Have Plex installed on Synology NAS. Trying to access from outside but just keep getting the message that my server is not available from outside my network.

I am manually port forwarding tcp/32400 on my firewall.

www.canyouseeme.org shows it as open. I get the plex interface when visiting there from outside. But Plex keeps reporting it as not working.

What else can I look at?

At this point, the next step is to log into your router and see what the WAN IP address reports as.

If “Whatsmyip.org” reports a different address than what your router’s WAN IP address report, your ISP is creating a level of NAT. When it gets to you, their “WAN IP” getting converted to your LAN address (which is normal for any modem/router) creates the second level. This is known as “Double NAT” and Plex cannot navigate through that. If they are creating double NAT, you need to ask them to give you a true public-facing WAN IP address at your router.

My firewall reports the same IP address as whatismyip.org and canyouseeme.org which is showing the port open as well.

AFAIK, I am not being double NATed. I am hosting several other services at the same address, including VPN, and all of those are working fine. Normally as soon as the port shows open from outside, everything works. But for some reason Plex appears to be checking something else and I am not sure what is failing.

You said the magic word
 VPN. The VPN, specifically the routes to Plex.tv , need hand crafting. That’s a configuration more detailed than double NAT resolution. For the same reason PMS can’t get itself through double NAT, it can’t create route table entries (it doesn’t run as root) and work it out

But I’m not using VPN at the moment. I just have it setup on my firewall, so I can access remotely, if needed. This is why I don’t believe there is any double NAT. Shouldn’t be impacting Plex at all. Again, it is reachable via the internet when I check my ports.

The Synology just has a regular default route, and everything should be accessible through here. No funky routing needed.

Not sure if this log is related to why it’s failing but this is what I see after trying to establish a connection:

I’m sorry, I was diverted to another task and didn’t get back to your sooner.

That tells me all I need to know. It is an issue which is being worked on. It’s the same issue I was able to track down and make repeatable for the devs. They are working on it but being asynchronous is the issue. It actually can ‘flip-flop’ itself and think it’s online when not and the reverse.

The easiest way to get around this until we get a resolution is this:

  1. stop plex
  2. copy your Preferences.xml (make a backup copy)
  3. for each of these keys I list here, remove them and their associated value.
  4. save the file
  5. start plex

You’ll see it has forgotten it’s ever been online or is even part of your account. Do not worry. Because we kept the same Machine ID information, there will be no lost sharing or other features. Once associated with your account again, all will be good.

Remove:
PublishServerOnPlexOnlineKey=
PlexOnlineUsername=
PlexOnlineMail=
PubSubServer=
PubSubServerPing=
LastAutomaticMappedPort=
ManualPortMappingMode=
ManualPortMappingPort=
PubSubServerRegion=

When you start PMS, it will tell you it’s unclaimed and all that.

Go to Settings - Server - General . Sign it into your plex account and claim it that way.

Now proceed to Settings - Server - Remote Access and configure it.

You will have one chance to configure it correctly without requiring you to edit the file again. (sorry about that)

Now whatever it reports will be truth. If you toggle it a few times you’ll confuse it and result in the locked state that forced us to edit the file.

1 Like

Thank you this sounds promising.

Only question I have now is how to I backup/edit the preferences.xml file?

I see via searching that it might be located here: “/Volume1/Plex/Library/Application Support/Plex Media Server/” but I can’t see that folder via browsing either SMB or via FileStation, and when I tried to CD to the Plex directory via SSH it is telling me access denied.

Sorry
 Thought that was understood.

Using File Station, Drill down Plex/Library/Application Support/Plex Media Server

you’ll see Preferences.xml copy it like you would any other file to somewhere. That will be your backup

Now, right click on Preferences.xml and ‘Edit’ using the built-in text editor. If your machines does’t have that by default. It’s a tiny, 30 second install, from Synology. It’s great because it’s graphical and Linux formatted.

Please use their editor

Sorry, I know I missing something obvious. I’ve not a heavy Plex user and am just starting to look at using it a bit more.

When I am in File Station, I dont see the \volume1\Plex folder. I know it’s there since I can list the directory from the \volume1 folder. But I can’t enter the folder using ssh or see it via FileStation.

Some permissions configuration that I am not understanding how to manipulate.

I tried using chmod to change the Plex folder but I receive “operation not permitted” under admin account. I tried to su to root but I don’t know the password and it’s different than my admin account password. I tried enabling read/write under the admin account for the Plex shared folder via Control Panel Users and this doesn’t seem to help.

Not sure what else to try. Sorry for my ignorance here.

I’m sorry, you must first give your username and admin permission to see (R/W) the Plex share in Control Panel. This is one of the ‘undocumented changes’ Synology implemented in DSM 6.0

In the next release of PMS, when the Plex share is created it will no longer require that permission.

I thought that’s already what I did in Control Panel. Here are my admin user’s permissions:

Is there another step I need to take?

you did what was correct. They’ve (Synology) has changed one other thing since 6.0 and I’ve forgotten what it was.

I will ask / find out and be right back

Ok
 Think I’ve got it
 hahaha (yes, this is hugely embarrassing but now I’m on a quest!)

  1. Go to Control Panel - Shared Folders
  2. Edit the “Plex” share.
  3. Uncheck “Hide sub folders and files” in the General tab
  4. Make certain your username and the admistrative user (admin) and/or your alternative admin have R/W permission
  5. Click OK

Now go to File Station and you should see the Plex share and can continue with the task for Preferences.xml

(Don’t you just LOVE DSM 6.0’s security?)

Thanks for all your help. Yah this is some interesting security. So that checkbox did help to resolve the issue of the folder not showing. Now I can enter the folder and browse to where the preferences.xml file resides, and even copy it out. However, if I double click to open it within the text editor it is telling me that the file does not exist.

So I tried another workaround - I Just edited the file in the location I copied to. Saved it, and moved it back.

This seems to be resetting some of the stuff you talked about, but I am still getting failures when trying to enable remote access. Not sure if this log will help any but here’s what I see now


What NAT punch is still pending?

I’m sorry, I probably should have explained better

Right click on the file from within File Station and ‘Open with Text Editor’ (this is the Synology text editor, previously bundled with DSM by default, now available as a package to install


I receive the same message about File Does Not Exist either by double clicking the file, right-clicking and selecting open with text editor, or opening text editor first and then browsing to the file. Seems to be a permissions issue.

I am able to copy the file, edit it elsewhere using the text editor, and then delete (or rename) the original and copy back.

I tried following the steps you posted above but it is not resulting in the server becoming reachable.

When you edit the file, you ‘edit in place’.

Let’s walk through this again.

  1. Package Center -> Plex Media Server -> Stop

  2. Right click on “Preferences.xml” and use “Copy to” to make a backup to a location of your choice

  3. Without leaving the “Plex Media Server” directory and “Preferences.xml” highlighted, open With -> Text Editor to edit it.

  4. delete the “Attribute=Value” sets I listed above and list here again. Everything will be listed in the long line 2.

PlexOnlineUsername= 
PlexOnlineMail=
PubSubServer= 
PubSubServerPing= 
LastAutomaticMappedPort= 
ManualPortMappingMode= 
ManualPortMappingPort= 
PubSubServerRegion=```

5. When done removing,   click File - Save   just as you would with any editor and overwrite the original
6.  Return to Package Center and start Plex
7. Open your NAS's IP in your browser    http://ip.of.syno.nas:32400/web
8.  Your Plex server will not know it has ever been on the net nor will it know you are the owner.
9.  Settings - Server - General   ...   Sign the server into your account
10. Settings - Server - Remote Access ..  This is where you have 1 chance to get it to connect, so do it right.
11. When it comes back Green,  you're connected.


If, after all this,  you still cannot connect to the Plex and have remote access,   the issue is not Plex.   

Start checking your port forwarding, firewall, and other applications (make sure Video Station and Audio station are not running)

I can follow steps until step 3. When I click to open the Preferences.xml file in this step it tells me the file Does not exist


I have a workaround for this which is doing the same thing, except editing the copy, deleting the original, and then moving the copied file back and renaming to the same filename. This appears to work, but when I configure the remote access I am getting the exact same error. It didn’t disconnect my Online account though the first time I did it. To get this to work, I also have to delete the following value/key pair:

PlexOnlineToken=

But even after doing that, even if I do it right the first time, nothing ever turns green for remote access.

My port forwarding and firewall rules are setup correctly. I can disconnect from my home WiFi and access the plex web interface while tethering to my phone on LTE. The service is working. Externally. Plex is just not recognizing it.

Maybe I should try downgrading to a release where this asynchronous problem isn’t an issue. Can you give a version before this was a problem?

Well, oddly enough, I just refreshed the remote access page, without doing anything else, and now it appears to be fine:

So I guess this was probably the solution but it doesn’t necessarily return the right value when you do it. Have to refresh after trying to reconnect.