plexmediaserver.service: Failed with result 'exit-code'.

I have no clue what is going on, I’ve been at this for hours, I was watching star wars and all of a sudden my plex server goes down and when i start the plexmediaserver service I get:

~$ sudo service plexmediaserver restart
Job for plexmediaserver.service failed because the control process exited with error code. See “systemctl status plexmediaserver.service” and “journalctl -xe” for details.

running “systemctl status plexmediaserver.service” gives me:

~ sudo systemctl status plexmediaserver.service ● plexmediaserver.service - Plex Media Server for Linux Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled) Active: inactive (dead) (Result: exit-code) since sön 2017-10-15 07:30:57 CEST; 46s ago Process: 13337 ExecStartPre=/bin/sh -c /usr/bin/test -d "{PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p “${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}”

okt 15 07:30:52 Bulbasaur systemd[1]: Failed to start Plex Media Server for Linux.
okt 15 07:30:52 Bulbasaur systemd[1]: plexmediaserver.service: Unit entered failed state.
okt 15 07:30:52 Bulbasaur systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
okt 15 07:30:57 Bulbasaur systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
okt 15 07:30:57 Bulbasaur systemd[1]: Stopped Plex Media Server for Linux.
okt 15 07:30:57 Bulbasaur systemd[1]: plexmediaserver.service: Start request repeated too quickly.
okt 15 07:30:57 Bulbasaur systemd[1]: Failed to start Plex Media Server for Linux.

I’ve tried reinstalling the server multiple times and the server seem to install good enough although it runs into an error when it starts it up.

It should be noted that I’ve recently moved my cache file to the dev/shm dir to use RAM for writing transcoded videos. but I suspect that this somehow crashed plex? because the folder that I added under dev/shm got deleted somehow and thus it could not locate the cache folder, this shouldn’t prevent the server from running though? I’ve also edited the xml to point back to the default Cache location.

this was the last thing the server was logging before faceplanting:
Oct 15, 2017 02:05:50.193 [0x7f539fffe700] DEBUG - HTTP requesting GET https://plex.tv/servers//access_tokens.xml?auth_token=xx$
Oct 15, 2017 02:05:50.193 [0x7f539fffe700] ERROR - Error issuing curl_easy_perform(handle): 6
Oct 15, 2017 02:05:50.193 [0x7f539fffe700] WARN - HTTP error requesting GET https://plex.tv/servers//access_tokens.xml?auth_tok$
Oct 15, 2017 02:05:50.193 [0x7f539fffe700] ERROR - Uncaught exception running threadpool task: boost::filesystem::create_directory: Permission denied: "/var/lib/plexme$
Oct 15, 2017 02:05:50.193 [0x7f53873fb700] DEBUG - Auth: Refreshing tokens inside the token-based authentication filter.
Oct 15, 2017 02:05:50.194 [0x7f53873fb700] DEBUG - HTTP requesting GET https://plex.tv/servers//access_tokens.xml?auth_token=xx$
Oct 15, 2017 02:05:50.194 [0x7f53873fb700] ERROR - Error issuing curl_easy_perform(handle): 6
Oct 15, 2017 02:05:50.194 [0x7f53873fb700] WARN - HTTP error requesting GET https://plex.tv/servers//access_tokens.xml?auth_tok$
Oct 15, 2017 02:05:50.194 [0x7f53873fb700] ERROR - Uncaught exception running threadpool task: boost::filesystem::create_directory: Permission denied: "/var/lib/plexme$
Oct 15, 2017 02:05:50.194 [0x7f53a87fd700] DEBUG - Auth: Refreshing tokens inside the token-based authentication filter.
Oct 15, 2017 02:05:50.194 [0x7f53a87fd700] DEBUG - HTTP requesting GET https://plex.tv/servers//access_tokens.xml?auth_token=xx$
Oct 15, 2017 02:05:50.255 [0x7f53c77fd700] WARN - Warning: ex: boost::filesystem::last_write_time: Permission denied: "/usr/lib/plexmediaserver/Resources/Plug-ins-9f65$
Oct 15, 2017 02:05:50.255 [0x7f53c77fd700] WARN - Warning: ex: boost::filesystem::last_write_time: Permission denied: "/var/lib/plexmediaserver/Library/Application Sup$
Oct 15, 2017 02:05:50.273 [0x7f53a87fd700] ERROR - Error issuing curl_easy_perform(handle): 77
Oct 15, 2017 02:05:50.273 [0x7f53a87fd700] WARN - HTTP error requesting GET https://plex.tv/servers//access_tokens.xml?auth_tok$
CAfile: /usr/lib/plexmediaserver/Resources/cacert.pem
CApath: none)
Oct 15, 2017 02:05:50.273 [0x7f53a87fd700] ERROR - Uncaught exception running threadpool task: boost::filesystem::create_directory: Permission denied: “/var/lib/plexme$
Oct 15, 2017 02:05:50.273 [0x7f53963ff700] DEBUG - Auth: Refreshing tokens inside the token-based authentication filter.
Oct 15, 2017 02:05:50.273 [0x7f53963ff700] DEBUG - HTTP requesting GET https://plex.tv/servers//access_tokens.xml?auth_token=xx$
Oct 15, 2017 02:05:50.348 [0x7f53963ff700] ERROR - Error issuing curl_easy_perform(handle): 77
Oct 15, 2017 02:05:50.348 [0x7f53963ff700] WARN - HTTP error requesting GET https://plex.tv/servers//access_tokens.xml?auth_tok$
CAfile: /usr/lib/plexmediaserver/Resources/cacert.pem
CApath: none)
$plexmediaserver/Library/Application Support/Plex Media Server/Cache”

