Prometheus exporter problem with SecureRandom (multisite?)

AI-generated summary

The discussion revolves around a problem encountered while bootstrapping a multisite instance, which resulted in a SecureRandom error. pfaffman initially suspected it was a multisite issue, but RGJ pointed out that the error was due to the instance running an outdated version of Ruby (less than 2.4). Removing the Prometheus plugin solved the problem temporarily. pfaffman subsequently updated the instance to the latest version and successfully bootstrapped it using ./launcher bootstrap multi.

Hey, @sam. I just tried to bootstrap a multisite instance and got this error:

I, [2017-10-30T17:12:58.767601 #14]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
NoMethodError: undefined method `bytes' for SecureRandom:Module
/var/www/discourse/plugins/discourse-prometheus/lib/big_pipe.rb:11:in `<class:RobustPipe>'
/var/www/discourse/plugins/discourse-prometheus/lib/big_pipe.rb:9:in `<class:BigPipe>'
/var/www/discourse/plugins/discourse-prometheus/lib/big_pipe.rb:7:in `<top (required)>'
/var/www/discourse/plugins/discourse-prometheus/plugin.rb:8:in `require_relative'
/var/www/discourse/plugins/discourse-prometheus/plugin.rb:8:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:412:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:412:in `activate!'
/var/www/discourse/lib/discourse.rb:146:in `block in activate_plugins!'
/var/www/discourse/lib/discourse.rb:143:in `each'
/var/www/discourse/lib/discourse.rb:143:in `activate_plugins!'
/var/www/discourse/config/application.rb:178:in `<class:Application>'
/var/www/discourse/config/application.rb:26:in `<module:Discourse>'
/var/www/discourse/config/application.rb:25:in `<top (required)>'
/var/www/discourse/Rakefile:5:in `require'
/var/www/discourse/Rakefile:5:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rake-12.1.0/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
(See full trace by running task with --trace)
I, [2017-10-30T17:13:10.161589 #14]  INFO -- : 

Removing Prometheus plugin solved the problem.

(This should be a new topic in Contribute > Bug and not a reply to Discourse Prometheus, right?)

That’s not a multisite issue, that’s because that instance is not running Ruby 2.4 or higher.

Doh!

git pull
./launcher bootstrap multi

Thanks, @RGJ!