New music not detected

server-linux

#12

@“patrick@derwael.be” said:
Which ones, where to look for them?

All of them. Just when you attached them to your initial posting above.


#13

Here they are


#14

Oh, I forgot to tell you:

com.plexapp.plugins.library.db-shm
com.plexapp.plugins.library.db-wal

these two files need to be moved out of the folder.
Place them beside your backed up com.plexapp.plugins.library.db.original

Afterwards the start should be successful.


#15

There is no such files over there
com.plexapp.plugins.library.db-shm
com.plexapp.plugins.library.db-wal

But I have these:
com.plexapp.dlna.db
com.plexapp.dlna.db-shm
com.plexapp.dlna.db-wal

Should I move them out of the way before trying to restart?


#16

Just to be crystal clear, the 3 files I have just mentioned reside in /var/lib/plexmediaserver/Library/Application Support/Plex Media/server/Plug-in Support/Databases


#17

@“patrick@derwael.be” said:
com.plexapp.dlna.db
com.plexapp.dlna.db-shm
com.plexapp.dlna.db-wal

No, they don’t matter.


#18

There are these errors in the logs, which indicate that the database file is still locked.

Jun 15, 2018 12:57:29.909 [0x7f4b83947840] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.13.0, threadsafe=1
Jun 15, 2018 12:57:29.914 [0x7f4b83947840] ERROR - SQLITE3:0x10, 8, statement aborts at 1: [PRAGMA journal_mode=WAL] attempt to write a readonly database
Jun 15, 2018 12:57:29.914 [0x7f4b83947840] ERROR - Database corruption: sqlite3_statement_backend::loadOne: attempt to write a readonly database
Jun 15, 2018 12:57:29.914 [0x7f4b83947840] ERROR - Error: Unable to set up server: sqlite3_statement_backend::loadOne: attempt to write a readonly database (N4soci10soci_errorE)

did you close any instances of sqlite3 or other database editors, which may have this database open?

May I see a full listing of the files in
/var/lib/plexmediaserver/Library/Application Support/Plex Media/server/Plug-in Support/Databases
?
ls -ail to show access permissions


#19

@OttoKerner said:

did you close any instances of sqlite3 or other database editors, which may have this database open?

Absolutely:
[patrick@plex Databases]# ps -aef | grep sql
root 22332 12986 0 14:55 pts/0 00:00:00 grep --color=auto sql

May I see a full listing of the files in
/var/lib/plexmediaserver/Library/Application Support/Plex Media/server/Plug-in Support/Databases
?
ls -ail to show access permissions

Here we go:
[patrick@plex Databases]# ls -ail
total 23549456
536871078 drwxr-xr-x 3 plex plex 4096 15 jun 14:52 .
170 drwxr-xr-x 7 plex plex 91 24 déc 2016 …
536871080 -rw-r–r-- 1 plex plex 69632 9 déc 2017 com.plexapp.dlna.db
536871082 -rw-r–r-- 1 plex plex 32768 9 déc 2017 com.plexapp.dlna.db-shm
536871081 -rw-r–r-- 1 plex plex 292552 9 déc 2017 com.plexapp.dlna.db-wal
540827503 -rw-r–r-- 1 plex plex 519112704 15 jun 11:13 com.plexapp.plugins.library.blobs.db
539318934 -rw-r–r-- 1 plex plex 464977920 3 jun 23:05 com.plexapp.plugins.library.blobs.db-2018-06-03
552744039 -rw-r–r-- 1 plex plex 483724288 6 jun 23:05 com.plexapp.plugins.library.blobs.db-2018-06-06
539100131 -rw-r–r-- 1 plex plex 503869440 9 jun 23:03 com.plexapp.plugins.library.blobs.db-2018-06-09
540068761 -rw-r–r-- 1 plex plex 513624064 12 jun 23:04 com.plexapp.plugins.library.blobs.db-2018-06-12
538580681 -rw-r–r-- 1 root root 3003328512 15 jun 12:06 com.plexapp.plugins.library.db
538646242 -rw-r–r-- 1 plex plex 882180096 19 jan 2017 com.plexapp.plugins.library.db-2017-01-15-tmp
538646243 -rw-r–r-- 1 plex plex 1024 15 jan 2017 com.plexapp.plugins.library.db-2017-01-15-tmp-journal
538107852 -rw-r–r-- 1 plex plex 991198208 28 jan 2017 com.plexapp.plugins.library.db-2017-01-27-tmp
538107853 -rw-r–r-- 1 plex plex 1024 27 jan 2017 com.plexapp.plugins.library.db-2017-01-27-tmp-journal
539877177 -rw-r–r-- 1 plex plex 843062272 3 fév 2017 com.plexapp.plugins.library.db-2017-01-30-tmp
539929243 -rw-r–r-- 1 plex plex 1024 30 jan 2017 com.plexapp.plugins.library.db-2017-01-30-tmp-journal
540387525 -rw-r–r-- 1 plex plex 1087966208 8 fév 2017 com.plexapp.plugins.library.db-2017-02-05-tmp
540388751 -rw-r–r-- 1 plex plex 1024 5 fév 2017 com.plexapp.plugins.library.db-2017-02-05-tmp-journal
539099658 -rw-r–r-- 1 plex plex 1033899008 18 fév 2017 com.plexapp.plugins.library.db-2017-02-17-tmp
539102670 -rw-r–r-- 1 plex plex 1024 17 fév 2017 com.plexapp.plugins.library.db-2017-02-17-tmp-journal
539442811 -rw-r–r-- 1 plex plex 966007808 22 fév 2017 com.plexapp.plugins.library.db-2017-02-20-tmp
539613869 -rw-r–r-- 1 plex plex 1024 20 fév 2017 com.plexapp.plugins.library.db-2017-02-20-tmp-journal
543063545 -rw-r–r-- 1 plex plex 911326208 12 mar 2017 com.plexapp.plugins.library.db-2017-03-07-tmp
543112913 -rw-r–r-- 1 plex plex 1024 7 mar 2017 com.plexapp.plugins.library.db-2017-03-07-tmp-journal
546882990 -rw-r–r-- 1 plex plex 2941981696 3 jun 23:05 com.plexapp.plugins.library.db-2018-06-03
539161116 -rw-r–r-- 1 plex plex 2981365760 6 jun 23:04 com.plexapp.plugins.library.db-2018-06-06
539603590 -rw-r–r-- 1 plex plex 2986904576 9 jun 23:03 com.plexapp.plugins.library.db-2018-06-09
540068756 -rw-r–r-- 1 plex plex 2999659520 12 jun 23:04 com.plexapp.plugins.library.db-2018-06-12
658947 drwxr-xr-x 2 plex plex 116 15 jun 14:52 repair
[patrick@plex Databases]# ls -ail repair
total 8083320
658947 drwxr-xr-x 2 plex plex 116 15 jun 14:52 .
536871078 drwxr-xr-x 3 plex plex 4096 15 jun 14:52 …
536871079 -rw-r–r-- 1 plex plex 3003015168 15 jun 11:13 com.plexapp.plugins.library.db
539575097 -rw-r–r-- 1 plex plex 3003328512 15 jun 12:46 com.plexapp.plugins.library.db_after_repair_attempt
538188985 -rw-r–r-- 1 plex plex 2270907824 15 jun 12:00 dump.sql
[patrick@plex Databases]#


#20

OK, this is a typical Linux issue.

540068761 -rw-r--r-- 1 plex plex 513624064 12 jun 23:04 com.plexapp.plugins.library.blobs.db-2018-06-12
538580681 -rw-r--r-- 1 root root 3003328512 15 jun 12:06 com.plexapp.plugins.library.db

Since Plex Server is running as the linux user plex, it now has no access permissions to the database file.
Because you performed the repair procedure logged in as user root, the restored database file now belongs to user root.
You need to change ownership of the database file back to plex, just like all other files in this folder are.

please see http://forums.plex.tv/discussion/comment/1581947/#Comment_1581947


#21

§!è^$%%µ$$$$##&é2 … typical issue indeed… I have double checked this, but missed the point… sh#####

Ok, PMS server restarted now, I’m logged in the web interface. So far, so good

What would be your recommendation: scan the libs and then upgrade, or upgrade first?


#22

Leave it be for 15 minutes. Then upgrade to 1.13.2
because this one contains a critical fix for tv shows poster art.

If you don’t have any tv shows, I guess you could stay on 1.13.0 for a while.
But then - you’ll have to upgrade at some time. Might as well do it now. :slight_smile:


#23

Ok, I will follow your recom and upgrade later tonight and - finally- scan the libs!
I will keep you posted on the outcome

Thanks a million for your support!! you have saved hundreds of hours of verification, tagging, sorting, renaming…
I have no idea about your location, but if you ever come to Belgium, drop me a mail, I definitely owe you a beer (I mean to start with) !


#24

Now back to the initial issue:
If you are using a ‘Premium Music’ library, you must always have your music in a folder structure
Music > Artist > Album > Tracks

A big folder of ‘uncategorized’/‘unsorted’ tracks with more than ~4 dozen files in it is not possible.
The Premium Music agent will fail and timeout while analysing this folder, as it tries all possible combinations of files to find an actual existing album which contains those songs …


#25

My music is organised as follows:

\mp3\0\Album Artist - Year - Album\Track - Title.mp3
\mp3\A\Album Artist - Year - Album\Track - Title.mp3

\mp3\Z\Album Artist - Year - Album\Track - Title.mp3

Every single track contains the following tags:

  • Album artist
  • Year
  • Album
  • Track
  • Title
  • Artist
  • Genre

As every track is properly tagged before being discovered by PMS, I don’t care too much about the agents
Actually, I use PMS essentially as a streaming engine

I know, the folder structure is not as per PMS recommendations, but considering the sheer volume, I have no plan to reorganise the whole stuff in this way, especially as all the albums have been properly discovered so far (I mean until the issue popped up)


#26

@“patrick@derwael.be” said:
\mp3\0\Album Artist - Year - Album\Track - Title.mp3
\mp3\A\Album Artist - Year - Album\Track - Title.mp3

\mp3\Z\Album Artist - Year - Album\Track - Title.mp3
I know, the folder structure is not as per PMS recommendations, but considering the sheer volume, I have no plan to reorganise the whole stuff in this way, especially as all the albums have been properly discovered so far (I mean until the issue popped up)

That should actually be OK, but then I recommend you to do 2 things:

  1. edit the music library, go to the ‘Advanced’ tab and tick the check box ‘Use embedded tags’

  2. Settings - Server - Agents - Albums - last.fm
    activate (if not ‘checked’ already) the line ‘Local Media Assets’ and drag it upwards, so it is the topmost line
    repeat the same under
    Settings - Server - Agents - Albums - Premium Music

This relies on your embedded meta tags being correct and complete.


#27

That should actually be OK, but then I recommend you to do 2 things:

  1. edit the music library, go to the ‘Advanced’ tab and tick the check box ‘Use embedded tags’

Already done that

  1. Settings - Server - Agents - Albums - last.fm
    activate (if not ‘checked’ already) the line ‘Local Media Assets’ and drag it upwards, so it is the topmost line
    repeat the same under
    Settings - Server - Agents - Albums - Premium Music

This relies on your embedded meta tags being correct and complete.

Already done that as well !!

BTW: I have just started a scan… let’s see


#28

And… it works :=)

New stuff appears as it should…

When finished, I will upgrade to 1.13.2 and see what happens


#29

@“patrick@derwael.be” said:
When finished, I will upgrade to 1.13.2 and see what happens

Make sure that it is really finished.
Updating music libraries can take a long time, even after the icon on the library name has stopped spinning.


#30

I guess the difficulty is to properly define “long” by integrating the #tracks, the average CPU load, the network throughput, the speed of the disks, the outside temperature and humidity and the age of the captain… right ?

Ok, sorry, couldn’t resist… I’ll upgrade tomorrow, after making sure the CPU usage is down to “not much”…


#31

Hi,

I have just upgraded to 1.13.2
After restarting PMS, it took something like 20-30 minutes before the web interface became responsive, but at the end of the day, it started up properly, and new music is (currently) being discovered properly

Again, thanks a million for your support, this was really appreciated (and I do mean it)