-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uninitialized constant Rackup::Handler::WEBrick (NameError) #32
Comments
Hi, https://github.com/rack/rackup/pull/23/files and the discussion around it (webrick should not be used because of security concerns). It shows up more frequently now, as Rails 8 was just released and uses rackup 2.2.0 (which includes the change). To hotfix this in your app, you can downgrade to 2.1.0 like this:
I think the "soft deprecation" on rackup simply failed and wasn't tested thoroughly. Even if you explicitly install webrick through your Gemfile, it will fail with 2.2.0. rackup's maintainers ask every library to not use rackup basically any longer and yabeda-prometheus has ::Rackup::Handler::WEBrick hardcoded. https://github.com/yabeda-rb/yabeda-prometheus/blob/master/lib/yabeda/prometheus/exporter.rb#L46-L47 There is a hint on using In my humble opinion this whole thing is a bloody mess: the cve on webrick is not really a cve, the fix was implemented the day after report, the fixed webrick gem was released a week after. Ruby's maintainer clearly state that you should not use webrick in production. But there is a very valid reason to run webrick as a dedicated thread: If you do not wish to have a "second class citizen service" like a prometheus exporter running on the same webserver as your main application. Let's say you have a misconfigured scrape config that results in dosing your own prometheus exporter. This will then also dos your main app. If the exporter runs on it's own webrick instead, it will just kill that and the main app will be less affected. Another fully valid use case is to run your prometheus exporter with webrick in an app like solidqueue's workers (bin/jobs). That does not need a fancy webserver like puma or falcon, it just needs something that can handle a few http requests. |
We have released Rackup v2.2.1 which tries to load In Ruby 3.4,
To fix this properly, please use the main public interface of |
Hey, I recently started to see this error in the logs. This is sidekiq process, sidekiq starts, but metrics server definitely don't.
This happens with sidekiq 7.3.5 and webrick 1.8.0 and 1.9.0 and latest versions of yabeda*. Any ideas how to fix this?
The text was updated successfully, but these errors were encountered: