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

Error "cannot load such file -- http-parser/http_parser", invoker doesn't open port 80 #245

Open
caiodark opened this issue Feb 20, 2023 · 4 comments

Comments

@caiodark
Copy link

OS: Osx 13.2
Device: Macbook pro M1
ruby: 3.2.1

When running invoker this is what I get:
<internal:/Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in require': cannot load such file -- http-parser/http_parser (LoadError)
from internal:/Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:88:in require' from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/http-parser-lite-0.6.0/lib/http-parser.rb:1:in <top (required)>'
from internal:/Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:88:in require' from <internal:/Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in require'
from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/invoker-1.5.8/lib/invoker/power/balancer.rb:2:in <top (required)>' from <internal:/Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in require'
from internal:/Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:88:in require' from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/invoker-1.5.8/lib/invoker/power/power.rb:3:in <top (required)>'
from internal:/Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:88:in require' from <internal:/Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in require'
from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/invoker-1.5.8/lib/invoker/power/powerup.rb:11:in run' from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/invoker-1.5.8/lib/invoker/power/powerup.rb:7:in block in fork_and_start'
from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/invoker-1.5.8/lib/invoker/power/powerup.rb:7:in fork' from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/invoker-1.5.8/lib/invoker/power/powerup.rb:7:in fork_and_start'
from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/invoker-1.5.8/lib/invoker/process_manager.rb:72:in run_power_server' from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/invoker-1.5.8/lib/invoker/commander.rb:39:in start_manager'
from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/invoker-1.5.8/lib/invoker/cli.rb:62:in start' from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/command.rb:27:in run'
from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in invoke_command' from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor.rb:392:in dispatch'
from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/base.rb:485:in start' from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/invoker-1.5.8/lib/invoker/cli.rb:12:in start'
from /Users/claudio/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/invoker-1.5.8/bin/invoker:7:in <top (required)>' from /Users/claudio/.asdf/installs/ruby/3.2.1/bin/invoker:25:in load'
from /Users/claudio/.asdf/installs/ruby/3.2.1/bin/invoker:25:in <main>

The processes start and they respond to their port.

@masonlouchart
Copy link

masonlouchart commented Mar 27, 2023

Same issue here 🙋‍♂️

  Model Name:	MacBook Pro
  Model Identifier:	MacBookPro16,1
  Processor Name:	6-Core Intel Core i7
  Processor Speed:	2,6 GHz
  Number of Processors:	1
  Total Number of Cores:	6
  L2 Cache (per Core):	256 KB
  L3 Cache:	12 MB
  Hyper-Threading Technology:	Enabled
  Memory:	32 GB
❯ gem -v                   
3.4.9
❯ ruby -v
ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-darwin22]
❯ rails -v
Rails 6.0.5.1

@shawnpyle
Copy link

According to my system, it has to do with the powerup_manager.

$> invoker start invoker.ini
Starting process - rails waiting for 0 seconds...
Starting process - jobs-worker waiting for 0 seconds...
Starting process - mailcatcher waiting for 0 seconds...
<internal:/Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- http-parser/http_parser (LoadError)
	from <internal:/Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/http-parser-lite-0.6.0/lib/http-parser.rb:1:in `<top (required)>'
	from <internal:/Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/invoker-1.5.8/lib/invoker/power/balancer.rb:2:in `<top (required)>'
	from <internal:/Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/invoker-1.5.8/lib/invoker/power/power.rb:3:in `<top (required)>'
	from <internal:/Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/invoker-1.5.8/lib/invoker/power/powerup.rb:11:in `run'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/invoker-1.5.8/lib/invoker/power/powerup.rb:7:in `block in fork_and_start'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/invoker-1.5.8/lib/invoker/power/powerup.rb:7:in `fork'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/invoker-1.5.8/lib/invoker/power/powerup.rb:7:in `fork_and_start'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/invoker-1.5.8/lib/invoker/process_manager.rb:72:in `run_power_server'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/invoker-1.5.8/lib/invoker/commander.rb:39:in `start_manager'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/invoker-1.5.8/lib/invoker/cli.rb:62:in `start'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/invoker-1.5.8/lib/invoker/cli.rb:12:in `start'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0/gems/invoker-1.5.8/bin/invoker:7:in `<top (required)>'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/bin/invoker:25:in `load'
	from /Users/spyle/.asdf/installs/ruby/3.0.6/bin/invoker:25:in `<main>'

Process with command powerup_manager exited with status 1

<normal job output, everything appears to start up fine>

invoker.ini

[rails]
command = ./bin/spring stop && bundle exec rake db:migrate && ./bin/webpack && bundle exec rails s

[jobs-worker]
command = bundle exec rake jobs:cron:schedule && cli delayed kill && rm -f ./tmp/pids/delayed_job.* && bundle exec rails jobs:work

[mailcatcher]
command = mailcatcher --foreground --ip localhost --smtp-ip localhost

Ruby, Bundler, Gems

$> bundler env

# Environment
Bundler       2.4.13
  Platforms   ruby, x86_64-darwin-21
Ruby          3.0.6p216 (2023-03-30 revision 23a532679b406cb53c0edfc00c91c32a5ccd335a) [x86_64-darwin-21]
  Full Path   /users/name/.asdf/installs/ruby/3.0.6/bin/ruby
  Config Dir  /users/name/.asdf/installs/ruby/3.0.6/etc
RubyGems      3.4.13
  Gem Home    /users/name/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0
  Gem Path    /users/name/.gem/ruby/3.0.0:/users/name/.asdf/installs/ruby/3.0.6/lib/ruby/gems/3.0.0
  User Home   /users/name
  User Path   /users/name/.gem/ruby/3.0.0
  Bin Dir     /users/name/.asdf/installs/ruby/3.0.6/bin
Tools
  Git         2.37.1 (Apple Git-137.1)
  RVM         not installed
  rbenv       not installed
  chruby      not installed

# Bundler Build Metadata
Built At          2023-05-10
Git SHA           26eb456c6c
Released Version  true

Hardware

$> system_profiler SPHardwareDataType
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro16,1
      Processor Name: 8-Core Intel Core i9
      Processor Speed: 2.4 GHz
      Number of Processors: 1
      Total Number of Cores: 8
      L2 Cache (per Core): 256 KB
      L3 Cache: 16 MB
      Hyper-Threading Technology: Enabled
      Memory: 32 GB
      System Firmware Version: 1916.80.2.0.0 (iBridge: 20.16.3045.0.0,0)
      OS Loader Version: 540.120.3~22

@shawnpyle
Copy link

Likely duplicate of #184

@jbrodie
Copy link
Contributor

jbrodie commented Apr 2, 2024

This is not a duplicate. The issue lies in the http-parser-lite-0.6.0 gem, which I have reached out to the owner and they have now patched to version 1.0.0. But that isn't of any use if this gem isn't updated.

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

4 participants