Docker - Update from v2 to v3 fails

Sonarr Version (latest image): 2.0.0.5322
Mono Version: 5.20.1.19
OS: Docker (linux)
Debug logs: https://hastebin.com/esegajiwog.rb
Description of issue: Attempting to upgrade from v2 latest image docker container to preview v3
Logs show continual “epic fail” due to missing table: LanguageProfiles
Method followed:

  1. Stop sonarr v2
  2. Backup appdir
  3. Start sonarr v3 pointing to existing installation
  4. Fail?

Any other details required, please let me know.

M.

its possible v2 didnt shut down cleanly. i had issues when i was doing it way back (its like the container never shuts down cleanly) and ended up going with backing up the database (or you can use an existing one if you havent made any changes recently) and then shutting down the container.

then delete all the files in the config directory (not the subfolders) - back them up (just move them) if you want to keep them, just in case

pull the new v3 docker image and upgrade the container to it

once its up, restore the database from the last backup (which you made just before the upgrade. it’ll be in the backups\manual subdirectory)

Close! Well… Following your suggestions, I made an in app backup of the db and then shutdown the container. Removed all the existing files (not folders) of the /config dir and started a new instance of the preview container.

It came up just fine.

However attempting to restore the old backed up database results in the same error.

Logs show continual “epic fail” due to missing table: LanguageProfiles

M.

Edit: Unpacking and taking a look at the backed up DB, there definitely isn’t a “LanguageProfiles” table in the old DB. So it would appear that there is something amiss in the DB upgrade procedure?
Last build was 3 days 20 hours ago - so maybe something relatively new?

sounds like a possible bug.

as a workaround there are version very specific container tags for each release so you could try an earlier version of v3, eg linuxserver/sonarr:3.0.1.406-ls34, and see if that one works and if not keep going backwards until it does?

the tags for linuxserver/sonarr are all listed here https://hub.docker.com/r/linuxserver/sonarr/tags

once the database is workable you can shift to the sonarr-preview tag to stay up to date

No, Language profiles were added months ago and they haven’t changed since.

The old DB won’t have that table, it will when it’s renamed to sonarr.db and actually updated.

Well I tried the suggestion regardless, and even all the way back to “amd64-3.0.1.363-ls2” I run into the exact same error - that being that the LanguageProfiles table doesn’t exist.

So… Why isn’t the table being created when the container is started and it is recognised as a database upgrade situation? Or when I manually restore an older version of DB within Sonarr 3?

M.

I don’t know, this is the first instance that I’ve seen where it hasn’t.

The only reason a migration won’t run is if it a migration with the same ID has run before.

If you open the DB in a SQLite Editor, what do you get if you run: SELECT * FROM [VersionInfo]? (That’ll be the list of the migrations that have run before).

Hey there!

This is the output of that DB query:

