Plex plugin does not start

Status
Not open for further replies.

tslw

Dabbler
Joined
Jun 17, 2011
Messages
39
I had plex media server running on freenas 9.1 Now I have migrated to freenas 9.2. Freenas seems to work fine. I also updated the plugins. Most plugins update in a couple of minutes but plex takes more than an hour to update.

After the update of the plex plugin I cannot start the plex plugin any more. I do not get error message, after a few seconds the Off button animation stops and it remains off.

In the plex log file I found the following error messages:

Code:
Dec 23, 2013 20:07:55 [0x807407400] INFO - Plex Media Server v0.9.8.14.263-139ddbc - FreeBSD PC amd64
Dec 23, 2013 20:07:55 [0x807407400] DEBUG - Opening 10 database sessions to library, SQLite 3.8.0.2, threadsafe=1
Dec 23, 2013 20:07:55 [0x807407400] ERROR - SQLITE3:10, 8, statement aborts at 2: [PRAGMA journal_mode=WAL]
Dec 23, 2013 20:07:55 [0x807407400] ERROR - Database corruption: sqlite3_statement_backend::loadOne: attempt to write a readonly database
 
Dec 23, 2013 20:07:55 [0x807407400] ERROR - Error: Unable to set up server: sqlite3_statement_backend::loadOne: attempt to write a readonly database


The only thing I coudl find is that the wrong user is used to access the database.
The script I found is using user plex which seems correct.

Any ideas how to solve this?
 

norskman

Contributor
Joined
Sep 28, 2012
Messages
149
I had plex media server running on freenas 9.1 Now I have migrated to freenas 9.2. Freenas seems to work fine. I also updated the plugins. Most plugins update in a couple of minutes but plex takes more than an hour to update.

After the update of the plex plugin I cannot start the plex plugin any more. I do not get error message, after a few seconds the Off button animation stops and it remains off.

In the plex log file I found the following error messages:

Dec 23, 2013 20:07:55 [0x807407400] INFO - Plex Media Server v0.9.8.14.263-139ddbc - FreeBSD PC amd64
Dec 23, 2013 20:07:55 [0x807407400] DEBUG - Opening 10 database sessions to library, SQLite 3.8.0.2, threadsafe=1
Dec 23, 2013 20:07:55 [0x807407400] ERROR - SQLITE3:10, 8, statement aborts at 2: [PRAGMA journal_mode=WAL]
Dec 23, 2013 20:07:55 [0x807407400] ERROR - Database corruption: sqlite3_statement_backend::loadOne: attempt to write a readonly database

Dec 23, 2013 20:07:55 [0x807407400] ERROR - Error: Unable to set up server: sqlite3_statement_backend::loadOne: attempt to write a readonly database

The only thing I coudl find is that the wrong user is used to access the database.
The script I found is using user plex which seems correct.

Any ideas how to solve this?
Out of interest what is the name of this log file and which directory is it in? I would like to check mine as well. I am seeing the same error. I want to verify it is one and the same.
 

tslw

Dabbler
Joined
Jun 17, 2011
Messages
39
It is the from the Plex Media Server Log file in /usr/pbi/plexmediaserver-amd64/plexdata/Plex Media Server/Logs in the plexmediaserver jail.

During plugin upgrade there was another error message in /var/log/messages:

Code:
Dec 22 19:17:55 plex_1 su: setpriority 'root' (root): Permission denied
 

tslw

Dabbler
Joined
Jun 17, 2011
Messages
39
I found a solution. The database file itself was set read-only:

-r--r--r-- 1 plex plex 139264 Dec 23 17:39 com.plexapp.plugins.library.db

After
Code:
chmod u+w,g+w com.plexapp.plugins.library.db
everything is working again.

This file is located in: /usr/pbi/plexmediaserver-amd64/plexdata/Plex Media Server/Plug-in Support/Databases

Edit: removed a typo from the command.
 

norskman

Contributor
Joined
Sep 28, 2012
Messages
149
I used your command - but it still errored with the same problem.

I used a catchall chmod 777 * on this directory.

This fixed it.

Many thanks for all who helped
 

DiWa

Cadet
Joined
Oct 28, 2013
Messages
9
Hi,

I fall in norskman's situation, but bouncing the jail helped and the "restricted" chmod is enough.

Side note, in my jail, the file is located in: /usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Resources
I migrated from Freenas 911 to 92 and then from plex 0.9.8 to 0.9.14

Thanks for the fix!
 
Status
Not open for further replies.
Top