Docker update error

I tried to update docker through my discourse control panel but all of them gave an error, can anyone help me

/var/www/discourse/lib/discourse_ip_info.rb:48:in `mmdb_download': undefined method `path' for nil:NilClass (NoMethodError)

    filename = File.basename(gz_file.path)
	from /var/www/discourse/lib/tasks/maxminddb.rake:72:in `block (3 levels) in <main>'
	from /var/www/discourse/lib/tasks/maxminddb.rake:70:in `each'
	from /var/www/discourse/lib/tasks/maxminddb.rake:70:in `block (2 levels) in <main>'
#<RuntimeError: RuntimeError>
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:210:in `run'
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:111:in `upgrade'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:19:in `block in <main>'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6:in `fork'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties- `load'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties- `perform'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.3.1/lib/thor/command.rb:28:in `run'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.3.1/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.3.1/lib/thor.rb:527:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties- `perform'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties- `invoke'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties- `<main>'
<internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
bin/rails:18:in `<main>'
Spinning up 7 Unicorn worker(s) that were stopped initially

Additionally, a warning is now appearing in my installation Sidekiq is not running. Many tasks, such as sending emails, are performed asynchronously by Sidekiq. Make sure that at least one sidekiq process is running. Learn about Sidekiq here.

That’s the crash logs from maxmind being bugged, commenting out the API key in your app.yml and rebuilding should fix the issue.

Ref to topic about this:

1 Like

If that does fix the issue, then it’s still what I would call a bug, as failing to download maxmind due to an invalid Maxmind key, or an intermittent network error or anything else, shouldn’t crash Discourse.

As I had mentioned on your topic, last I tried we still couldn’t rebuild with a valid maxmind key, wouldn’t that be the same bug?

1 Like

I would say that anytime a problem with maxmind causes a rebuild to fail, it’s a bug. I’m pretty sure that it’s always been possible for issues with Maxmind to cause a build to fail.

So I don’t know whether it’s the same bug, or multiple bugs.

I think the solution could be as simple as adding a rescue (somewhere in discourse/lib/discourse_ip_info.rb at 3d49df2953fd14ae75eeab7621ad687f1b06f504 · pfaffman/discourse · GitHub) to allow life to go on without Maxmind, regardless of whether a key, valid or invalid, was provided.