Error when upgrading to the latest version due to third party plugin

Hello,

I have tried to upgrade Discourse to the latest version (beta5 from beta4) now.
First i have attempted to upgrade via admin interface and got error, but unfortunately could not read the message and save the text of log. After it i have seen a message about critical update available, but checking of new versions has shown that everything is up-to-date.
Then i have decided to rebuild the Discourse container. After it, i’ve got stopped forum and the next errors:

I, [2019-10-02T06:49:25.567952 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
NameError: uninitialized constant #<Class:#<Plugin::Instance:0x0000563c89408050>>::Validators
/var/www/discourse/plugins/discourse-quick-messages/plugin.rb:45:in `block in activate!'
/var/www/discourse/lib/plugin/instance.rb:329:in `block in notify_after_initialize'
/var/www/discourse/lib/plugin/instance.rb:327:in `each'
/var/www/discourse/lib/plugin/instance.rb:327:in `notify_after_initialize'
/var/www/discourse/config/application.rb:307:in `each'
/var/www/discourse/config/application.rb:307:in `block in <class:Application>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:51:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.0/lib/rails/application/finisher.rb:129:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.0/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.0/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.0/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.0/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.0/lib/rails/application.rb:363:in `initialize!'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.0/lib/rails/railtie.rb:190:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.0/lib/rails/railtie.rb:190:in `method_missing'
/var/www/discourse/config/environment.rb:7:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.1.10/lib/zeitwerk/kernel.rb:23:in `require'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.1.10/lib/zeitwerk/kernel.rb:23:in `require'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `block in require'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:291:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.0/lib/rails/application.rb:339:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.0/lib/rails/application.rb:515:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
I, [2019-10-02T06:49:42.040895 #1]  INFO -- : gem install holidays -v 7.1.0 -i /var/www/discourse/plugins/discourse-calendar/gems/2.6.4 --no-document --ignore-dependencies --no-user-install
Successfully installed holidays-7.1.0
1 gem installed

168:signal-handler (1569998982) Received SIGTERM scheduling shutdown...
I, [2019-10-02T06:49:42.041625 #1]  INFO -- : Terminating async processes
I, [2019-10-02T06:49:42.041737 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 51
I, [2019-10-02T06:49:42.041825 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 168
2019-10-02 06:49:42.041 UTC [51] LOG:  received fast shutdown request
2019-10-02 06:49:42.088 UTC [51] LOG:  aborting any active transactions
2019-10-02 06:49:42.092 UTC [51] LOG:  worker process: logical replication launcher (PID 60) exited with exit code 1
2019-10-02 06:49:42.092 UTC [55] LOG:  shutting down
168:M 02 Oct 2019 06:49:42.103 # User requested shutdown...
168:M 02 Oct 2019 06:49:42.103 * Saving the final RDB snapshot before exiting.
2019-10-02 06:49:42.221 UTC [51] LOG:  database system is shut down
168:M 02 Oct 2019 06:49:42.441 * DB saved on disk
168:M 02 Oct 2019 06:49:42.441 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 609 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
211e22376351c9b68dc74efc4e98436330f7e3ecea76985928c29c45072901bf
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

discourse-doctor has returned this:

DISCOURSE DOCTOR Wed Oct 2 10:11:59 MSK 2019
OS: Linux klerk-discourse 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


Can't find app.yml or web_only.yml.
Giving up.

After it, Dicourse container starts, but Discourse has no web access.
What should i do to upgrade and start Discourse successfully?

The problem is your third party plugin, as indicated in the error messages above. Remove it and rebuild.

Now i have excluded discourse-quick-messages plugin from build configuration. After it, the container could rebuild successfully, and Discourse has started. I think, discourse-quick-message plugin is now incompatible with current Discourse version. Waiting for new plugin version.

Thank you. It was discourse-quick-messages plugin.

1 Like

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