Bad address
adamgotterer opened this issue · comments
Adam Gotterer commented
I'm trying to get chroxy running in a docker container but am running into the following error on startup. I've confirmed that chrome is on the machine and runs without an issue.
headless@3f7c2ef65f01:~/chroxy-0.3.2$ mix run --no-halt
02:53:39.180 pid=<0.212.0> module=Chroxy.Application [info] Started application
02:53:39.202 pid=<0.214.0> module=Chroxy.ProxyListener [debug] Listening on port: 1331
02:53:39.225 pid=<0.216.0> module=Chroxy.ChromeManager [warn] ARGS: [{Chroxy.ChromeServer, [page_wait_ms: "200", crash_dumps_dir: "/tmp", verbose_logging: 0]}, {Chroxy.ProxyServer, [packet_trace: false]}, {Chroxy.Endpoint, [scheme: :http, port: "1330"]}, {:included_applications, []}, {Chroxy.ProxyListener, [host: "127.0.0.1", port: "1331"]}, {:chrome_remote_debug_port_from, "9222"}, {:chrome_remote_debug_port_to, "9223"}]
02:53:39.482 pid=<0.217.0> module=Chroxy.ChromeServer [info] [CHROME: 477] stdout: "Pid 477: cannot execute '(null)': Bad address"
02:53:39.709 pid=<0.322.0> module=Chroxy.ChromeServer [info] [CHROME: 478] stdout: "Pid 478: cannot execute '(null)': Bad address"
02:53:39.945 pid=<0.324.0> module=Chroxy.ChromeServer [info] [CHROME: 479] stdout: "Pid 479: cannot execute '(null)': Bad address"
02:53:40.173 pid=<0.326.0> module=Chroxy.ChromeServer [info] [CHROME: 480] stdout: "Pid 480: cannot execute '(null)': Bad address"
02:53:40.247 pid=<0.216.0> module=Chroxy.ChromeServer [error] ChromeServer #PID<0.217.0> did not reply to ready request
02:53:40.247 pid=<0.216.0> module=Chroxy.ChromeManager [error] Failed to start chrome on port 9222
Adam Gotterer commented
I have spent the entire day looking into this and narrowed it down to exexec
not having the right permissions. It's very odd because the container user can run headless chrome without issue. But when Chroxy tries to execute the exact same command it fails. Any ideas?
Adam Gotterer commented
Finally! I got it working.
Simple fix for docker: ENV SHELL /bin/sh
.
Turns out it was executing in the wrong shell and the exec command couldn't find the program.