"Failure in ParseHeader: HTTP/1.1 403 Forbidden" after transferring server from Windows to Linux

Server Version#: 1.18.4.2171

I recently transferred my Plex server from Windows 10 to a virtual machine running Xubuntu 18.04 on the same hardware. I successfully re-synced my libraries, and migrated my server preferences and ID (to maintain watch history and provide continuity for those with which I share my server).

The server seems to be operating normally, but becomes unreachable after approximately 48 hours. Restarting the server cures this problem for approximately another 48 hours.

My logs show the following every 15 seconds. I’ve searched similar topics but unfortunately cannot yet determine what I’ve done wrong. Might somebody knowledgeable help me?

Jan 27, 2020 10:45:46.049 [0x7fe1e0d31700] DEBUG - EventSource: Stopping.
Jan 27, 2020 10:45:46.049 [0x7fe1e0d31700] DEBUG - PubsubServerManager: Switching to next host in region: 184.105.148.116
Jan 27, 2020 10:45:46.049 [0x7fe1e0d31700] DEBUG - EventSource: Stopping.
Jan 27, 2020 10:45:46.050 [0x7fe1e0d31700] DEBUG - EventSource: Resolving 184.105.148.116 port 443
Jan 27, 2020 10:45:46.050 [0x7fe1e0d31700] DEBUG - EventSource: Resolved 184.105.148.116 to 184.105.148.116
Jan 27, 2020 10:45:46.065 [0x7fe1e1532700] DEBUG - EventSource: Connected in 10 ms.
Jan 27, 2020 10:45:46.065 [0x7fe1e1532700] DEBUG - EventSource: Wrote data, reading reply.
Jan 27, 2020 10:45:46.635 [0x7fe1e0d31700] DEBUG - EventSource: Read HTTP reply header.
Jan 27, 2020 10:45:46.635 [0x7fe1e0d31700] DEBUG - EventSource: Failure in ParseHeader: HTTP/1.1 403 Forbidden
Server: nginx
Date: Mon, 27 Jan 2020 18:45:46 GMT
Content-Type: text/html
Content-Length: 162
Connection: close

May I see the full logs ZIP file please? I have suspicions but can’t tell from that snippet alone.

Thanks for your help. Here are the logs:
[Removed]

I’ve found some discrepancies in your logs.
It looks as if PMS can’t read some files or those files didn’t make it across with the migration. Notice the pathname is incomplete / invalid.

guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fposters%2Fcom%2Eplexapp%2Eagents%2Eimdb_dfa1710f846e37646046ee28553b00c274b4a578
Jan 27, 2020 02:06:52.264 [0x7f8c5effd700] ERROR - Error bringing media local (metadata://posters/com.plexapp.agents.imdb_dfa1710f846e37646046ee28553b00c274b4a578).
Jan 27, 2020 02:06:52.264 [0x7f8c5effd700] DEBUG - Item 5675 (The Killing Fields) Scanning metadata graphic elements in XML file ""/Info.xml
Jan 27, 2020 02:06:52.266 [0x7f8c20ff9700] DEBUG - HTTP requesting GET http://127.0.0.1:45733/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fart%2Fcom%2Eplexapp%2Eagents%2Eimdb_1081a4f842cd2b3b455d3a41b2fb86f506d2e692
Jan 27, 2020 02:06:52.276 [0x7f8c20ff9700] DEBUG - HTTP 500 response from GET http://127.0.0.1:45733/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fart%2Fcom%2Eplexapp%2Eagents%2Eimdb_1081a4f842cd2b3b455d3a41b2fb86f506d2e692
Jan 27, 2020 02:06:52.276 [0x7f8c5effd700] ERROR - Error bringing media local (metadata://art/com.plexapp.agents.imdb_1081a4f842cd2b3b455d3a41b2fb86f506d2e692).
Jan 27, 2020 02:06:52.276 [0x7f8c217fa700] DEBUG - HTTP requesting GET http://127.0.0.1:45733/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fart%2Fcom%2Eplexapp%2Eagents%2Eimdb_48be99c316f522feb015caf3add53dcef8d75916
Jan 27, 2020 02:06:52.284 [0x7f8c217fa700] DEBUG - HTTP 500 response from GET http://127.0.0.1:45733/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fart%2Fcom%2Eplexapp%2Eagents%2Eimdb_48be99c316f522feb015caf3add53dcef8d75916
Jan 27, 2020 02:06:52.285 [0x7f8c5effd700] ERROR - Error bringing media local (metadata://art/com.plexapp.agents.imdb_48be99c316f522feb015caf3add53dcef8d75916).
Jan 27, 2020 02:06:52.285 [0x7f8c20ff9700] DEBUG - HTTP requesting GET http://127.0.0.1:45733/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fart%2Fcom%2Eplexapp%2Eagents%2Eimdb_fa69c76e6e5dec61836a74e3314dc9d4224ce50a
Jan 27, 2020 02:06:52.294 [0x7f8c20ff9700] DEBUG - HTTP 500 response from GET http://127.0.0.1:45733/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fart%2Fcom%2Eplexapp%2Eagents%2Eimdb_fa69c76e6e5dec61836a74e3314dc9d4224ce50a
Jan 27, 2020 02:06:52.294 [0x7f8c5effd700] ERROR - Error bringing media local (metadata://art/com.plexapp.agents.imdb_fa69c76e6e5dec61836a74e3314dc9d4224ce50a).
Jan 27, 2020 02:06:52.294 [0x7f8c217fa700] DEBUG - HTTP requesting GET http://127.0.0.1:45733/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fart%2Fcom%2Eplexapp%2Eagents%2Eimdb_72265ea25f1293b12feeee76f93ebc93d3216f27
Jan 27, 2020 02:06:52.302 [0x7f8c217fa700] DEBUG - HTTP 500 response from GET http://127.0.0.1:45733/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fart%2Fcom%2Eplexapp%2Eagents%2Eimdb_72265ea25f1293b12feeee76f93ebc93d3216f27
Jan 27, 2020 02:06:52.303 [0x7f8c5effd700] ERROR - Error bringing media local (metadata://art/com.plexapp.agents.imdb_72265ea25f1293b12feeee76f93ebc93d3216f27).
Jan 27, 2020 02:06:52.303 [0x7f8c20ff9700] DEBUG - HTTP requesting GET http://127.0.0.1:45733/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fart%2Fcom%2Eplexapp%2Eagents%2Eimdb_a772a148cfee7952b1cc41692a4950cf415907e9
Jan 27, 2020 02:06:52.312 [0x7f8c20ff9700] DEBUG - HTTP 500 response from GET http://127.0.0.1:45733/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fart%2Fcom%2Eplexapp%2Eagents%2Eimdb_a772a148cfee7952b1cc41692a4950cf415907e9
Jan 27, 2020 02:06:52.312 [0x7f8c5effd700] ERROR - Error bringing media local (metadata://art/com.plexapp.agents.imdb_a772a148cfee7952b1cc41692a4950cf415907e9).
Jan 27, 2020 02:06:52.312 [0x7f8c217fa700] DEBUG - HTTP requesting GET http://127.0.0.1:45733/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fart%2Fcom%2Eplexapp%2Eagents%2Eimdb_326c75d73f9d278e2c1e9604a3b6b3dd325e3c91
Jan 27, 2020 02:06:52.319 [0x7f8c217fa700] DEBUG - HTTP 500 response from GET http://127.0.0.1:45733/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt0087553%3Flang%3Den&mediaType=1&url=metadata%3A%2F%2Fart%2Fcom%2Eplexapp%2Eagents%2Eimdb_326c75d73f9d278e2c1e9604a3b6b3dd325e3c91
Jan 27, 2020 02:06:52.319 [0x7f8c5effd700] ERROR - Error bringing media local (metadata://art/com.plexapp.agents.imdb_326c75d73f9d278e2c1e9604a3b6b3dd325e3c91).
Jan 27, 2020 02:06:52.332 [0x7f8c5effd700] DEBUG - Extras: 1 existing extras.
Jan 27, 2020 02:06:52.332 [0x7f8c5effd700] DEBUG - Extras: Checked extra 'The Kil

The primary problem I see is the communication timeout & failure to connect to plex.tv and remain connected. Since this occurs on a regular interval, what else is happing? DHCP refreshing? Is the server WiFi with the AP sleeping? It’s going to be something trivial.

Jan 27, 2020 02:09:50.905 [0x7f8c851e6700] WARN - PubSubManager: Connection to 172.104.132.7 failed: Connection timed out.
Jan 27, 2020 02:09:50.905 [0x7f8c851e6700] WARN - PubSubManager: Connection to 139.162.120.52 failed: Connection timed out.
Jan 27, 2020 02:09:50.905 [0x7f8c851e6700] WARN - PubSubManager: Connection to 109.237.24.233 failed: Connection timed out.
Jan 27, 2020 02:09:50.905 [0x7f8c851e6700] WARN - PubSubManager: Connection to 139.162.20.120 failed: Connection timed out.
Jan 27, 2020 02:09:50.905 [0x7f8c851e6700] WARN - PubSubManager: Connection to 184.105.148.115 failed: Connection timed out.
Jan 27, 2020 02:09:50.905 [0x7f8c851e6700] WARN - PubSubManager: Connection to 172.105.97.53 failed: Connection timed out.
Jan 27, 2020 02:09:50.905 [0x7f8c851e6700] WARN - PubSubManager: Connection to 184.105.148.116 failed: Connection timed out.
Jan 27, 2020 02:09:50.905 [0x7f8c851e6700] WARN - PubSubManager: Connection to 82.94.168.18 failed: Connection timed out.
Jan 27, 2020 02:09:50.905 [0x7f8c851e6700] WARN - PubSubManager: Connection to 45.33.103.230 failed: Connection timed out.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] WARN - PubSubManager: Connection to 45.79.23.169 failed: Connection timed out.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] WARN - PubSubManager: Connection to 172.104.213.234 failed: Connection timed out.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] DEBUG - EventSource: Stopping.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] DEBUG - EventSource: Stopping.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] DEBUG - EventSource: Stopping.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] DEBUG - EventSource: Stopping.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] DEBUG - EventSource: Stopping.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] DEBUG - EventSource: Stopping.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] DEBUG - EventSource: Stopping.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] DEBUG - EventSource: Stopping.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] DEBUG - EventSource: Stopping.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] DEBUG - EventSource: Stopping.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] DEBUG - EventSource: Stopping.
Jan 27, 2020 02:09:50.906 [0x7f8c851e6700] ERROR - EventSource: Retrying in 60 seconds.
Jan 27, 2020 02:10:08.727 [0x7f8c849e5700] DEBUG - EventSource: Failure in IdleTimeout (0 - Success).
Jan 27, 2020 02:10:08.727 [0x7f8c849e5700] ERROR - EventSource: Retrying in 60 seconds.

