No usable sandbox with non root user



  • Hello,

    I have a jsreport server running on debian 10 with PM2.
    The server is runned by a specific user (not root).
    When I try to run generate report with chrome I get the following errors (full message at the end) :

    Failed to launch chrome!
    [0331/104625.934454:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox!
    

    After running this command everything is fine :

    sudo sysctl -w kernel.unprivileged_userns_clone=1
    

    But if I reboot my server, the error is coming back and I have to execute again the command line.

    Any clue how to make it persistent ?

    Thanks in advance for your help!

    Regards,

    Albéric

    Failed to launch chrome!
    [0331/104625.934454:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
    #0 0x557b27470e29 base::debug::CollectStackTrace()
    #1 0x557b273d4ee3 base::debug::StackTrace::StackTrace()
    #2 0x557b273e96b3 logging::LogMessage::~LogMessage()
    #3 0x557b28bcaeee service_manager::ZygoteHostImpl::Init()
    #4 0x557b2700ff6c content::ContentMainRunnerImpl::Initialize()
    #5 0x557b2705c76c service_manager::Main()
    #6 0x557b2700e541 content::ContentMain()
    #7 0x557b2705b9dd headless::(anonymous namespace)::RunContentMain()
    #8 0x557b2705b73b headless::HeadlessShellMain()
    #9 0x557b24d20218 ChromeMain
    #10 0x7faa8c2cb09b __libc_start_main
    #11 0x557b24d200aa _start
    
    Received signal 6
    #0 0x557b27470e29 base::debug::CollectStackTrace()
    #1 0x557b273d4ee3 base::debug::StackTrace::StackTrace()
    #2 0x557b274709b1 base::debug::(anonymous namespace)::StackDumpSignalHandler()
    #3 0x7faa8e760730 <unknown>
    #4 0x7faa8c2de7bb gsignal
    #5 0x7faa8c2c9535 abort
    #6 0x557b2746f815 base::debug::BreakDebugger()
    #7 0x557b273e9af9 logging::LogMessage::~LogMessage()
    #8 0x557b28bcaeee service_manager::ZygoteHostImpl::Init()
    #9 0x557b2700ff6c content::ContentMainRunnerImpl::Initialize()
    #10 0x557b2705c76c service_manager::Main()
    #11 0x557b2700e541 content::ContentMain()
    #12 0x557b2705b9dd headless::(anonymous namespace)::RunContentMain()
    #13 0x557b2705b73b headless::HeadlessShellMain()
    #14 0x557b24d20218 ChromeMain
    #15 0x7faa8c2cb09b __libc_start_main
    #16 0x557b24d200aa _start
      r8: 0000000000000000  r9: 00007ffe3806c5b0 r10: 0000000000000008 r11: 0000000000000246
     r12: 00007ffe3806d878 r13: 00007ffe3806c858 r14: 00007ffe3806d880 r15: 00007ffe3806c870
      di: 0000000000000002  si: 00007ffe3806c5b0  bp: 00007ffe3806c800  bx: 0000000000000006
      dx: 0000000000000000  ax: 0000000000000000  cx: 00007faa8c2de7bb  sp: 00007ffe3806c5b0
      ip: 00007faa8c2de7bb efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
     trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
    [end of stack trace]
    Calling _exit(1). Core file will not be generated.
    
    
    TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
    
    logs:
    +0      Starting rendering request 2 (user: agarnier)
    +1      Rendering template { name: orders-main, recipe: chrome-pdf, engine: handlebars, preview: true }
    +2      Data item not defined for this template.
    +2      Resources not defined for this template.
    +2      Executing script orders-script using http-server strategy
    +1159   Base url not specified, skipping its injection.
    +1160   Rendering engine handlebars using http-server strategy
    +1203   Compiled template not found in the cache, compiling
    +1214   Pdf utils adding group field, value: "France"
    +1214   Pdf utils adding group field, value: "Germany"
    +1224   Executing recipe chrome-pdf
    +1408   Rendering request 2 finished with error in 1408 ms
    Error: Failed to launch chrome!
    [0331/104625.934454:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
    #0 0x557b27470e29 base::debug::CollectStackTrace()
    #1 0x557b273d4ee3 base::debug::StackTrace::StackTrace()
    #2 0x557b273e96b3 logging::LogMessage::~LogMessage()
    #3 0x557b28bcaeee service_manager::ZygoteHostImpl::Init()
    #4 0x557b2700ff6c content::ContentMainRunnerImpl::Initialize()
    #5 0x557b2705c76c service_manager::Main()
    #6 0x557b2700e541 content::ContentMain()
    #7 0x557b2705b9dd headless::(anonymous namespace)::RunContentMain()
    #8 0x557b2705b73b headless::HeadlessShellMain()
    #9 0x557b24d20218 ChromeMain
    #10 0x7faa8c2cb09b __libc_start_main
    #11 0x557b24d200aa _start
    
    Received signal 6
    #0 0x557b27470e29 base::debug::CollectStackTrace()
    #1 0x557b273d4ee3 base::debug::StackTrace::StackTrace()
    #2 0x557b274709b1 base::debug::(anonymous namespace)::StackDumpSignalHandler()
    #3 0x7faa8e760730 <unknown>
    #4 0x7faa8c2de7bb gsignal
    #5 0x7faa8c2c9535 abort
    #6 0x557b2746f815 base::debug::BreakDebugger()
    #7 0x557b273e9af9 logging::LogMessage::~LogMessage()
    #8 0x557b28bcaeee service_manager::ZygoteHostImpl::Init()
    #9 0x557b2700ff6c content::ContentMainRunnerImpl::Initialize()
    #10 0x557b2705c76c service_manager::Main()
    #11 0x557b2700e541 content::ContentMain()
    #12 0x557b2705b9dd headless::(anonymous namespace)::RunContentMain()
    #13 0x557b2705b73b headless::HeadlessShellMain()
    #14 0x557b24d20218 ChromeMain
    #15 0x7faa8c2cb09b __libc_start_main
    #16 0x557b24d200aa _start
      r8: 0000000000000000  r9: 00007ffe3806c5b0 r10: 0000000000000008 r11: 0000000000000246
     r12: 00007ffe3806d878 r13: 00007ffe3806c858 r14: 00007ffe3806d880 r15: 00007ffe3806c870
      di: 0000000000000002  si: 00007ffe3806c5b0  bp: 00007ffe3806c800  bx: 0000000000000006
      dx: 0000000000000000  ax: 0000000000000000  cx: 00007faa8c2de7bb  sp: 00007ffe3806c5b0
      ip: 00007faa8c2de7bb efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
     trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
    [end of stack trace]
    Calling _exit(1). Core file will not be generated.
    
    
    TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
    
        at onClose (/home/jsreport/jsreportapp/node_modules/puppeteer/lib/Launcher.js:348:14)
        at Interface.<anonymous> (/home/jsreport/jsreportapp/node_modules/puppeteer/lib/Launcher.js:337:50)
        at Interface.emit (events.js:327:22)
        at Interface.close (readline.js:424:8)
        at Socket.onend (readline.js:202:10)
        at Socket.emit (events.js:327:22)
        at endReadableNT (internal/streams/readable.js:1327:12)
        at processTicksAndRejections (internal/process/task_queues.js:80:21)
    


  • Please try to add this to the jsreport.config.json

    "chrome": {
      "launchOptions": {
        "args": ["--no-sandbox"]
      }
    }
    


  • Thanks Jan, it's working.



  • I am using jsreport v3.1.1 and meet the same problem. I tried add "chrome": {
    "launchOptions": {
    "args": ["--no-sandbox"]
    }
    }
    to my jsreport.config.json
    but still not working.
    Any suggestion?
    Thanks a lot!
    @jan_blaha



  • @junwu-metix
    Please try to follow our installation instructions
    centos
    https://jsreport.net/learn/centos
    ubuntu
    https://jsreport.net/learn/ubuntu


Log in to reply
 

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