(I’ve removed some of the key)
please help, I’ll go and cry myself to slep now…

here is the entire log file, i couldn’t be botherd to compress it cause i’m a stupid soab. there was no crash file, i simply took the log file that was editied at the latest time.

Your network went down and/or a hard drive faulted badly then apparently took PMS with it.

  1. Oct 15, 2017 01:53:46.177 [0x7f53c77fd700] WARN - Warning: ex: boost::filesystem::last_write_time: Permission denied: "/usr/lib/plexmediaserver/Resources/Plug-ins-9f65b88ae", couldn't check file: /usr/lib/plexmediaserver/Resources/Plug-ins-9f65b88ae - Directory /usr/lib/plexmediaserver suddenly could not be read . Possibly no longer visible.
  2. Oct 15, 2017 01:53:46.712 [0x7f53b7bfd700] WARN - Warning: ex: boost::filesystem::last_write_time: Permission denied: "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Sub-Zero.bundle/Contents/Code", couldn't check file: /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Sub-Zero.bundle/Contents/Code - Could not see your metadata directory
  3. Oct 15, 2017 02:05:50.193 [0x7f539fffe700] ERROR - Error issuing curl_easy_perform(handle): 6 - DNS lookup failure (Networking down)

weird, I’ve just installed a brand new samsung ssd, that clears the smart test alright. but I’ve had some other trouble recently so maybe. what should I do? is there a quick fix? the system is working alright, radarr and sabnzbd is running flawlessly.

what can i do to protect from this in the future?

I just want to have plex up and running again asap, what do I have to do to restore it? I don’t mind losing settings or whatnot although it would be preferable. ;_; i cri.

If you’re having storage problems, nothing is a quick fix. You must first find the root cause. Once you find that, YES it’s an easy fix although it may take time to recover from a full re-installation

Well, I found it was an issue with some ubuntu system file (I think) whenever i tried to install/uninstall anything it gave me an error code. and a few drivers made the screen start in low graphic mode that was frozen. now reinstalled everything back on the same disk and everything is running smoothly, although I have a few more details left. think it was something wrong with the _apt user or something? _apt was missing permissions all the time… strange.

I doubt it was a disk failure because it’s a brand new SSD, but I have a back up on everything that I’ve installed today so in case it is the drive I can rollback more easily.

I think the root cause was that I’ve recently changed hardware and all i did was som very rough copy over from the old disk. or it was something that didn’t agree with the mobo. bth I have no clue what the issue where and if it wasn’t the disk it’s far to technical for me to understand it.

ty

When you’re making backups / copying / cloning the OS, dump and restore at level 0 are the best way to do it.

man dump
and
man restore

You will probably have to add the package. Although the best tool for the job, distros don’t seem to include it by default

thank you, I’ll have a look at it.