This looks like networking on the host itself is shutting down.

Jan 27, 2020 02:10:51.208 [0x7f8c851e6700] DEBUG - EventSource: Failure in Connect (113 - No route to host).
Jan 27, 2020 02:10:56.208 [0x7f8c851e6700] DEBUG - EventSource: Stopping.

Alright, this is a lot to unpack, and honestly bit over my head, but all helpful. Could you clarify a couple of points to facilitate my further research and troubleshooting?

Are these errors contributing to my connection timeout, or can I treat this as a separate issue? Regardless, do the errors pertain to files that should have been among those I copied from %LOCALAPPDATA%Plex Media Server to $PLEX_HOME/Library/Application Support/Plex Media Server/ during the migration? Can I just recopy those directories in their entirety to attempt fix this?

A little more detail about my setup: I was previously running PMS without issue directly on the Windows 10 PC that now serves as host to the VBox VM on which PMS is currently experiencing this timeout issue. I have a wired network connection to the host, with VBox set to bridge it to the VM. I’ve static IPs assigned to the host and VM on my network.

As PMS worked directly on the host without issue, should I concentrate my troubleshooting on the VBox implementation? Any further ideas? Thanks.

The apparent missing files are supplemental to the connection problem. I am merely informing of all I found in the logs.

You can copy everything in Plex Media Server, and all below it, provided you also perform the steps to “move install to another system” again and then remember to sudo chown -R plex:plex /var/lib/plexmediaserver (all performed with Plex stopped).

The communication problems are, imho, the most pressing. The above steps need not be repeated because the missing metadata can be regenerated.

So it is clear,

  1. PMS was previously running native on Windows.
  2. VirtualBox was installed
  3. PMS now runs in the VirtualBox VM on the same Windows host?

If I understand correctly, you do realize there is a net loss of performance and functionality here?

You have the layer of Linux networking and file system layered on top of the Windows networking and file system layer which is running through the VM (type 2) translation layer?

Thanks for your clarifications.

This is correct.

I understand this is an ugly setup. I adopted it as a way to allow direct remote access to PMS while running a VPN 24/7 on the Windows host.

I’ve a symmetrical gigabit connection that can cope with the bandwidth demands of direct playback on simultaneous remote clients. Routing PMS through the comparatively limited bandwidth of a VPN doesn’t allow for remote direct playback, and is generally a waste of the fantastic internet connection I’m fortunate to have.

If you can point me towards an alternate (elegant) solution that will direct PMS traffic around my VPN, I just assume ditch the VM.

Therein is the problem.

Short of hand crafting routing table rules for your Linux VPN, PMS doesn’t elegantly run in a VPN when brokered through Plex.tv. There is no way to bind an ethernet adapter to send from. PMS only listen() on the designated adapter.

Plex.tv will use the exit aperture as its IP address plus the real IP and hand out that address to all remote clients wishing to connect.

You do have the ability to specify Custom Access URLs (Settings - Network - Show Advanced). You can define alternative entry points (e.g. a DDNS name) to be reported to Plex.tv Through this mechanism, if you point the DDNS to the VPN or any specific endpoint, does this provide the functionality you want?

Also on that same Network Settings page, you have the ability to tell PMS which network adapter to use. While I don’t have a Windows machine, I would think you could point PMS to use a VPN which terminates on the Windows host?

You’ve given me context enough to fundamentally rethink my implementation. In the meantime, I’m going to revert to my previous PMS setup.

I appreciate your support today. You folks make a fantastic product.

Thanks and glad I could be of help.

1 Like

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