Running as root without --no-sandbox is not supported - Port 80 AWS EC2



  • Hi,

    On AWS, ubuntu, I start jsreport as a service with sudo, because I have configured it to use port 80.
    I am getting that exception when trying to preview a PDF. It works ok if I change the port to 4444 and start jsreport without sudo

    sudo NODE_ENV=production nohup node server.js > ./node.log 2>&1 &
    
    Failed to launch chrome!
    [1024/224138.682566:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
    
    
    TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
    
        at onClose (/home/ubuntu/laps-reporting/node_modules/puppeteer/lib/Launcher.js:299:14)
        at Interface.helper.addEventListener (/home/ubuntu/laps-reporting/node_modules/puppeteer/lib/Launcher.js:288:50)
        at emitNone (events.js:111:20)
        at Interface.emit (events.js:208:7)
        at Interface.close (readline.js:370:8)
        at Socket.onend (readline.js:149:10)
        at emitNone (events.js:111:20)
        at Socket.emit (events.js:208:7)
        at endReadableNT (_stream_readable.js:1064:12)
        at _combinedTickCallback (internal/process/next_tick.js:138:11)
        at process._tickDomainCallback (internal/process/next_tick.js:218:9)
    


  • You can redirect port 80 -> 5488 and run without sudo.
    https://stackoverflow.com/a/16573737/1660996

    You can also use reverse proxy like nginx.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.