Plexmediaserver.service fails to start after server reboot

Server Version#: 1.40.1.8227-c0dd5a73e
Server OS#: Ubuntu 23.04
plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2024-04-17 12:44:38 UTC; 1s ago
Process: 1965 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT>
Process: 1967 ExecStart=/bin/sh -c export PLEX_MEDIA_SERVER_INFO_VENDOR=”$(grep ^NAME= /etc/os>
Main PID: 1967 (code=exited, status=255/EXCEPTION)
CPU: 321ms
andy@vault:/$ sudo service plexmediaserver status
× plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2024-04-17 12:44:43 UTC; 12s ago
Duration: 210ms
Process: 1965 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT>
Process: 1967 ExecStart=/bin/sh -c export PLEX_MEDIA_SERVER_INFO_VENDOR=”$(grep ^NAME= /etc/os>
Main PID: 1967 (code=exited, status=255/EXCEPTION)
CPU: 321ms

Apr 17 12:44:43 vault systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter i>
Apr 17 12:44:43 vault systemd[1]: Stopped plexmediaserver.service - Plex Media Server.
Apr 17 12:44:43 vault systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Apr 17 12:44:43 vault systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Apr 17 12:44:43 vault systemd[1]: Failed to start plexmediaserver.service - Plex Media Server.

I have made no changes since the last reboot except to add video.

Not enough info there. What’s in the output from ‘sudo journalctl -xe -u plexmediaserver’ ?

andy@vault:/$ sudo journalctl -xe -u plexmediaserver
░░ The job identifier is 845 and the job result is done.
Apr 17 13:38:15 vault systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Apr 17 13:38:15 vault systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ The unit plexmediaserver.service has entered the ‘failed’ state with result ‘exit-code’.
Apr 17 13:38:15 vault systemd[1]: Failed to start plexmediaserver.service - Plex Media Server.
░░ Subject: A start job for unit plexmediaserver.service has failed
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ A start job for unit plexmediaserver.service has finished with a failure.
░░
░░ The job identifier is 845 and the job result is failed.
Apr 17 14:39:31 vault systemd[1]: Starting plexmediaserver.service - Plex Media Server…
░░ Subject: A start job for unit plexmediaserver.service has begun execution
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ A start job for unit plexmediaserver.service has begun execution.
░░
░░ The job identifier is 5174.
Apr 17 14:39:31 vault systemd[1]: Started plexmediaserver.service - Plex Media Server.
░░ Subject: A start job for unit plexmediaserver.service has finished successfully
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ A start job for unit plexmediaserver.service has finished successfully.
░░
░░ The job identifier is 5174.
Apr 17 14:39:59 vault [38429]: Critical: libusb_init failed
Apr 17 14:39:59 vault Plex Media Server[38429]: Critical: libusb_init failed
lines 138-171/171 (END)
░░ The job identifier is 845 and the job result is done.
Apr 17 13:38:15 vault systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Apr 17 13:38:15 vault systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ The unit plexmediaserver.service has entered the ‘failed’ state with result ‘exit-code’.
Apr 17 13:38:15 vault systemd[1]: Failed to start plexmediaserver.service - Plex Media Server.
░░ Subject: A start job for unit plexmediaserver.service has failed
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ A start job for unit plexmediaserver.service has finished with a failure.
░░
░░ The job identifier is 845 and the job result is failed.
Apr 17 14:39:31 vault systemd[1]: Starting plexmediaserver.service - Plex Media Server…
░░ Subject: A start job for unit plexmediaserver.service has begun execution
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ A start job for unit plexmediaserver.service has begun execution.
░░
░░ The job identifier is 5174.
Apr 17 14:39:31 vault systemd[1]: Started plexmediaserver.service - Plex Media Server.
░░ Subject: A start job for unit plexmediaserver.service has finished successfully
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ A start job for unit plexmediaserver.service has finished successfully.
░░
░░ The job identifier is 5174.
Apr 17 14:39:59 vault [38429]: Critical: libusb_init failed
Apr 17 14:39:59 vault Plex Media Server[38429]: Critical: libusb_init failed

From a quick glance, nothing is standing out to me. However, the result ‘exit-code’ is rather interesting.

So, assuming you’re running this as user plex, group plex, what does the following return?

ps -fu plex

Can you manually try starting the Plex Media Server process as your plex user, paying close attention to the return code?

Please make a tar.gz of the Logs directory under ‘Plex Media Server’ and attach it.

If you have turned DEBUG logging OFF, let me know and I’ll show you how to enable it again so we can figure out how to resolve this.

I think it has sorted itself over night. But would like to know what caused this. i’ve got the logs but don’t think debug is turned on.
logs.tar.gz (1.1 MB)
i tried everything i could think of to get it working yesterday and this morning hey presto its functioning.

@wattsneeded

No idea what weirdness happened here.

Look at the file size lengths. ( 0 bytes ??) As if something changed permissions then later corrected them

Yes no idea what happened I certainly didn’t change any permissions (as I would probably have to research how to do that!)
At least it’s working again now.
Thanks @ChuckPa for looking into it for me

Please do the following:

  1. With Plex stopped,
  2. Delete everything in the “Logs” directory
  3. sudo chown -R plex:plex /var/lib/plexmediaserver
  4. Start Plex
  5. Let it run for as long as it can
  6. Make a tar.gz of the Logs directory again after failure
  7. Attach here

ChunkPa,
Thats what i mean. Update was okay…….reboot and i have the same error.

„Start request repeated too quickly“

May I have the tar.gz please ?

Hi ChuckPA,
i have reinstalled the Plex server and manual added all the Libarys again. thank good the played movies and tv shows are still there just the server hast to update all its data again and sucks it into the database…what a mess …but everything runs so far.

thanks for your help anyway

Hi @ChuckPa

This has happened again after a powerloss and server restart.
Do you want the logs again? how do I enable debug mode to get you more info?

Edit Preferences.xml.
On the last line, before the closing />
Add logDebug="1"

It will look like this:

SomeOtherPref="Value"  logDebug="1" />

Save the file
Start PMS

Hi @ChuckPa

The service still won’t start but i’ve changed the debug setting and tried to restart. I’ve attached the logs.
logs.tar.gz (321 Bytes)

This isn’t good. Did something / someone claim ownership of the Plex shared folder ?

From your screenshot and what I have here, it looks like it.

It fails to start because it cannot write to its files.

Did you recently place media/other files in the Plex shared folder ?

How this works:

  • Don’t put media in the Plex shared folder when you’re using DSM 6.

  • Equally don’t put media in the PlexMediaServer shared folder when you’re using DSM 7. You CAN put media in the unused Plex shared folder AFTER upgrading to DSM 7.

DSM 6

  1. The Plex shared folder and all contents are owned by username Plex
  2. The assigned group is users

DSM 7

  1. The Plex shared folder is no longer used
  2. The PlexMediaServer shared folder now holds all the metadata and server info
  3. The PlexMediaServer shared folder is owned by System Internal User PlexMediaServer
  4. The assigned group is PlexMediaServer

(Synology completely changed how the users & system services are separated with DSM 7)

That is the only change i’ve made recently as you asked me to do. Otherwise no change has been made. The issue isn’t a can’t write to but the service start request failed with “exit-code”. saying the start request was repeated too quickly.

Apr 17 13:38:15 vault systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Apr 17 13:38:15 vault systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.

Also i’m not using a Synology, my server OS is Ubuntu and completely separate to my media storage which is held on a QNAP.

sudo service plexmediaserver status

× plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Fri 2024-05-10 07:39:39 UTC; 13s ago
Duration: 157ms
Process: 5949 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT>
Process: 5951 ExecStart=/bin/sh -c export PLEX_MEDIA_SERVER_INFO_VENDOR=”$(grep ^NAME= /etc/os>
Main PID: 5951 (code=exited, status=255/EXCEPTION)
CPU: 269ms

May 10 07:39:39 vault systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter i>
May 10 07:39:39 vault systemd[1]: Stopped plexmediaserver.service - Plex Media Server.
May 10 07:39:39 vault systemd[1]: plexmediaserver.service: Start request repeated too quickly.
May 10 07:39:39 vault systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
May 10 07:39:39 vault systemd[1]: Failed to start plexmediaserver.service - Plex Media Server.

Please make me a tar.gz of the Logs directory (under Plex Media Server and attach it.