1|2017-07-21T02:25:11|InitialSetup
2|2017-07-21T02:25:11|remove_tvrage_imdb_unique_constraint
3|2017-07-21T02:25:11|remove_renamed_scene_mapping_columns
4|2017-07-21T02:25:11|updated_history
5|2017-07-21T02:25:11|added_eventtype_to_history
6|2017-07-21T02:25:11|add_index_to_log_time
7|2017-07-21T02:25:11|add_renameEpisodes_to_naming
8|2017-07-21T02:25:11|remove_backlog
9|2017-07-21T02:25:11|fix_rename_episodes
10|2017-07-21T02:25:11|add_monitored
11|2017-07-21T02:25:11|remove_ignored
12|2017-07-21T02:25:11|remove_custom_start_date
13|2017-07-21T02:25:11|add_air_date_utc
14|2017-07-21T02:25:11|drop_air_date
15|2017-07-21T02:25:11|add_air_date_as_string
16|2017-07-21T02:25:11|updated_imported_history_item
17|2017-07-21T02:25:11|reset_scene_names
18|2017-07-21T02:25:11|remove_duplicates
19|2017-07-21T02:25:11|restore_unique_constraints
20|2017-07-21T02:25:11|add_year_and_seasons_to_series
21|2017-07-21T02:25:11|drop_seasons_table
22|2017-07-21T02:25:11|move_indexer_to_generic_provider
23|2017-07-21T02:25:11|add_config_contract_to_indexers
24|2017-07-21T02:25:11|drop_tvdb_episodeid
25|2017-07-21T02:25:11|move_notification_to_generic_provider
26|2017-07-21T02:25:11|add_config_contract_to_notifications
27|2017-07-21T02:25:11|fix_omgwtfnzbs
28|2017-07-21T02:25:11|add_blacklist_table
29|2017-07-21T02:25:11|add_formats_to_naming_config
30|2017-07-21T02:25:11|add_season_folder_format_to_naming_config
31|2017-07-21T02:25:11|delete_old_naming_config_columns
32|2017-07-21T02:25:11|set_default_release_group
33|2017-07-21T02:25:11|add_api_key_to_pushover
34|2017-07-21T02:25:11|remove_series_contraints
35|2017-07-21T02:25:11|add_series_folder_format_to_naming_config
36|2017-07-21T02:25:11|update_with_quality_converters
37|2017-07-21T02:25:11|add_configurable_qualities
38|2017-07-21T02:25:11|add_on_upgrade_to_notifications
39|2017-07-21T02:25:11|add_metadata_tables
40|2017-07-21T02:25:11|add_metadata_to_episodes_and_series
41|2017-07-21T02:25:11|fix_xbmc_season_images_metadata
42|2017-07-21T02:25:11|add_download_clients_table
43|2017-07-21T02:25:11|convert_config_to_download_clients
44|2017-07-21T02:25:11|fix_xbmc_episode_metadata
45|2017-07-21T02:25:11|add_indexes
46|2017-07-21T02:25:11|fix_nzb_su_url
47|2017-07-21T02:25:11|add_temporary_blacklist_columns
48|2017-07-21T02:25:11|add_title_to_scenemappings
49|2017-07-21T02:25:11|fix_dognzb_url
50|2017-07-21T02:25:11|add_hash_to_metadata_files
51|2017-07-21T02:25:11|download_client_import
52|2017-07-21T02:25:11|add_columns_for_anime
53|2017-07-21T02:25:11|add_series_sorttitle
54|2017-07-21T02:25:11|rename_profiles
55|2017-07-21T02:25:11|drop_old_profile_columns
56|2017-07-21T02:25:11|add_mediainfo_to_episodefile
57|2017-07-21T02:25:11|convert_episode_file_path_to_relative
58|2017-07-21T02:25:11|drop_episode_file_path
59|2017-07-21T02:25:11|add_enable_options_to_indexers
60|2017-07-21T02:25:11|remove_enable_from_indexers
61|2017-07-21T02:25:11|clear_bad_scene_names
62|2017-07-21T02:25:11|convert_quality_models
63|2017-07-21T02:25:11|add_remotepathmappings
64|2017-07-21T02:25:11|remove_method_from_logs
65|2017-07-21T02:25:11|make_scene_numbering_nullable
66|2017-07-21T02:25:11|add_tags
67|2017-07-21T02:25:11|add_added_to_series
68|2017-07-21T02:25:11|add_release_restrictions
69|2017-07-21T02:25:11|quality_proper
70|2017-07-21T02:25:11|delay_profile
71|2017-07-21T02:25:11|unknown_quality_in_profile
72|2017-07-21T02:25:11|history_downloadId
73|2017-07-21T02:25:11|clear_ratings
74|2017-07-21T02:25:11|disable_eztv
75|2017-07-21T02:25:11|force_lib_update
76|2017-07-21T02:25:11|add_users_table
77|2017-07-21T02:25:11|add_add_options_to_series
78|2017-07-21T02:25:11|add_commands_table
79|2017-07-21T02:25:11|dedupe_tags
81|2017-07-21T02:25:11|move_dot_prefix_to_transmission_category
82|2017-07-21T02:25:11|add_fanzub_settings
83|2017-07-21T02:25:11|additonal_blacklist_columns
84|2017-07-21T02:25:11|update_quality_minmax_size
85|2017-07-21T02:25:11|expand_transmission_urlbase
86|2017-07-21T02:25:11|pushbullet_device_ids
87|2017-07-21T02:25:11|remove_eztv
88|2017-07-21T02:25:11|pushbullet_devices_channels_list
89|2017-07-21T02:25:11|add_on_rename_to_notifcations
90|2017-07-21T02:25:11|update_kickass_url
91|2017-07-21T02:25:11|added_indexerstatus
92|2017-07-21T02:25:11|add_unverifiedscenenumbering
93|2017-07-21T02:25:11|naming_config_replace_illegal_characters
94|2017-07-21T02:25:11|add_tvmazeid
95|2017-07-21T02:25:11|add_additional_episodes_index
96|2017-07-21T02:25:11|disable_kickass
97|2017-07-21T02:25:11|add_reason_to_pending_releases
98|2017-07-21T02:25:11|remove_titans_of_tv
99|2017-07-21T02:25:11|extra_and_subtitle_files
100|2017-07-21T02:25:11|add_scene_season_number
101|2017-07-21T02:25:11|add_ultrahd_quality_in_profiles
103|2017-07-21T02:25:11|fix_metadata_file_extensions
104|2017-07-21T02:25:11|remove_kickass
105|2017-07-21T02:25:11|rename_torrent_downloadstation
106|2017-07-21T02:25:11|update_btn_url
107|2017-07-21T02:25:11|remove_wombles
108|2017-07-21T02:25:11|fix_extra_file_extension
109|2017-07-21T02:25:11|import_extra_files
110|2017-07-21T02:25:11|fix_extra_files_config
112|2017-07-21T02:25:11|added_regex_to_scenemapping
113|2017-07-21T02:25:11|consolidate_indexer_baseurl
114|2017-07-21T02:25:11|rename_indexer_status_id
115|2017-07-21T02:25:11|add_downloadclient_status
116|2017-07-21T02:25:11|disable_nyaa
118|2017-11-05T00:31:12|add_history_eventType_index
111|2018-05-25T08:59:07|remove_bitmetv
120|2018-06-18T18:14:29|update_series_episodes_history_indexes
121|2018-06-18T18:14:29|update_animetosho_url
129|2019-01-23T20:29:37|add_relative_original_path_to_episode_file
130|2019-01-23T20:29:37|episode_last_searched_time

Anything in that?

M.

That’s the same migration ID as the one that should be creating the language profile, but 111 with that description is in Radarr’s repo, so it looks like Radarr (or an unreleased version of Sonarr) touched that DB at some point, migrated it and now you’re having issues.

About the only thing you can do is remove that line from the table and let Sonarr run the migration again.

Very odd! I am running Radarr in another container - but they have separate bind mounts for the configs. Not sure how they could have interacted?

In any case, your suggestion worked fine. Removing the 111 line and restarting the preview container has brought the application up.

Many thanks everyone!

M.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.