Moved Library from centos 6 to centos 7 plex won't start

I did a clean install of centos 7 and moved over my Library folder from a previous install under centos 6. At first i was just seeing a new instance of plex and realized that the old PlexMediaServer conifg file no longer works. I’ve created an override.conf with the changes to my paths for PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR and PLEX_MEDIA_SERVER_TMPDIR. I did the systemctl daemon-reload but when i try to start the service it fails, without any good information as to why. Log files are empty. Any ideas?

Here is the status:
● plexmediaserver.service - Plex Media Server for Linux
Loaded: loaded (/usr/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/plexmediaserver.service.d
└─override.conf
Active: activating (auto-restart) (Result: exit-code) since Sat 2018-07-28 02:42:50 CDT; 1s ago
Process: 12107 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver “/usr/lib/plexmediaserver/Plex Media Server” (code=exited, status=255)
Process: 12102 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}” || /bin/mkdir -p “${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}” (code=exited, status=0/SUCCESS)
Main PID: 12107 (code=exited, status=255)

Jul 28 02:42:50 plex.localdomain systemd[1]: Unit plexmediaserver.service en…
Jul 28 02:42:50 plex.localdomain systemd[1]: plexmediaserver.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

Please post your systemd drop-in override.conf, the output of journalctl -u plexmediaserver and dmesg. Also the file permissions of your Plex meta files are of interest of your new location. Please post the output of ls -ahl $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR. All files in this dir usually have to be owned by plex:plex.

I’ve attached the info you wanted to see. I ran a chown plex:plex -R on the Library folder becuase the id was 498 on centos 6 and 998 on centos 7 the only thing i didn’t copy was the Cache folder

files.tar (140 KB)

OK. There is nothing sticking out in these files. However, if no logs are written to your PMS directory, plex is most likely still not allowed to access these directories. Please check the whole directory chain. The best method would be to start a shell as user plex and to try to navigate to the PMS dir and to create files there, e.g. with sudo -u plex /bin/bash.

I was able to create folders and files. Any other ideas?

What does sudo journalctl -xe | grep -i plex report?

– Subject: Unit plexmediaserver.service has begun start-up
– Unit plexmediaserver.service has begun starting up.
Jul 28 11:43:25 plex.localdomain systemd[1]: Started Plex Media Server for Linux.
– Subject: Unit plexmediaserver.service has finished start-up
– Unit plexmediaserver.service has finished starting up.
Jul 28 11:43:25 plex.localdomain systemd[1]: plexmediaserver.service: main process exited, code=exited, status=255/n/a
Jul 28 11:43:25 plex.localdomain systemd[1]: Unit plexmediaserver.service entered failed state.
Jul 28 11:43:25 plex.localdomain systemd[1]: plexmediaserver.service failed.
Jul 28 11:43:30 plex.localdomain systemd[1]: plexmediaserver.service holdoff time over, scheduling restart.
Jul 28 11:43:30 plex.localdomain systemd[1]: start request repeated too quickly for plexmediaserver.service
Jul 28 11:43:30 plex.localdomain systemd[1]: Failed to start Plex Media Server for Linux.
– Subject: Unit plexmediaserver.service has failed
– Unit plexmediaserver.service has failed.
Jul 28 11:43:30 plex.localdomain systemd[1]: Unit plexmediaserver.service entered failed state.
Jul 28 11:43:30 plex.localdomain systemd[1]: plexmediaserver.service failed.

I’m getting something in the Logs now. It appears something is wrong with the database, is there a tool to repair it?

Jul 28, 2018 11:43:25.890 [0x7faec8746840] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.13.0, threadsafe=1
Jul 28, 2018 11:43:25.892 [0x7faec8746840] INFO - SQLITE3:0x10, 283, recovered 595 frames from WAL file /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db-wal
Jul 28, 2018 11:43:25.892 [0x7faec8746840] ERROR - SQLITE3:0x10, 11, database corruption at line 60663 of [fc49f556e4]
Jul 28, 2018 11:43:25.892 [0x7faec8746840] ERROR - SQLITE3:0x10, 11, database disk image is malformed
Jul 28, 2018 11:43:25.893 [0x7faec8746840] ERROR - Database corruption: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000
Jul 28, 2018 11:43:25.893 [0x7faec8746840] ERROR - Error: Unable to set up server: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000 (N4soci10soci_errorE)

https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

what are the -shm and -wal files? moving these out of the way and i’m up and running

https://www.sqlite.org/tempfiles.html

Thanks a million for you help! Everything seems to be working perfect as it was before the OS reload.

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