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/] Running as root without --no-sandbox is not supported. See
        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.

    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.