# Plex on Synology - cannot add media server

**URL:** https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230
**Category:** Plex Media Server
**Tags:** server-synology
**Created:** [September 18, 2022, 1:13am UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230 "2022-09-18T01:13:25Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![bennyz3](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@bennyz3](https://forums.plex.tv/u/bennyz3)
#### Post date: [September 18, 2022, 1:13am UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/1 "2022-09-18T01:13:25Z")

</div>

So my Plex media server has been running perfectly for years on my Synology. Today, it no longer shows any of my libraries or media and it seems the option to add a media server is simply no longer available. I’m connected directly to Plex on the NAS but it’s giving me the option to download the media server software - so I can then add a media server - I am literally ON the media server - why on earth would it now be asking me to not only add a media server, but then only allow me to download the software - what happened to the ability to simply point to my media server and see all my existing libraries!? It’s a bizarre issue.

I’ve removed Plex from the NAS and re-installed it, same issue. I’ve deleted and recreated my [plex.tv](http://plex.tv) account - same issue. There literally is nowhere for me to add a media server. I can only think this is some sort of update issue, perhaps the latest version of the PLex app on Synology is simply broken.

Anyone else seeing this?

---

<div class="post-metadata">

### Author: ![milias](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/milias/32/288372_2.png) [@milias](https://forums.plex.tv/u/milias)
#### Post date: [September 18, 2022, 8:34am UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/3 "2022-09-18T08:34:27Z")

</div>

Hello, I have the same issue since yesterday.

As far as I can tell, when SSH tunneling into the server running plex and accessing [http://127.0.0.1:32400/web](http://127.0.0.1:32400/web) nothing was showing.

I followed first this: [https://support.plex.tv/articles/204281528-why-am-i-locked-out-of-server-settings-and-how-do-i-get-in/](https://support.plex.tv/articles/204281528-why-am-i-locked-out-of-server-settings-and-how-do-i-get-in/) ( Remove Certain Entries \> Linux ) and the server appeared again after restarting the process, however it cannot be claimed. When clicking on “Claim Server” the button spins for some time and comes back to the same state.

When accessing again the web UI through the tunnel, I see that trying to access this URL returns a 404 error:

[https://plex.tv/api/claim/subscribe?X-Plex-Product=Plex%20Web&X-Plex-Version=4.87.2&X-Plex-Client-Identifier=xxxxxx&X-Plex-Platform=Firefox&X-Plex-Platform-Version=106.0&X-Plex-Features=external-media%2Cindirect-media%2Chub-style-list&X-Plex-Model=bundled&X-Plex-Device=Linux&X-Plex-Device-Name=Firefox&X-Plex-Device-Screen-Resolution=xxxxx&X-Plex-Token=xxxxxx&X-Plex-Language=en](https://plex.tv/api/claim/subscribe?X-Plex-Product=Plex%20Web&X-Plex-Version=4.87.2&X-Plex-Client-Identifier=xxxxxx&X-Plex-Platform=Firefox&X-Plex-Platform-Version=106.0&X-Plex-Features=external-media%2Cindirect-media%2Chub-style-list&X-Plex-Model=bundled&X-Plex-Device=Linux&X-Plex-Device-Name=Firefox&X-Plex-Device-Screen-Resolution=xxxxx&X-Plex-Token=xxxxxx&X-Plex-Language=en)

(Some details removed for privacy).

Checking from a different computer, indeed if I `curl` this URL I get the same error code.

Is there an issue with the endpoint at [https://plex.tv/api/claim](https://plex.tv/api/claim)?

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [September 18, 2022, 3:42pm UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/4 "2022-09-18T15:42:18Z")

</div>

@bennyz3

Using Filestation, can you please create a zip file of the ‘Logs’ folder underneath ‘Plex Media Server’ and attach it here ?

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [September 18, 2022, 3:48pm UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/5 "2022-09-18T15:48:21Z")

</div>

@milias

The URL you are showing into the API won’t work for you unless you have the rest of the session authentication info. That’s why you get 404.

The browser URL you should be using is [Claim | Plex](https://plex.tv/claim)

Are you trying to claim a Synology server which is remote to you?

---

<div class="post-metadata">

### Author: ![milias](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/milias/32/288372_2.png) [@milias](https://forums.plex.tv/u/milias)
#### Post date: [September 18, 2022, 4:52pm UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/6 "2022-09-18T16:52:33Z")

</div>

Hello @ChuckPa, thank you for answering!

First: no, this is not Synology, it’s a “bare metal” install on a server of mine.

After what you said I checked [this](https://github.com/uglymagoo/plex-claim-server) and indeed as you said I was missing the rest of the request. Unfortunately, manually sending the correct information and getting a new `authentication-token` that I then added to `Preferences.xml` does not fix the issue.

What I have noticed:

- I had to remove `PlexOnline*` from `Preferences.xml` so that the server shows up as unclaimed.
- Sent the correct request (with the claim code) to `https://plex.tv/api/claim/exchange` and got the `authentication-token` back.
- Added `PlexOnlineToken="<token>"` back to the XML file, restarted the process.
- Now I get the error “You do not have access to this server” error, which now that I google it seems fairly common.
- If I remove `PlexOnline*` tags, it shows up as unclaimed again.

I have also tried to claim as the web UI does using `curl -vvv -X POST http://localhost:32400/myplex/claim\?token=claim-<token>`, and after 30 seconds I get:

```auto
* Trying 127.0.0.1:32400...
* Connected to localhost (127.0.0.1) port 32400 (#0)
> POST /myplex/claim?token=claim-<token> HTTP/1.1
> Host: localhost:32400
> User-Agent: curl/7.85.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 500 Internal Server Error
< X-Plex-Protocol: 1.0
< Content-Length: 109
< Content-Type: text/html
< Connection: Keep-Alive
< Keep-Alive: timeout=20
< Cache-Control: no-cache
< Date: Sun, 18 Sep 2022 16:43:27 GMT
< 
* Connection #0 to host localhost left intact
<html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>

```

I am out of ideas at this point. In the log (`com.plexapp.system.log`) I only see one error:

```auto
2022-09-18 18:41:06,680 (7f57d67f8b30) : DEBUG (networking:143) - Requesting 'http://resources-cdn.plexapp.com/hashes.json'
2022-09-18 18:41:11,706 (7f57d67f8b30) : CRITICAL (runtime:1299) - Exception getting hosted resource hashes (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-914ddd2b3/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 1291, in get_resource_hashes
    json = self._core.networking.http_request("http://resources-cdn.plexapp.com/hashes.json", timeout=5).content
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-914ddd2b3/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 242, in content
    return self. __str__ ()
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-914ddd2b3/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 220, in __str__
    self.load()
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-914ddd2b3/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 158, in load
    f = self._opener.open(req, timeout=self._timeout)
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 447, in _open
    '_open', req)
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 1228, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 1198, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno -3] Try again>

```

That doesn’t look related to this issue, but I don’t know.

Do you have any suggestions? Considering [the amount of similar questions](https://www.google.com/search?hl=en&q=plex%20unauthorized%20you%20do%20not%20have%20access%20to%20this%20server) I hope there is a solution to this.

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [September 18, 2022, 5:35pm UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/8 "2022-09-18T17:35:08Z")

</div>

Grab the logs for me please.  
Something else going on in there.

---

<div class="post-metadata">

### Author: ![milias](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/milias/32/288372_2.png) [@milias](https://forums.plex.tv/u/milias)
#### Post date: [September 18, 2022, 6:10pm UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/9 "2022-09-18T18:10:36Z")

</div>

Here you go!

[logs.tar.gz](https://forums.plex.tv/uploads/short-url/4HUNBqcYFJ2AfcHnCfvKqLZ0v9p.gz) (2.1 MB)

In the meantime, I tried a couple more things:

- I spin up a container using image `plexinc/pms-docker` and the exact same behavior occurs. After providing the claim token using `PLEX_CLAIM`, the server is unauthorized.
- I created a new account and trying to claim the “bare metal” installation gives the same result as before. With a freshly spin up container, giving the claim token from the newly created account, I get this when accessing `http://127.0.0.1:32400/web/index.html#!/get-plex-media-server`.  
 ![image](https://global.discourse-cdn.com/plex/original/4X/7/1/8/718ad250db9649b33a842b12bd6dfd60bba01706.jpeg)  
It tells me to install plex media server… from the server, this is because the account is “unauthorized” to access it.
- If instead I don’t provide the environment variable `PLEX_CLAIM`, I can access the server but of course it says it’s unclaimed.  
 ![image](https://global.discourse-cdn.com/plex/original/4X/9/a/e/9aefa59d4db220d7e376eb5afb58bbaf3aab4871.jpeg)

I am now even more confused, to be honest. What is happening that a brand new account cannot claim a server? Just in case it matters: the container is running on a separate machine (different network), and I’m accessing using “private browsing” to make sure there are no cookies from my normal account influencing anything.

Thank you very much for your help 🙂

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [September 18, 2022, 6:45pm UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/10 "2022-09-18T18:45:12Z")

</div>

@milias

Do you want me to be polite as I report my findings? 😈

1. Why am I seeing Redhat in a Synology forum? 🤔

```auto
Sep 18, 2022 18:42:42.490 [0x7f15813fcb00] INFO - Plex Media Server v1.28.2.6151-914ddd2b3 - unknown PC unknown - build: linux-x86_64 redhat - GMT 02:00

```

1. Borked ‘AllowedHosts’ setting in preferences. You enter discrete IP addresses without netmask of /32 🙂

```auto
Sep 18, 2022 18:42:43.317 [0x7f1580df3b00] ERROR - Illegal whitelist has all-zeroes netmask

```

1. And the $50 question 😈  
– What’s the DNS / network set for? 🤦‍♂️

```auto
Sep 18, 2022 18:42:48.922 [0x7f157eefeb00] WARN - [HttpClient/HCl#3] HTTP error requesting GET http://plex.tv/pms/:/ip (6, Couldn't resolve host name) (Could not resolve host: plex.tv)
Sep 18, 2022 18:42:48.922 [0x7f157f7eeb00] ERROR - PublicAddressManager: Unable to get public IP adddress from myPlex (httpCode=-6): 

```

#### Conclusion:

1. Not Internal server or API error
2. PEBKAC

🤣

---

<div class="post-metadata">

### Author: ![milias](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/milias/32/288372_2.png) [@milias](https://forums.plex.tv/u/milias)
#### Post date: [September 18, 2022, 7:03pm UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/11 "2022-09-18T19:03:10Z")

</div>

… damn!

Thank you for pointing out the DNS issues, [why is it always DNS!?](https://www.dnsfilter.com/blog/why-is-it-always-dns)

At least now I can say what the issue was: for something unrelated I commented out the nameservers from my `/etc/resolv.conf`, because they are configured in a different way… and that seems to break Plex 😛 ! Regardless, putting them back indeed fixes the issue.

To answer for your curiosity:

1. Next time I’ll try to find a more appropriate subforum, it seemed like a similar situation at the start. This is arch linux (btw).
2. I completely forgot I had added `allowNetworks="0.0.0.0/0"` to `Preferences.xml` (now removed), which I guess Plex doesn’t like too much.
3. Good idea to check more log files next time, not only one!

Thank you very much for guiding me in the right direction 🙂

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [September 18, 2022, 7:29pm UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/12 "2022-09-18T19:29:01Z")

</div>

I have my own name servers and Plex doesn’t break.  
I’m curious how you did that.  
Are you putting them in the search clause ?

Yes, 0.0.0.0/0 will break Plex and about any other program which is subnet aware. 🙂

I hope I, at minimum, made this 🍕 and 🍺 laugh worthy?

Don’t worry about the sub-forum. I was _purely_ busting your chops 🕶

---

<div class="post-metadata">

### Author: ![milias](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/milias/32/288372_2.png) [@milias](https://forums.plex.tv/u/milias)
#### Post date: [September 18, 2022, 7:37pm UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/13 "2022-09-18T19:37:54Z")

</div>

You definitely made it fun! 🙂

Have you tried using an empty `/etc/resolv.conf`? I’m using `systemd-networkd` and setting the nameservers as

```auto
[Network]
DNS=1.1.1.1
DNS=1.0.0.1

```

So they appear in `/run/systemd/resolve/resolv.conf` and are picked up by other programs without issues. However the “more traditional” `/etc/resolv.conf` is empty.

… I just realized I need to link one to the other. This should properly fix the issue _and_ I can still specify them as I wanted.

I have to say, ackchyually, that `0.0.0.0/0` is a perfectly valid network!

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [September 18, 2022, 8:13pm UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/14 "2022-09-18T20:13:21Z")

</div>

> [@milias](#):
>
> … I just realized I need to link one to the other. This should properly fix the issue _and_ I can still specify them as I wanted.

🌞

That’s the trick; tell systemd to stop interfering

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)
#### Post date: [December 17, 2022, 8:13pm UTC](https://forums.plex.tv/t/plex-on-synology-cannot-add-media-server/811230/15 "2022-12-17T20:13:32Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
