Radarr will not load after update (no such column: t0.MinimumAvailability) [v0.2.0.453]

Created on 6 Mar 2017  路  18Comments  路  Source: Radarr/Radarr

Description:

After the automatic update to v0.2.0.453, trying to Navigate to Radarr only produces an endless loading animation. I then tried manually updating to this version, which had no effect.

Radarr Version:

v0.2.0.453

Logs:

After restarting the service, the log repeatedly lists these two entries:

17-3-6 08:14:05.9|Error|DownloadDecisionMaker|Couldn't process release.

[v0.2.0.453] System.Data.SQLite.SQLiteException (0x80004005): SQL logic error or missing database
no such column: t0.MinimumAvailability
   at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
   at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()
   at Marr.Data.DataMapper.Query[T](String sql, ICollection`1 entityList, Boolean useAltName) in C:\projects\radarr-usby1\src\Marr.Data\DataMapper.cs:line 566
   at Marr.Data.QGen.QueryBuilder`1.ToList() in C:\projects\radarr-usby1\src\Marr.Data\QGen\QueryBuilder.cs:line 279
   at Marr.Data.QGen.SortBuilder`1.ToList() in C:\projects\radarr-usby1\src\Marr.Data\QGen\SortBuilder.cs:line 176
   at Marr.Data.QGen.SortBuilder`1.GetEnumerator() in C:\projects\radarr-usby1\src\Marr.Data\QGen\SortBuilder.cs:line 247
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at NzbDrone.Core.Tv.MovieRepository.FindByTitle(String cleanTitle, Int32 year) in C:\projects\radarr-usby1\src\NzbDrone.Core\Tv\MovieRepository.cs:line 147
   at NzbDrone.Core.Tv.MovieService.FindByTitle(String title, Int32 year) in C:\projects\radarr-usby1\src\NzbDrone.Core\Tv\MovieService.cs:line 237
   at NzbDrone.Core.Parser.ParsingService.GetMovie(ParsedMovieInfo parsedEpisodeInfo, String imdbId, SearchCriteriaBase searchCriteria) in C:\projects\radarr-usby1\src\NzbDrone.Core\Parser\ParsingService.cs:line 409
   at NzbDrone.Core.Parser.ParsingService.Map(ParsedMovieInfo parsedEpisodeInfo, String imdbId, SearchCriteriaBase searchCriteria) in C:\projects\radarr-usby1\src\NzbDrone.Core\Parser\ParsingService.cs:line 230
   at NzbDrone.Core.DecisionEngine.DownloadDecisionMaker.<GetMovieDecisions>d__6.MoveNext() in C:\projects\radarr-usby1\src\NzbDrone.Core\DecisionEngine\DownloadDecisionMaker.cs:line 73

Most helpful comment

@Nightbr your post has saved my bacon twice now over the last year or so. Thank you 馃憦

@galli-leo, the intended upgrade path:

  1. Stop container
  2. Clear container volume
  3. Start latest container version with /config still pointing to your old config folder

Results in a broken install. In my case, the back-end returns 500 errors with:

{
  "message": "SQL logic error or missing database\nno such column: t0.SeriesId",
  "description": "System.Data.SQLite.SQLiteException (0x80004005): SQL logic error or missing database\nno such column: t0.SeriesId\n  at System.Data.SQLite.SQLite3.Prepare (System.Data.SQLite.SQLiteConnection cnn, System.String strSql, System.Data.SQLite.SQLiteStatement previous, System.UInt32 timeoutMS, System.String& strRemain) [0x0033c] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at System.Data.SQLite.SQLiteCommand.BuildNextCommand () [0x000f6] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at System.Data.SQLite.SQLiteCommand.GetStatement (System.Int32 index) [0x00008] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteCommand:GetStatement (int)\n  at System.Data.SQLite.SQLiteDataReader.NextResult () [0x0011e] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at System.Data.SQLite.SQLiteDataReader..ctor (System.Data.SQLite.SQLiteCommand cmd, System.Data.CommandBehavior behave) [0x00090] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteDataReader:.ctor (System.Data.SQLite.SQLiteCommand,System.Data.CommandBehavior)\n  at System.Data.SQLite.SQLiteCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x0000c] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader (System.Data.CommandBehavior behavior) [0x00000] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at System.Data.Common.DbCommand.ExecuteReader () [0x00000] in <077448effcc64d318979a6d5da8b25bc>:0 \n  at (wrapper remoting-invoke-with-check) System.Data.Common.DbCommand:ExecuteReader ()\n  at Marr.Data.DataMapper.Query[T] (System.String sql, System.Collections.Generic.ICollection`1[T] entityList, System.Boolean useAltName) [0x0006b] in C:\\projects\\radarr-usby1\\src\\Marr.Data\\DataMapper.cs:567 \n  at Marr.Data.QGen.QueryBuilder`1[T].ToList () [0x00052] in C:\\projects\\radarr-usby1\\src\\Marr.Data\\QGen\\QueryBuilder.cs:279 \n  at NzbDrone.Core.Datastore.BasicRepository`1[TModel].All () [0x00000] in C:\\projects\\radarr-usby1\\src\\NzbDrone.Core\\Datastore\\BasicRepository.cs:60 \n  at NzbDrone.Core.Download.Pending.PendingReleaseService.GetPendingReleases () [0x00006] in C:\\projects\\radarr-usby1\\src\\NzbDrone.Core\\Download\\Pending\\PendingReleaseService.cs:188 \n  at NzbDrone.Core.Download.Pending.PendingReleaseService.GetPendingQueue () [0x00018] in C:\\projects\\radarr-usby1\\src\\NzbDrone.Core\\Download\\Pending\\PendingReleaseService.cs:118 \n  at NzbDrone.Api.Queue.QueueModule.GetQueueItems () [0x0000b] in C:\\projects\\radarr-usby1\\src\\NzbDrone.Api\\Queue\\QueueModule.cs:33 \n  at NzbDrone.Api.Queue.QueueModule.GetQueue () [0x00000] in C:\\projects\\radarr-usby1\\src\\NzbDrone.Api\\Queue\\QueueModule.cs:27 \n  at NzbDrone.Api.REST.RestModule`1[TResource].<set_GetResourceAll>b__32_0 (System.Object options) [0x00000] in C:\\projects\\radarr-usby1\\src\\NzbDrone.Api\\REST\\RestModule.cs:111 \n  at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object)\n  at Nancy.Routing.Route+<>c__DisplayClass4.<Wrap>b__3 (System.Object parameters, System.Threading.CancellationToken context) [0x00049] in <63c44d6f8d7e4f339a987bf9eb94d931>:0 "
}

@Nightbr 's suggestion of:

  1. Stop container
  2. Clear container volume
  3. Rename /config folder to /config_backup (don't worry this can be done later on)
  4. Start latest container version and allow it to build a new /config folder
  5. Use the update feature _inside_ the docker container
  6. Stop the container
  7. Remove /config and rename /config_backup -> /config
  8. Start your container

Gets the container up and running. For whatever reason, Radarr or linuxserver/radarr's docker container fails to boot properly with the latest container image and an older /config folder

All 18 comments

Looks like you some how missed the db migration on update. For now can you open up the db file in sqlite browser and add that column to the movies table?

It's type for the column is text.

@onedr0p What's the actual name of the table? I see 29 tables, but none called "Movies."

It's there. Try poking around.

http://imgur.com/9xBsQ6C Here is what I see. Am I in the right database (ndbdrone.db)?

Are you looking at the right one? That looks like sonarrs db.

Yes, it's in my Radarr install folder. I'm guessing originally the Radarr db used the same format as Sonarr?

Yes, but if you don't see movies table something is seriously wrong. Also, you shouldn't have your data files in the install folder. I don't think you're looking at the right db file.

Yes, sorry, I was. Adding the column does fix the issue, thanks! I still get endless loading on the "Wanted" page, but that's been happening for a while. I'll close this out.

Actually, I started getting errors again shortly after. I checked the code, it looks like the column type should be Integer, not Text. No more errors yet since changing that.

@onedr0p Are there any other tables that require the column? I'm still getting these errors in the logs, although so far I have not noticed anything not working.

Examples:

17-3-6 12:56:37.0|Fatal|NzbDroneErrorPipeline|Request Failed

[v0.2.0.453] System.Data.SQLite.SQLiteException (0x80004005): SQL logic error or missing database
no such column: t0.MinimumAvailability
   at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
   at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()
   at Marr.Data.DataMapper.Query[T](String sql, ICollection`1 entityList, Boolean useAltName) in C:\projects\radarr-usby1\src\Marr.Data\DataMapper.cs:line 566
   at Marr.Data.QGen.QueryBuilder`1.ToList() in C:\projects\radarr-usby1\src\Marr.Data\QGen\QueryBuilder.cs:line 279
   at NzbDrone.Core.Datastore.BasicRepository`1.All() in C:\projects\radarr-usby1\src\NzbDrone.Core\Datastore\BasicRepository.cs:line 60
   at NzbDrone.Core.ThingiProvider.ProviderFactory`2.All() in C:\projects\radarr-usby1\src\NzbDrone.Core\ThingiProvider\ProviderFactory.cs:line 39
   at NzbDrone.Api.ProviderModuleBase`3.GetAll() in C:\projects\radarr-usby1\src\NzbDrone.Api\ProviderModuleBase.cs:line 58
   at NzbDrone.Api.REST.RestModule`1.<set_GetResourceAll>b__32_0(Object options) in C:\projects\radarr-usby1\src\NzbDrone.Api\REST\RestModule.cs:line 111
   at CallSite.Target(Closure , CallSite , Func`2 , Object )
   at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)

17-3-6 12:04:30.4|Error|CommandExecutor|Error occurred while executing task NetImportSync

[v0.2.0.453] System.Data.SQLite.SQLiteException (0x80004005): SQL logic error or missing database
no such column: t0.MinimumAvailability
   at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
   at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()
   at Marr.Data.DataMapper.Query[T](String sql, ICollection`1 entityList, Boolean useAltName) in C:\projects\radarr-usby1\src\Marr.Data\DataMapper.cs:line 566
   at Marr.Data.QGen.QueryBuilder`1.ToList() in C:\projects\radarr-usby1\src\Marr.Data\QGen\QueryBuilder.cs:line 279
   at NzbDrone.Core.Datastore.BasicRepository`1.All() in C:\projects\radarr-usby1\src\NzbDrone.Core\Datastore\BasicRepository.cs:line 60
   at NzbDrone.Core.ThingiProvider.ProviderFactory`2.All() in C:\projects\radarr-usby1\src\NzbDrone.Core\ThingiProvider\ProviderFactory.cs:line 39
   at NzbDrone.Core.ThingiProvider.ProviderFactory`2.Active() in C:\projects\radarr-usby1\src\NzbDrone.Core\ThingiProvider\ProviderFactory.cs:line 145
   at NzbDrone.Core.NetImport.NetImportFactory.Active() in C:\projects\radarr-usby1\src\NzbDrone.Core\NetImport\NetImportFactory.cs:line 33
   at NzbDrone.Core.ThingiProvider.ProviderFactory`2.GetAvailableProviders() in C:\projects\radarr-usby1\src\NzbDrone.Core\ThingiProvider\ProviderFactory.cs:line 91
   at NzbDrone.Core.NetImport.NetImportSearchService.Execute(NetImportSyncCommand message) in C:\projects\radarr-usby1\src\NzbDrone.Core\NetImport\NetImportSearchService.cs:line 80
   at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommand[TCommand](TCommand command, CommandModel commandModel) in C:\projects\radarr-usby1\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 91
   at CallSite.Target(Closure , CallSite , CommandExecutor , Object , CommandModel )
   at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2)
   at CallSite.Target(Closure , CallSite , CommandExecutor , Object , CommandModel )
   at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommands() in C:\projects\radarr-usby1\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 41

I would wipe your radarr data and start over, I am not certain why you're getting these errors, maybe the upgrade process was interupted. Your install is wack. (Used my 90s word of the day) ;)

@crafty35a Yeah IIRC NetImport also needs it as well as another one. Check out the specific Migration at the source.

I was able to get around it by comparing a new DB to mine (I didn't want to start over and have to deal with bulk import again). Turns out the NetImport table also needs a MinimumAvailability column. More info in case anyone else runs into this issue:

Movies and NetImport tables both need columns called MinimumAvailability, which should be set to Not Null, value type Integer, with default value 'PreDb' including the single quotes.

I also needed to run these commands to set the column values non-null before it would let me set the Non-Null checkbox:
UPDATE Movies SET MinimumAvailability = '4';
UPDATE NetImport SET MinimumAvailability = '4';

Hey, same problem here, just recreate my radarr container but when it restart I have the same issue with the db missing column... I use docker and I am pretty sure the container has installed the latest version but not executed the db migrations.
Is there a command to run migrations manually ?

Thanks

Good new, I found a solution!
If you use https://hub.docker.com/r/linuxserver/radarr/, if you recreate your container, you need to backup your config folder <path to data>:/config (rename it with _backup). Rerun the container which will generate new config. Here is the trick, you need to upgrade radarr from the interface and after that, just stop the container remove the actual config folder and rename your *_backup folder to the original.

Seems to be the container doesn't upgrade the version automatically.

Cheers

@Nightbr Please do not update Radarr (or any other application) inside the docker container ever, or else you will experience exactly the situation above. If you are using docker, you will have to pull the new image

@Nightbr your post has saved my bacon twice now over the last year or so. Thank you 馃憦

@galli-leo, the intended upgrade path:

  1. Stop container
  2. Clear container volume
  3. Start latest container version with /config still pointing to your old config folder

Results in a broken install. In my case, the back-end returns 500 errors with:

{
  "message": "SQL logic error or missing database\nno such column: t0.SeriesId",
  "description": "System.Data.SQLite.SQLiteException (0x80004005): SQL logic error or missing database\nno such column: t0.SeriesId\n  at System.Data.SQLite.SQLite3.Prepare (System.Data.SQLite.SQLiteConnection cnn, System.String strSql, System.Data.SQLite.SQLiteStatement previous, System.UInt32 timeoutMS, System.String& strRemain) [0x0033c] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at System.Data.SQLite.SQLiteCommand.BuildNextCommand () [0x000f6] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at System.Data.SQLite.SQLiteCommand.GetStatement (System.Int32 index) [0x00008] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteCommand:GetStatement (int)\n  at System.Data.SQLite.SQLiteDataReader.NextResult () [0x0011e] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at System.Data.SQLite.SQLiteDataReader..ctor (System.Data.SQLite.SQLiteCommand cmd, System.Data.CommandBehavior behave) [0x00090] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteDataReader:.ctor (System.Data.SQLite.SQLiteCommand,System.Data.CommandBehavior)\n  at System.Data.SQLite.SQLiteCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x0000c] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader (System.Data.CommandBehavior behavior) [0x00000] in <61a20cde294d4a3eb43b9d9f6284613b>:0 \n  at System.Data.Common.DbCommand.ExecuteReader () [0x00000] in <077448effcc64d318979a6d5da8b25bc>:0 \n  at (wrapper remoting-invoke-with-check) System.Data.Common.DbCommand:ExecuteReader ()\n  at Marr.Data.DataMapper.Query[T] (System.String sql, System.Collections.Generic.ICollection`1[T] entityList, System.Boolean useAltName) [0x0006b] in C:\\projects\\radarr-usby1\\src\\Marr.Data\\DataMapper.cs:567 \n  at Marr.Data.QGen.QueryBuilder`1[T].ToList () [0x00052] in C:\\projects\\radarr-usby1\\src\\Marr.Data\\QGen\\QueryBuilder.cs:279 \n  at NzbDrone.Core.Datastore.BasicRepository`1[TModel].All () [0x00000] in C:\\projects\\radarr-usby1\\src\\NzbDrone.Core\\Datastore\\BasicRepository.cs:60 \n  at NzbDrone.Core.Download.Pending.PendingReleaseService.GetPendingReleases () [0x00006] in C:\\projects\\radarr-usby1\\src\\NzbDrone.Core\\Download\\Pending\\PendingReleaseService.cs:188 \n  at NzbDrone.Core.Download.Pending.PendingReleaseService.GetPendingQueue () [0x00018] in C:\\projects\\radarr-usby1\\src\\NzbDrone.Core\\Download\\Pending\\PendingReleaseService.cs:118 \n  at NzbDrone.Api.Queue.QueueModule.GetQueueItems () [0x0000b] in C:\\projects\\radarr-usby1\\src\\NzbDrone.Api\\Queue\\QueueModule.cs:33 \n  at NzbDrone.Api.Queue.QueueModule.GetQueue () [0x00000] in C:\\projects\\radarr-usby1\\src\\NzbDrone.Api\\Queue\\QueueModule.cs:27 \n  at NzbDrone.Api.REST.RestModule`1[TResource].<set_GetResourceAll>b__32_0 (System.Object options) [0x00000] in C:\\projects\\radarr-usby1\\src\\NzbDrone.Api\\REST\\RestModule.cs:111 \n  at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object)\n  at Nancy.Routing.Route+<>c__DisplayClass4.<Wrap>b__3 (System.Object parameters, System.Threading.CancellationToken context) [0x00049] in <63c44d6f8d7e4f339a987bf9eb94d931>:0 "
}

@Nightbr 's suggestion of:

  1. Stop container
  2. Clear container volume
  3. Rename /config folder to /config_backup (don't worry this can be done later on)
  4. Start latest container version and allow it to build a new /config folder
  5. Use the update feature _inside_ the docker container
  6. Stop the container
  7. Remove /config and rename /config_backup -> /config
  8. Start your container

Gets the container up and running. For whatever reason, Radarr or linuxserver/radarr's docker container fails to boot properly with the latest container image and an older /config folder

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jurpeedurp picture jurpeedurp  路  3Comments

danielb2 picture danielb2  路  3Comments

Silent-Remux picture Silent-Remux  路  4Comments

alpinewinter picture alpinewinter  路  3Comments

scope999 picture scope999  路  3Comments