Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Error with the docker image #96

Closed
mykiwi opened this issue Sep 5, 2017 · 6 comments
Closed

Error with the docker image #96

mykiwi opened this issue Sep 5, 2017 · 6 comments

Comments

@mykiwi
Copy link

mykiwi commented Sep 5, 2017

I can't play with it :

$ docker run -it -p 8080:8080 samdotli/rendertron

> bot-render@1.0.0 start /app
> node src/main.js

{ Error: connect ECONNREFUSED 127.0.0.1:44240
    at Object._errnoException (util.js:1041:11)
    at _exceptionWithHostPort (util.js:1064:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1153:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 44240 }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bot-render@1.0.0 start: `node src/main.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bot-render@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/botrender/.npm/_logs/2017-09-05T22_48_53_496Z-debug.log
@justinribeiro
Copy link
Contributor

I suspect that your kernel is possibly missing user namespace support. Try running with the SECCOMP profile or -cap-add SYS_ADMIN as per https://github.com/GoogleChrome/rendertron#running-the-container.

@neitomic
Copy link

neitomic commented Sep 8, 2017

Same problem with me.
I also try running with SECCOMP and cap-add SYS_ADMIN but it did not work.

I built image from master (a335926a).

My docker info:

Server Version: 17.07.0-ce
Storage Driver: overlay
 Backing Filesystem: extfs
 Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3addd840653146c90a254301d6c3a663c7fd6429
runc version: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-514.26.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 11.33GiB

Same error with both 2 commands:
docker run -it --rm -p 8080:8080 --cap-add SYS_ADMIN --name rendertron-container rendertron
docker run -it -p 8080:8080 --security-opt seccomp=/opt/rendertron/chrome.json --name rendertron-container rendertron

Container logs:

> bot-render@1.0.0 start /app
> node src/main.js

{ Error: connect ECONNREFUSED 127.0.0.1:40414
    at Object._errnoException (util.js:1041:11)
    at _exceptionWithHostPort (util.js:1064:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1153:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 40414 }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bot-render@1.0.0 start: `node src/main.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bot-render@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/botrender/.npm/_logs/2017-09-08T08_25_56_104Z-debug.log

@samuelli
Copy link
Contributor

samuelli commented Sep 8, 2017

What platform are you running on?

@justinribeiro
Copy link
Contributor

justinribeiro commented Sep 8, 2017

Looks like Cent 7 based on the log. I'll spin up Cent and see what's up (as I can't duplicate this on Debian or Ubuntu at the moment).

@justinribeiro
Copy link
Contributor

CentOS 7 by default doesn't have user namespaces enabled. As such, you have to enable them to get the container to properly fire up by setting the user_namespace.enable=1 via grubby:

image

You can verify if the kernel you're using has the needed support by using the kernel compatibility script noted in the docker documentation

@neitomic
Copy link

@justinribeiro it worked! Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants