FAQ  •  Register  •  Login

Library updates of currently shared files after reinstalling

<<

filjander

Serviio newbie

Posts: 7

Joined: Mon Feb 03, 2014 9:53 am

Post Sun Feb 23, 2014 9:35 pm

Library updates of currently shared files after reinstalling

Hi all,
I have experienced a strange behaviour, I've installed 1.4 version on windows 8.1 and added to library a couple of local paths on external hd. Drive letters of those hd were fixed (say X: and Y:). Usually those hd are disconnected but, after adding those files in library, i have unchecked option "Search for updates of currently shared files" in console interface, so usually i see them in library just after reconnecting drives to pc.

But today i've found, after reconnecting hd, that all files are missing from library and application started to rescan library paths and readded all the files, but i've found some exceptions in application log:
2014-02-23 14:55:20,472 DEBUG [RepositoryDAOImpl] Marking Repository 1 as scanned with current timestamp
2014-02-23 14:55:20,480 WARN [LibraryAdditionsCheckerThread] An error occured while scanning for item to be added, will continue
org.serviio.db.dao.PersistenceException: Cannot mark Repository with id 1 as scanned
at org.serviio.library.dao.RepositoryDAOImpl.markRepositoryAsScanned(RepositoryDAOImpl.java:173)
at org.serviio.library.local.service.RepositoryService.markRepositoryAsScanned(RepositoryService.java:114)
at org.serviio.library.local.metadata.LibraryAdditionsCheckerThread.run(LibraryAdditionsCheckerThread.java:84)
Caused by: java.sql.SQLNonTransientConnectionException: Connection closed by unknown interrupt.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeLargeUpdate(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source)
at org.serviio.library.dao.RepositoryDAOImpl.markRepositoryAsScanned(RepositoryDAOImpl.java:171)
... 2 more
Caused by: java.sql.SQLException: Connection closed by unknown interrupt.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 13 more
Caused by: ERROR 08000: Connection closed by unknown interrupt.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.util.InterruptStatus.setInterrupted(Unknown Source)
at org.apache.derby.iapi.util.InterruptStatus.throwIf(Unknown Source)
at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.checkCancellationFlag(Unknown Source)
at org.apache.derby.impl.sql.execute.TableScanResultSet.getNextRowCore(Unknown Source)
at org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.getNextRowCore(Unknown Source)
at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown Source)
at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown Source)
at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown Source)
at org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(Unknown Source)
at org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
... 7 more


Searching this forum, i have found a suggested procedure of uninstalling and reinstalling the program, but after that, every time i disconnect hard drives, all entries in library are removed by the update process, despite the checkbox "Search for updates of currently shared files" is unchecked.
Here's a portion of log showing LibraryUpdatesCheckerThread removing files from disconnected path:
2014-02-23 17:26:45,819 DEBUG [RepositoryDAOImpl] Reading all Repositories
2014-02-23 17:26:45,820 DEBUG [LibraryUpdatesCheckerThread] Looking for removed playlist files in repository: Y:\Movies
2014-02-23 17:26:45,820 DEBUG [PlaylistDAOImpl] Reading Playlists for Repository (id = 1)
2014-02-23 17:26:45,820 DEBUG [LibraryUpdatesCheckerThread] Looking for removed/updated files in repository: Y:\Movies
2014-02-23 17:26:45,820 DEBUG [MediaItemDAOImpl] Reading MediaItems for Repository (id = 1)
2014-02-23 17:26:45,832 DEBUG [MediaItemDAOImpl] Getting file of media item 1885
2014-02-23 17:26:45,833 INFO [LibraryUpdatesCheckerThread] Removing 'Casino Royale' (...) from Library
2014-02-23 17:26:45,833 DEBUG [VideoDAOImpl] Reading a Video (id = 1885)
2014-02-23 17:26:45,833 DEBUG [VideoService] Removing video from database: Casino Royale
2014-02-23 17:26:45,833 DEBUG [PersonDAOImpl] Removing all Persons from media item 1885
2014-02-23 17:26:45,833 DEBUG [PersonDAOImpl] Retrieving list of persons for MediaItem 1885
2014-02-23 17:26:45,847 DEBUG [PersonDAOImpl] Found all Persons (18) for media item 1885
2014-02-23 17:26:45,868 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6406
2014-02-23 17:26:45,874 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6407
2014-02-23 17:26:45,874 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6408
2014-02-23 17:26:45,874 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6409
2014-02-23 17:26:45,875 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6410
2014-02-23 17:26:45,875 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6411
2014-02-23 17:26:45,875 DEBUG [PersonDAOImpl] Deleting a Person (id = 6411)
2014-02-23 17:26:45,894 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6412
2014-02-23 17:26:45,894 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6413
2014-02-23 17:26:45,894 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6414
2014-02-23 17:26:45,894 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6415
2014-02-23 17:26:45,895 DEBUG [PersonDAOImpl] Deleting a Person (id = 6415)
2014-02-23 17:26:45,895 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6416
2014-02-23 17:26:45,896 DEBUG [PersonDAOImpl] Deleting a Person (id = 6416)
2014-02-23 17:26:45,897 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6417
2014-02-23 17:26:45,897 DEBUG [PersonDAOImpl] Deleting a Person (id = 6417)
2014-02-23 17:26:45,898 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6418
2014-02-23 17:26:45,898 DEBUG [PersonDAOImpl] Deleting a Person (id = 6418)
2014-02-23 17:26:45,899 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6419
2014-02-23 17:26:45,899 DEBUG [PersonDAOImpl] Deleting a Person (id = 6419)
2014-02-23 17:26:45,900 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6420
2014-02-23 17:26:45,900 DEBUG [PersonDAOImpl] Deleting a Person (id = 6420)
2014-02-23 17:26:45,901 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6421
2014-02-23 17:26:45,902 DEBUG [PersonDAOImpl] Deleting a Person (id = 6421)
2014-02-23 17:26:45,903 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6422
2014-02-23 17:26:45,903 DEBUG [PersonDAOImpl] Deleting a Person (id = 6422)
2014-02-23 17:26:45,904 DEBUG [PersonDAOImpl] Retrieving number of roles for person 6423
2014-02-23 17:26:45,904 DEBUG [PersonDAOImpl] Deleting a Person (id = 6423)
2014-02-23 17:26:46,006 DEBUG [MetadataDescriptorDAOImpl] Deleting all MetadataDescriptors for MediaItem (id = 1885)
2014-02-23 17:26:46,040 DEBUG [VideoDAOImpl] Deleting a Video (id = 1885)
2014-02-23 17:26:46,050 DEBUG [FolderDAOImpl] Reading a Folder (id = 167)
2014-02-23 17:26:46,055 DEBUG [FolderDAOImpl] Getting number of media items in folder 167
2014-02-23 17:26:46,062 DEBUG [GenreDAOImpl] Getting number of media items for genre 9
2014-02-23 17:26:46,064 DEBUG [SearchIndexer] Removing documents with 'id' of '1885-MOVIES' from search index
2014-02-23 17:26:46,064 DEBUG [SearchIndexer] Removing documents with 'id' of '1885-FILES' from search index


Thanks for help.
<<

filjander

Serviio newbie

Posts: 7

Joined: Mon Feb 03, 2014 9:53 am

Post Sun Feb 23, 2014 11:02 pm

Re: Library updates of currently shared files after reinstal

Ok, i've done some progress, maybe found solution to the problem.
I have found that serviio services runs as SYSTEM user, but serviio console runs as local current user. For some strange reason, my current user wasn't unable to update contents inside library folder (which is located under Program Files) and commit library updates on db. After some digging, it resulted that current user (which by the way has administrator rights) was in the Administrators group but also in the Users group (other administrative users of the same local machine aren't part of that group). Seems that, for some still unknown reason, my local user was added to Users group after a recent Windows update. Removing that user from Users group resolved the writing issue:

2014-02-23 23:57:52,505 DEBUG [RepositoryDAOImpl] Marking Repository 5 as scanned with current timestamp
<<

filjander

Serviio newbie

Posts: 7

Joined: Mon Feb 03, 2014 9:53 am

Post Mon Feb 24, 2014 8:22 am

Re: Library updates of currently shared files after reinstal

I wasn't so lucky, commits to db seem fine now, but still every file gets removed from library after hd gets disconnected, apparently console ignores unchecked option of updating already shared files.
<<

will

DLNA master

Posts: 2138

Joined: Mon Aug 30, 2010 11:18 am

Location: UK

Post Mon Feb 24, 2014 9:32 am

Re: Library updates of currently shared files after reinstal

Search for updates of currently shared files is for controlling if existing files should be updated if a change occurs, what you want is the per shared folder option to scan for file additions and updates, see orange box on http://wiki.serviio.org/doku.php?id=ser ... _explained
Will

ServiiDroid (Android Console) Developer: Download | Home | Support
ServiiGo (Android 3G/4G/WiFi Playback App) Developer: Download | Home | Support
<<

filjander

Serviio newbie

Posts: 7

Joined: Mon Feb 03, 2014 9:53 am

Post Mon Feb 24, 2014 7:20 pm

Re: Library updates of currently shared files after reinstal

will wrote:Search for updates of currently shared files is for controlling if existing files should be updated if a change occurs, what you want is the per shared folder option to scan for file additions and updates, see orange box on http://wiki.serviio.org/doku.php?id=ser ... _explained


Now I understand that serviio never removed files from my library probably because of the commit error on the database, that prevented the persistence of the file removal, so when I reconnected the drives, the situation started from a non blank library.

But, now I need to apologize for my lazyness :oops: , just found some feature requests about better support of external hd in the appropriate forum section.
If I understand correctly, the problem is that there's no difference between unavaiable mount point and an empty one. I wonder if this situation can be managed by serviio using an hidden file in the shared folder root, something like ".serviio", in the same way some code repository do, like .svn or .git


Thank for the support.

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 56 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.