chrome-launcher icon indicating copy to clipboard operation
chrome-launcher copied to clipboard

connection refused unless I turn off the sandbox

Open tcurdt opened this issue 6 years ago • 1 comments

It seems the Chrome is launched at Chrome running with pid 26 on port 9222 yet it later fails to connect ChromeLauncher:error connect ECONNREFUSED 127.0.0.1:9222 ...unless I add --no-sandbox.

I checked the docs but I am missing some context to understand if it's OK to just turn the sandbox off.

Given that I am running headless in a docker container I assume it shouldn't be so bad?

  ChromeLauncher No debugging port found on port 9222, launching a new Chrome. +0ms
grep: unrecognized option: R
BusyBox v1.27.2 (2017-12-12 10:41:50 GMT) multi-call binary.

Usage: grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...

Search for PATTERN in FILEs (or stdin)

	-H	Add 'filename:' prefix
	-h	Do not add 'filename:' prefix
	-n	Add 'line_no:' prefix
	-l	Show only names of files that match
	-L	Show only names of files that don't match
	-c	Show only count of matching lines
	-o	Show only the matching part of line
	-q	Quiet. Return 0 if PATTERN is found, 1 otherwise
	-v	Select non-matching lines
	-s	Suppress open and read errors
	-r	Recurse
	-i	Ignore case
	-w	Match whole words only
	-x	Match whole lines only
	-F	PATTERN is a literal (not regexp)
	-E	PATTERN is an extended regexp
	-m N	Match up to N times per file
	-A N	Print N lines of trailing context
	-B N	Print N lines of leading context
	-C N	Same as '-A N -B N'
	-e PTRN	Pattern to match
	-f FILE	Read pattern from file
  ChromeLauncher:verbose created /tmp/lighthouse.XJKEDhj +26ms
  ChromeLauncher:verbose Launching with command:
  ChromeLauncher:verbose "/usr/bin/chromium-browser" --disable-translate --disable-extensions --disable-background-networking --safebrowsing-disable-auto-update --disable-sync --metrics-recording-only --disable-default-apps --mute-audio --no-first-run --remote-debugging-port=9222 --user-data-dir=/tmp/lighthouse.XJKEDhj --disable-setuid-sandbox --window-size=1200,800 --disable-gpu --headless about:blank +1ms
  ChromeLauncher:verbose Chrome running with pid 26 on port 9222. +5ms
  ChromeLauncher Waiting for browser. +0ms
  ChromeLauncher Waiting for browser... +1ms
  ChromeLauncher Waiting for browser..... +507ms
  ChromeLauncher Waiting for browser....... +504ms
  ChromeLauncher Waiting for browser......... +505ms
  ChromeLauncher Waiting for browser........... +506ms
  ChromeLauncher Waiting for browser............. +503ms
  ChromeLauncher Waiting for browser............... +505ms
  ChromeLauncher Waiting for browser................. +504ms
  ChromeLauncher Waiting for browser................... +506ms
  ChromeLauncher Waiting for browser..................... +504ms
  ChromeLauncher Waiting for browser....................... +506ms
  ChromeLauncher Waiting for browser......................... +505ms
  ChromeLauncher Waiting for browser........................... +502ms
  ChromeLauncher Waiting for browser............................. +505ms
  ChromeLauncher Waiting for browser............................... +502ms
  ChromeLauncher Waiting for browser................................. +507ms
  ChromeLauncher Waiting for browser................................... +503ms
  ChromeLauncher Waiting for browser..................................... +503ms
  ChromeLauncher Waiting for browser....................................... +503ms
  ChromeLauncher Waiting for browser......................................... +504ms
  ChromeLauncher Waiting for browser........................................... +504ms
  ChromeLauncher Waiting for browser............................................. +503ms
  ChromeLauncher Waiting for browser............................................... +504ms
  ChromeLauncher Waiting for browser................................................. +502ms
  ChromeLauncher Waiting for browser................................................... +504ms
  ChromeLauncher Waiting for browser..................................................... +505ms
  ChromeLauncher Waiting for browser....................................................... +507ms
  ChromeLauncher Waiting for browser......................................................... +506ms
  ChromeLauncher Waiting for browser........................................................... +508ms
  ChromeLauncher Waiting for browser............................................................. +504ms
  ChromeLauncher Waiting for browser............................................................... +502ms
  ChromeLauncher Waiting for browser................................................................. +503ms
  ChromeLauncher Waiting for browser................................................................... +503ms
  ChromeLauncher Waiting for browser..................................................................... +502ms
  ChromeLauncher Waiting for browser....................................................................... +507ms
  ChromeLauncher Waiting for browser......................................................................... +502ms
  ChromeLauncher Waiting for browser........................................................................... +506ms
  ChromeLauncher Waiting for browser............................................................................. +502ms
  ChromeLauncher Waiting for browser............................................................................... +503ms
  ChromeLauncher Waiting for browser................................................................................. +506ms
  ChromeLauncher Waiting for browser................................................................................... +505ms
  ChromeLauncher Waiting for browser..................................................................................... +505ms
  ChromeLauncher Waiting for browser....................................................................................... +502ms
  ChromeLauncher Waiting for browser......................................................................................... +506ms
  ChromeLauncher Waiting for browser........................................................................................... +504ms
  ChromeLauncher Waiting for browser............................................................................................. +506ms
  ChromeLauncher Waiting for browser............................................................................................... +502ms
  ChromeLauncher Waiting for browser................................................................................................. +503ms
  ChromeLauncher Waiting for browser................................................................................................... +504ms
  ChromeLauncher Waiting for browser..................................................................................................... +507ms
  ChromeLauncher Waiting for browser....................................................................................................... +506ms
  ChromeLauncher:error connect ECONNREFUSED 127.0.0.1:9222 +1ms
  ChromeLauncher:error Logging contents of /tmp/lighthouse.XJKEDhj/chrome-err.log +1ms
  ChromeLauncher:error [0502/004449.048993:FATAL:zygote_host_impl_linux.cc(107)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
  ChromeLauncher:error  +0ms
{ Error: connect ECONNREFUSED 127.0.0.1:9222
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1161:14)
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 9222 }

tcurdt avatar May 02 '18 01:05 tcurdt

me to. do you solved ?

Feeeenng avatar Sep 12 '18 08:09 Feeeenng