Skip to content
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

Redis requirement for webpacker:compile with sidekiq 6.0.6 #4504

Closed
arrowcircle opened this issue Mar 24, 2020 · 4 comments
Closed

Redis requirement for webpacker:compile with sidekiq 6.0.6 #4504

arrowcircle opened this issue Mar 24, 2020 · 4 comments

Comments

@arrowcircle
Copy link

Ruby version: 2.6.5
Sidekiq / Pro / Enterprise version(s): Sidekiq

Hi! After upgrading to sidekiq 6.0.6 I got error while building docker image on webpacker:compile stage.
It looks like it requires Redis connection.

After downgrading to sidekiq 6.0.5 everything works fine without the redis.

here is the log of error:

/usr/local/lib/ruby/2.6.0/socket.rb:1213:in `__connect_nonblock': Operation now in progress - connect(2) would block (IO::EINPROGRESSWaitWritable)
 	from /usr/local/lib/ruby/2.6.0/socket.rb:1213:in `connect_nonblock'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/connection/ruby.rb:180:in `connect_addrinfo'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/connection/ruby.rb:220:in `block in connect'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/connection/ruby.rb:218:in `each'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/connection/ruby.rb:218:in `each_with_index'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/connection/ruby.rb:218:in `connect'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/connection/ruby.rb:317:in `connect'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:349:in `establish_connection'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:106:in `block in connect'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:306:in `with_reconnect'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:105:in `connect'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:381:in `ensure_connected'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:231:in `block in process'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:319:in `logging'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:230:in `process'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:196:in `call_pipelined'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:164:in `block in call_pipeline'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:306:in `with_reconnect'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:162:in `call_pipeline'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis.rb:2416:in `block in pipelined'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis.rb:52:in `block in synchronize'
 	from /usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis.rb:52:in `synchronize'
 	from /bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis.rb:2411:in `pipelined'
 	from /bundle/ruby/2.6.0/gems/sidekiq-6.0.6/lib/sidekiq/launcher.rb:104:in `block in flush_stats'
 	from /bundle/ruby/2.6.0/gems/sidekiq-6.0.6/lib/sidekiq.rb:97:in `block in redis'
 	from /bundle/ruby/2.6.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:65:in `block (2 levels) in with'
 	from /bundle/ruby/2.6.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:64:in `handle_interrupt'
 	from /bundle/ruby/2.6.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:64:in `block in with'
 	from /bundle/ruby/2.6.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:61:in `handle_interrupt'
 	from /bundle/ruby/2.6.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:61:in `with'
 	from /bundle/ruby/2.6.0/gems/sidekiq-6.0.6/lib/sidekiq.rb:94:in `redis'
 	from /bundle/ruby/2.6.0/gems/sidekiq-6.0.6/lib/sidekiq/launcher.rb:103:in `flush_stats'
@misdoro
Copy link
Contributor

misdoro commented Mar 24, 2020

Already fixed here:
#4502
We'll need to wait for next release

@mperham
Copy link
Collaborator

mperham commented Mar 24, 2020

Sidekiq's launcher is the code that is making this backtrace but is only required by the sidekiq binary. Can you explain how webpacker:compile is loading the launcher? Is there a 3rd party gem or Rails initializer that is calling require 'sidekiq/launcher'?

@misdoro
Copy link
Contributor

misdoro commented Mar 24, 2020

@mperham in my case it is another gem (sidekiq-cron) that is requiring sidekiq/launcher here:
https://github.com/ondrejbartas/sidekiq-cron/blob/master/lib/sidekiq/cron/launcher.rb
And in that gem the launcher is required in the https://github.com/ondrejbartas/sidekiq-cron/blob/master/lib/sidekiq/cron.rb

@mperham
Copy link
Collaborator

mperham commented Mar 24, 2020

@misdoro Yep, that's a real bug that you should report. Launcher should only be required within a Sidekiq.configure_server block.

@mperham mperham closed this as completed Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants