Jump to content


Photo

Can't create sync jobs in 4.2.0

sync

  • Please log in to reply
17 replies to this topic

#1 Anon28109 OFFLINE  

Anon28109

    Advanced Member

  • Members
  • 118 posts
  • Local time: 09:05 PM

Posted 27 July 2019 - 11:03 AM

I was getting strange sync-related behavior post-upgrade. I figured the best way to fix it was to delete and re-create all my sync jobs but it looks like I can't create any sync jobs. I tried, through the folder plugin, removing then re-adding the sync directory but it made no difference. I get the following error each time:

 

Is there a db file I can delete or reset to fix it?

2019-07-27 10:48:07.231 Info HttpServer: HTTP POST https://example.com:8920/emby/Sync/Jobs. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0
2019-07-27 10:48:07.235 Error HttpServer: Error processing request
	*** Error Report ***
	Version: 4.2.0.40
	Command line: /Applications/EmbyServer.app/Contents/MacOS/EmbyServer.dll
	Operating system: Unix 17.7.0.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Runtime: file:///Applications/EmbyServer.app/Contents/MacOS/System.Private.CoreLib.dll
	Processor count: 2
	Program data path: /Users/default/.config/emby-server
	Application directory: /Applications/EmbyServer.app/Contents/MacOS
	SQLitePCL.pretty.SQLiteException: Constraint: NOT NULL constraint failed: SyncJobs2.ItemIds
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
	   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
	   at SQLitePCL.pretty.StatementImpl.MoveNext()
	   at Emby.Server.Sync.SyncRepository.Save(SyncJob job)
	   at Emby.Server.Sync.SyncManager.CreateJob(SyncJobRequest request, CancellationToken cancellationToken)
	   at Emby.Server.Sync.Api.SyncService.Post(CreateSyncJob request)
	   at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 host, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: SQLitePCL.pretty
	TargetSite: Void CheckOk(SQLitePCL.sqlite3, Int32)



#2 Anon28109 OFFLINE  

Anon28109

    Advanced Member

  • Members
  • 118 posts
  • Local time: 09:05 PM

Posted 27 July 2019 - 01:22 PM

Eh, I think this is part of a bigger problem. I did a clean install, restored from configuration backup, that threw an FK constraint error on library scan and none of my libraries would scan. I tried deleting my libraries and re-adding but adding caused a constraint error and failed so I had no libraries.

 

Then I tried a clean install with no restore, added a single library as part of the setup process and it immediately failed with the following FK constraint error. 

 

I'll just go back to the last version.

2019-07-27 13:04:23.907 Info App: Validating media library
2019-07-27 13:04:24.034 Error TaskManager: Error
	*** Error Report ***
	Version: 4.2.0.40
	Command line: /Applications/EmbyServer.app/Contents/MacOS/EmbyServer.dll -psn_0_245820
	Operating system: Unix 17.7.0.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Runtime: file:///Applications/EmbyServer.app/Contents/MacOS/System.Private.CoreLib.dll
	Processor count: 2
	Program data path: /Users/default/.config/emby-server
	Application directory: /Applications/EmbyServer.app/Contents/MacOS
	SQLitePCL.pretty.SQLiteException: Constraint: FOREIGN KEY constraint failed
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
	   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
	   at SQLitePCL.pretty.StatementImpl.MoveNext()
	   at Emby.Server.Implementations.Data.SqliteItemRepository.UpdateAncestors(Int64 itemId, List`1 ancestorIds, IDatabaseConnection db, IStatement deleteAncestorsStatement)
	   at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTranscation(IDatabaseConnection db, List`1 tuples)
	   at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Library.LibraryManager.CreateItems(List`1 items, BaseItem parent, CancellationToken cancellationToken)
	   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
	   at MediaBrowser.Controller.Entities.UserRootFolder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
	   at Emby.Server.Implementations.Library.LibraryManager.ValidateTopLibraryFolders(CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Library.LibraryManager.PerformLibraryValidation(IProgress`1 progress, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Library.LibraryManager.ValidateMediaLibraryInternal(IProgress`1 progress, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
	Source: SQLitePCL.pretty
	TargetSite: Void CheckOk(SQLitePCL.sqlite3, Int32)
	
2019-07-27 13:04:24.035 Info TaskManager: Scan media library Failed after 0 minute(s) and 0 seconds


#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 135740 posts
  • Local time: 09:05 PM

Posted 27 July 2019 - 02:11 PM

Can you try shutting down the server and installing from the website again, on top of your existing version? Please see if that makes a difference. Thanks.



#4 Anon28109 OFFLINE  

Anon28109

    Advanced Member

  • Members
  • 118 posts
  • Local time: 09:05 PM

Posted 27 July 2019 - 02:26 PM

Can you try shutting down the server and installing from the website again, on top of your existing version? Please see if that makes a difference. Thanks.

 

I downloaded it again this morning about 4 hours ago prior to the test where I restored from configuration backup. Have you uploaded a new version since?


Edited by Anon28109, 27 July 2019 - 02:27 PM.


#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 135740 posts
  • Local time: 09:05 PM

Posted 27 July 2019 - 02:26 PM

Yes I have.



#6 Anon28109 OFFLINE  

Anon28109

    Advanced Member

  • Members
  • 118 posts
  • Local time: 09:05 PM

Posted 28 July 2019 - 11:21 AM

Same error as before.  

Application directory: /Applications/EmbyServer.app/Contents/MacOS
SQLitePCL.pretty.SQLiteException: Constraint: NOT NULL constraint failed: SyncJobs2.ItemIds
SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
    at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
    at SQLitePCL.pretty.StatementImpl.MoveNext()
    at Emby.Server.Sync.SyncRepository.Save(SyncJob job)
    at Emby.Server.Sync.SyncJobProcessor.UpdateJobStatus(SyncJob job, List`1 jobItems)
    at Emby.Server.Sync.SyncJobProcessor.SyncJobItems(SyncJobItem[] items, Boolean enableConversion, IProgress`1 progress, CancellationToken cancellationToken)
    at Emby.Server.Sync.SyncJobProcessor.SyncJobItems(String targetId, Boolean enableConversion, IProgress`1 progress, CancellationToken cancellationToken)
    at Emby.Server.Sync.SyncManager.GetReadySyncItemsInternal(String targetId, CancellationToken cancellationToken)
    at Emby.Server.Sync.MediaSync.GetNewMedia(IServerSyncProvider provider, SyncTarget target, IProgress`1 progress, CancellationToken cancellationToken)
    at Emby.Server.Sync.MediaSync.Sync(IServerSyncProvider provider, SyncTarget target, IProgress`1 progress, CancellationToken cancellationToken)
    at Emby.Server.Sync.MultiProviderSync.Sync(IServerSyncProvider[] providers, IProgress`1 progress, CancellationToken cancellationToken)
    at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
Source: SQLitePCL.pretty
TargetSite: Void CheckOk(SQLitePCL.sqlite3, Int32)



#7 Anon28109 OFFLINE  

Anon28109

    Advanced Member

  • Members
  • 118 posts
  • Local time: 09:05 PM

Posted 29 July 2019 - 11:22 AM

Hmm. Since 4.1.1.0 (maybe earlier) I've been getting this Channel error. I just uninstalled a bunch of inessential plugins and now no more error. You think this might be related to the above SyncJobs2 error in 4.2?

 

If you say there's a better-than-50% chance fixing this fixed 4.2 for me I'll try the upgrade again, but restoring 4.1 from system backups is a pain so if not I'll stick with 4.1 (which is a fine piece of software =)

Application directory: /Applications/EmbyServer.app/Contents/MacOS
SQLitePCL.pretty.SQLiteException: Constraint: FOREIGN KEY constraint failed
SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
    at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
    at SQLitePCL.pretty.StatementImpl.MoveNext()
    at Emby.Server.Implementations.Data.SqliteItemRepository.UpdateAncestors(Int64 itemId, List`1 ancestorIds, IDatabaseConnection db, IStatement deleteAncestorsStatement)
    at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTranscation(IDatabaseConnection db, List`1 tuples)
    at SQLitePCL.pretty.DatabaseConnection.<>c__DisplayClass20_0.<RunInTransaction>b__0(IDatabaseConnection db)
    at SQLitePCL.pretty.DatabaseConnection.RunInTransaction[T](IDatabaseConnection This, Func`2 f, TransactionMode mode)
    at SQLitePCL.pretty.DatabaseConnection.RunInTransaction(IDatabaseConnection This, Action`1 action, TransactionMode mode)
    at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, CancellationToken cancellationToken)
    at Emby.Server.Implementations.Library.LibraryManager.CreateItems(List`1 items, BaseItem parent, CancellationToken cancellationToken)
    at Emby.Server.Implementations.Library.LibraryManager.CreateItem(BaseItem item, BaseItem parent)
    at Emby.Server.Implementations.Channels.ChannelManager.GetChannel(IChannel channelInfo, CancellationToken cancellationToken)
    at Emby.Server.Implementations.Channels.ChannelManager.GetChannelEntity(IChannel channel, CancellationToken cancellationToken)
Source: SQLitePCL.pretty
TargetSite: Void CheckOk(SQLitePCL.sqlite3, Int32)


#8 atomicmoon OFFLINE  

atomicmoon

    Advanced Member

  • Members
  • 119 posts
  • Local time: 09:05 PM

Posted 29 July 2019 - 05:50 PM

Came here to create same topic, I am unable to convert any media since the 4.2 update. I've been converting a lot of my library lately so I know it was working prior to the update.

I can attach logs if this will help narrow down finding the issue, but for the mean time I just wanted to chime in that my sync jobs are also failing.



#9 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 135740 posts
  • Local time: 09:05 PM

Posted 31 July 2019 - 12:55 AM

What did you try to sync?



#10 atomicmoon OFFLINE  

atomicmoon

    Advanced Member

  • Members
  • 119 posts
  • Local time: 09:05 PM

Posted 31 July 2019 - 01:07 PM

I'm trying to convert my seasons of "Frasier" to the TV friendly option. Last week I could get a season converted and replace original copies in about 30 minutes. Since the update to 4.2 they just fail. Not a huge issue, just wanting to help if I can. I'm mainly converting because my work network is such trash that they need to be optimized for direct streaming otherwise they buffer too often.


  • Luke likes this

#11 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 135740 posts
  • Local time: 09:05 PM

Posted 31 July 2019 - 01:08 PM

I'm trying to convert my seasons of "Frasier" to the TV friendly option. Last week I could get a season converted and replace original copies in about 30 minutes. Since the update to 4.2 they just fail. Not a huge issue, just wanting to help if I can. I'm mainly converting because my work network is such trash that they need to be optimized for direct streaming otherwise they buffer too often.


Please see how to report a problem:
https://emby.media/c...view=getnewpost
Thanks.

#12 Anon28109 OFFLINE  

Anon28109

    Advanced Member

  • Members
  • 118 posts
  • Local time: 09:05 PM

Posted 06 August 2019 - 07:59 PM

Just to follow up. I did an absolutely clean install from today's release version and everything works except Sync. Convert is fine but creating a Sync job fails throwing the same error every time:

2019-08-06 17:49:25.910 Error HttpServer: Error processing request
*** Error Report ***
Version: 4.2.0.40
Command line: /Applications/EmbyServer.app/Contents/MacOS/EmbyServer.dll
Operating system: Unix 17.7.0.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///Applications/EmbyServer.app/Contents/MacOS/System.Private.CoreLib.dll
Processor count: 2
Program data path: /Users/default/.config/emby-server
Application directory: /Applications/EmbyServer.app/Contents/MacOS
SQLitePCL.pretty.SQLiteException: Constraint: NOT NULL constraint failed: SyncJobs2.ItemIds
SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
    at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
    at SQLitePCL.pretty.StatementImpl.MoveNext()
    at Emby.Server.Sync.SyncRepository.Save(SyncJob job)
    at Emby.Server.Sync.SyncManager.CreateJob(SyncJobRequest request, CancellationToken cancellationToken)
    at Emby.Server.Sync.Api.SyncService.Post(CreateSyncJob request)
    at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
    at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
    at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 host, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
Source: SQLitePCL.pretty
TargetSite: Void CheckOk(SQLitePCL.sqlite3, Int32)

Deleted and reinstalled the Folder Sync plugin, no difference. I'm surprised there aren't more reports. 

 

PS The clean install got my .config dir down from > 4GB to less 300MB which was nice.

 

 

 



#13 Anon28109 OFFLINE  

Anon28109

    Advanced Member

  • Members
  • 118 posts
  • Local time: 09:05 PM

Posted 07 August 2019 - 11:40 AM

UPDATE:

I've narrowed it down.

 

I found the hidden file .data.json.swp in my root sync folder, deleted it and restarted the server.

Now I can create Sync jobs for apparently everything except Latest Movies which gives the constraint error above.

 

Note: It's possible the hidden file is unrelated and it just so happened that in all my earlier tests I started with Latest Movies and gave up when it failed.



#14 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 135740 posts
  • Local time: 09:05 PM

Posted 08 August 2019 - 01:17 AM

Ok, I see why this is happening. It will be resolved in Emby Server 4.2.1, but unfortunately will require deleting library.db again. Thanks.


  • Anon28109 likes this

#15 Anon28109 OFFLINE  

Anon28109

    Advanced Member

  • Members
  • 118 posts
  • Local time: 09:05 PM

Posted 08 August 2019 - 10:34 AM

Ok, I see why this is happening. It will be resolved in Emby Server 4.2.1, but unfortunately will require deleting library.db again. Thanks.

 

Functionally what will I "lose" by deleting it? I searched but couldn't find a definitive answer.



#16 Anon28109 OFFLINE  

Anon28109

    Advanced Member

  • Members
  • 118 posts
  • Local time: 09:05 PM

Posted 08 August 2019 - 11:22 AM

Im re-thinking my whole strategy of using sync to provide shared, CPU-friendly libraries. Maybe better to just convert my entire library. Quality wouldn't suffer because bandwidth's not an issue.

 

The only downside I can think of is the following use-case, which would be common:

  1. Media added
  2. Emby scans it into library
  3. Shared user (with transcoding disabled) logs in
  4. Sees new unconverted media
  5. Tries to play, fails
  6. User assumes new media is unplayable and doesn't try again once converted

Would it be possible (and useful to other Emby customers) to overlay an "unplayable" graphic on unplayable media? Emby's aware of client capabilities and user restrictions. If so, the media's icon would go from unplayable to playable once converted signaling to the user to try again.



#17 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 135740 posts
  • Local time: 09:05 PM

Posted 08 August 2019 - 11:28 AM

Yes we need to improve the information provided to the user when playback fails. Thanks.

#18 Anon28109 OFFLINE  

Anon28109

    Advanced Member

  • Members
  • 118 posts
  • Local time: 09:05 PM

Posted 08 August 2019 - 12:48 PM

You're welcome.

 

To be clear: I'm suggesting an overlay on top of the media's graphic. That way the information goes:

  • Screen -> Eye

vs an error message on play, which goes:

  •  Screen -> Eye -> Click -> Wait -> Screen -> Eye

Edited by Anon28109, 08 August 2019 - 12:49 PM.






Also tagged with one or more of these keywords: sync

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users