Jump to content

Docker - Unable to Upgrade Past 3.4.1.0


sampsonight
Go to solution Solved by sampsonight,

Recommended Posts

sampsonight

I am currently running Emby in a docker container on version: 3.4.1.0. Using the official builds at: https://hub.docker.com/r/emby/embyserver/

 

I attempted to update the image to latest but when emby attempts to starts it fails with the below exception. Full log attached:

   at EmbyServer.Program.RunApplication(ServerApplicationPaths appPaths, ILogManager logManager, IEnvironmentInfo environmentInfo, StartupOptions options)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.WaitAll(Task[] tasks)
   at EmbyServer.Program.Main(String[] args)
   at EmbyServer.Program.<Main>(String[] args)
---> (Inner Exception #0) Constraint: UNIQUE constraint failed: UserDatas.key, UserDatas.userId
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 SQLitePCL.pretty.DatabaseConnection.ExecuteAll(IDatabaseConnection This, String sql)
   at Emby.Server.Implementations.Data.SqliteUserDataRepository.<>c__DisplayClass4_0.<Initialize>b__0(IDatabaseConnection db)

I Tried to go to the last 3.4 version: 3.4.1.35 and the same error occurred. I then tried to go to the next version after my current one: 3.4.1.30 and received the same error.

 

I'm updating the image by removing the current Emby image, and pulling the new image via docker. Then using docker run to mount all the same directories as the original container had.

 

When I roll back to my current version: 3.4.1.0 the image boots and the service comes up as expected.

 

Any help is greatly appreciated :)

 

 

EmbySqliteExceptionLog.txt

Link to comment
Share on other sites

sampsonight

Looking at the docker versions I expected them to be in order but that does not appear to be the case... though they are in order by last updated.

 

For example I expect 3.41.29 to be newer than my current release of 3.4.1.0, but docker hub shows:

 

3.4.1.0 85 MB 15 days ago
3.4.1.29 88 MB a month ago
 
I'll start updating incrementally off of .0 and see if I can narrow it down further.
Link to comment
Share on other sites

sampsonight

So I went version by version and have the below data. When a version would work I'd go into the UI to see what it was displaying. Not sure about the 'unable to connect'. Its highly possible that the server was just under load as it was attempting to scan the library.  I'm currently on .20 and am going to wait for the library scan to complete. If I can access it, then I'll chalk the 'unable to connect' to load. I think its a red herring anyway as the main issue is the consistent sqlite expection that stops the service from coming up at all.

 

Emby Versions
3.4.1.0 - works
3.4.1.1 - works
3.4.1.2 - works
3.4.1.3 - works - UI version 3.4.1.3 beta
3.4.1.6 - works - UI version - 3.4.1.6 beta
3.4.1.19 - works - UI version - 3.4.1.19 beta
3.4.1.20 - Service boots, error when accessing web app: 'We're unable to connect to the selected server right now. Please ensure it is running and try again.'
3.4.1.22 - Service boots, error when accessing web app: 'We're unable to connect to the selected server right now. Please ensure it is running and try again.'
3.4.1.23 - Service boots, error when accessing web app: 'We're unable to connect to the selected server right now. Please ensure it is running and try again.'
3.4.1.24 - Service boots, error when accessing web app: 'We're unable to connect to the selected server right now. Please ensure it is running and try again.'
3.4.1.26 - doesn't work - sqlite exception
3.4.1.29 - doesn't work - sqlite exception
3.4.1.30 - doesn't work - sqlite exception
3.4.1.35 - doesn't work - sqlite exception
3.6.0.2 - doesn't work - sqlite exception

Edited by sampsonight
Link to comment
Share on other sites

mastrmind11

how and what are updating?  not sure why you wouldn't just update to the latest... 

Link to comment
Share on other sites

sampsonight

mastrmind11,

 

I am attempting to update emby to latest. However I receive the error posted above. I updated to various versions to try and pinpoint at what version the error occurs.

I update by using docker pull emby/embyserver:version where version is latest normally or a specific version.

Then I use docker run to run the image.

Link to comment
Share on other sites

sampsonight

Yea so the problem is can't update to latest or any version past 3.4.1.19 without getting various errors. The main one being the sqlite error. Looking for any insights on why that error is being thrown.

Link to comment
Share on other sites

sampsonight

Yes I definitely bounced. In addition I've never waited this long to update before... that's on me :(

 

If the error doesn't point to anything known. I was thinking of doing the backup/restore procedure and restore into latest.

 

Also per the 'unable to connect' error I received on a few of the versions. After the library scan finished I was still getting that message.

Link to comment
Share on other sites

Ok, you may need to start with a fresh database then. Sometimes there are database changes introduced by newer beta versions. Then you roll back and the stable version doesn't know how to handle those changes. And then if you keep going back and forth it just adds more variables to the equation. A fresh database is your best bet at this point. Thanks.

Link to comment
Share on other sites

  • Solution
sampsonight

I was able to backup/restore from the documentation on the latest docker hub image. Everything is working as expected now. Thanks for the help :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...