intrigueio/intrigue-core

Docker hanging during startup

skluthe opened this issue · 9 comments

Running using the docker one-liner from here: https://core.intrigue.io/2019/03/19/intrigue-core-docker-image-one-liner/

Seems to go fine until it throws this during the sidekick setup:
2020-02-12T22:24:49.393Z pid=1448 tid=gn324yl9w DEBUG: {:queues=>["default"], :labels=>[], :concurrency=>60, :require=>"/core/core.rb", :environment=>nil, :timeout=>25, :poll_interval_average=>nil, :average_scheduled_poll_interval=>5, :error_handlers=>[#<Sidekiq::ExceptionHandler::Logger:0x000055654ea79fa0>], :death_handlers=>[], :lifecycle_events=>{:startup=>[], :quiet=>[], :shutdown=>[], :heartbeat=>[]}, :dead_max_jobs=>10000, :dead_timeout_in_seconds=>15552000, :reloader=>#<Proc:0x000055654ea15000@/root/.rbenv/versions/2.6.5/gemsets/core/gems/sidekiq-6.0.3/lib/sidekiq.rb:37>, :verbose=>true, :dynamic=>true, :process_limits=>{:task=>5, :control=>1, :task_enrichment=>20, :task_browser=>1, :task_autoscheduled=>20, :task_scan=>3, :task_spider=>3, :app=>3, :graph=>1}, :config_file=>"/core/config/sidekiq.yml", :strict=>true, :identity=>"2fe0a311d724:1448:e51eea52b51e", :fetch=>Sidekiq::LimitFetch}

After which it becomes unresponsive.

Running on ParrotOS 4.7

jcran commented

Actually this is just a part of the tailed logfile, and shows that the service is in fact listening. A couple things to check:

  • Are you forwarding :7777, per the instructions
  • Have you tried accessing it at https://localhost:7777 from your host system?
jcran commented

You should be able to access it locally as-is since it binds to all ipv4 interfaces (0.0.0.0) by default.

If you're just trying to adjust so the running container is ONLY bound to localhost, change the docker run command from '-p 0.0.0.0:7777:7777' to '-p 127.0.0.1:7777:7777'

If you want to adjust the image to bind to a different port (or change any default config option), you can change how/what the image itself binds to by forking/downloading the repo, editing the config/puma.rb.default file in the config directory (and the Dockerfile-standalone) and rolling your own image. Follow these instructions if you want to do that: https://core.intrigue.io/2017/03/07/using-intrigue-core-with-docker/

Let me know if this doesnt resolve it for you.

jcran commented

Sounds good, i'll close this out for now. Just re-open if you're still having trouble. Shoot an email to hello@intrigue.io if you want to join the Slack for more real-time help.

Same thing happens to me and the connection hangs if I try to reach the web server:

curl -v http://127.0.0.1:7777
* Rebuilt URL to: http://127.0.0.1:7777/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 7777 (#0)
> GET / HTTP/1.1
> Host: 127.0.0.1:7777
> User-Agent: curl/7.55.1
> Accept: */*
>

As you can see it actually connects to it but there is no response from the server
How can I debug it to see why this is happening?

Here is the last output I can see from the container when running it:

[+] Migrating DB for Intrigue Standalone
Connecting to Postgres at: postgres://intrigue@localhost:5432/intrigue_dev
Connecting to Postgres at: postgres://intrigue@localhost:5432/intrigue_dev
[+] Schema Version: 58
[+] Updating Intrigue Data
[+] Downloading latest data files...
[+] Getting latest web_accounts_list.json
[+] Getting latest ipv4-address-space.csv
[+] Getting latest tcp / udp port numbers
[+] Getting latest TLDs
[+] Getting latest Public suffix list
[+] Getting latest NVD JSON Feed: 2019
[+] Getting latest NVD JSON Feed: 2018
[+] Getting latest NVD JSON Feed: 2017
[+] Data Update Complete!
[+] Enabling Intrigue Services
god[975]: Syslog enabled.
god[1330]: Loading /core/util/god/intrigue-docker.rb
god[1330]: Using pid file directory: /core/tmp/pids
Sending 'start' command

The following watches were affected:
  intrigue-web
  intrigue-worker
  intrigue-resolver
  intrigue-chrome
  intrigue-tika
[+] Tailing worker log
Connecting to Redis Server at: redis://127.0.0.1:6379/
2020-02-19T04:09:50.334Z pid=1454 tid=gosqrlqgi INFO: Booting Sidekiq 6.0.3 with redis options {:url=>"redis://127.0.0.1:6379/", :id=>"Sidekiq-server-PID-1454"}
Connecting to Postgres at: postgres://intrigue@localhost:5432/intrigue_dev
Sourcing intrigue issues from  /core/lib/issues
2020-02-19T04:09:53.577Z pid=1454 tid=gosqrlqgi INFO: Running in ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
2020-02-19T04:09:53.577Z pid=1454 tid=gosqrlqgi INFO: See LICENSE and the LGPL-3.0 for licensing details.
2020-02-19T04:09:53.577Z pid=1454 tid=gosqrlqgi INFO: Upgrade to Sidekiq Pro for more features and support: http://sidekiq.org
2020-02-19T04:09:53.579Z pid=1454 tid=gosqrlqgi DEBUG: Client Middleware:
2020-02-19T04:09:53.579Z pid=1454 tid=gosqrlqgi DEBUG: Server Middleware:
2020-02-19T04:09:53.579Z pid=1454 tid=gosqrlqgi DEBUG: {:queues=>["default"], :labels=>[], :concurrency=>60, :require=>"/core/core.rb", :environment=>nil, :timeout=>25, :poll_interval_average=>nil, :average_scheduled_poll_interval=>5, :error_handlers=>[#<Sidekiq::ExceptionHandler::Logger:0x000055a3d5474630>], :death_handlers=>[], :lifecycle_events=>{:startup=>[], :quiet=>[], :shutdown=>[], :heartbeat=>[]}, :dead_max_jobs=>10000, :dead_timeout_in_seconds=>15552000, :reloader=>#<Proc:0x000055a3d543db58@/root/.rbenv/versions/2.6.5/gemsets/core/gems/sidekiq-6.0.3/lib/sidekiq.rb:37>, :verbose=>true, :dynamic=>true, :process_limits=>{:task=>5, :control=>1, :task_enrichment=>20, :task_browser=>1, :task_autoscheduled=>20, :task_scan=>3, :task_spider=>3, :app=>3, :graph=>1}, :config_file=>"/core/config/sidekiq.yml", :strict=>true, :identity=>"c228021ae3f6:1454:5f1d386c79b1", :fetch=>Sidekiq::LimitFetch}```

Never mind, I was reaching the server using http and not https and there is no redirection so I was getting a hanged connection. Just using https makes it work

jcran commented

This was a recent change (HTTP-> HTTPS on :7777). LMK if you saw any docs which haven't yet been updated. Thanks for following up.