Any other conditions are required of docker?
Raxxor opened this issue · comments
ubuntu16.04 Docker version 17.03.1-ce, build c6d412e
When I tried
docker exec bot-render-container curl http://localhost:8080/?url=https://dynamic-meta.appspot.com
docker console output following logs
Listening on port 8080
{ Error: connect ECONNREFUSED 127.0.0.1:9222
at Object.exports._errnoException (util.js:1014:11)
at exports._exceptionWithHostPort (util.js:1037:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1138:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 9222 }
Did you build with the --no-cache
flag?
I confirm the same problem on MacOS. I solved the problem adding the --disable-sandbox
flag within the chromium.js
file.
Maybe this should be written on the README 👍
Yup, will do. Interestingly the original issue here was on Ubuntu, so I'm curious as to whether its the same problem. @Raxxor: does this fix it for you?
Thanks for @samuelli & @LasaleFamine 's comments.
Docker was built by dockerhub, so it is buit with "no cache" mode. Now I am pulling images from dockerhub with adding "--disable-sandbox' in chromium.js.
BTW, i tried to run original files , and some pages was not rendered successfully.
Listening on port 3002
(node:14407) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: not opened
(node:14407) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@justinribeiro has landed added some great recommendations to the readme which address this, so I'm closing this issue. Please file issues for more errors that you might be experiencing.
@Raxxor: can you file separate issues for anything else you might be seeing?
I'm on MacOS sierra and get { message: 'net::ERR_CONNECTION_REFUSED' }
whenever I try to render or screenshot the tour of heroes project launching with ng serve
I checked and tried the suggestions at https://github.com/GoogleChrome/rendertron#connection-error-econnrefused but none of them works.
Could you please suggest where should I add the --disable-sandbox flag to?
I have done following commands:
git clone https://github.com/GoogleChrome/rendertron.git server
cd server
docker build -t rendertron . --no-cache=true
docker run -it -p 8080:8080 --name rendertron-container rendertron