Description
Server Info:
CUP: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
MemTotal: 1016396 kB
OS:CentOS Linux release 7.3.1611 (Core)
Node:v8.4.0
when I try to run my app in this server, there have an error throw:
(node:29208) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to connect to chrome!
I want run Chromium which download by puppeteer manual,there have some log output:
robin@eve ~/project/memostickyserver/node_modules/puppeteer/.local-chromium/linux-494755/chrome-linux (master*) $ chrome
robin@eve ~/project/memostickyserver/node_modules/puppeteer/.local-chromium/linux-494755/chrome-linux (master*) $ ./chrome
[28268:28268:0819/223159.486750:FATAL:zygote_host_impl_linux.cc(123)] 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 0x7fd4bc6d6657 base::debug::StackTrace::StackTrace()
#1 0x7fd4bc6ea311 logging::LogMessage::~LogMessage()
#2 0x7fd4bb8db1f1 content::ZygoteHostImpl::Init()
#3 0x7fd4bb575da0 content::BrowserMainLoop::EarlyInitialization()
#4 0x7fd4bb57c4c3 content::BrowserMainRunnerImpl::Initialize()
#5 0x7fd4bb575532 content::BrowserMain()
#6 0x7fd4bc3e17fd content::ContentMainRunnerImpl::Run()
#7 0x7fd4bc3e9314 service_manager::Main()
#8 0x7fd4bc3e0462 content::ContentMain()
#9 0x7fd4bb020b74 ChromeMain
#10 0x7fd4b3da2b35 __libc_start_main
#11 0x7fd4bb0209d0Received signal 6
#0 0x7fd4bc6d6657 base::debug::StackTrace::StackTrace()
#1 0x7fd4bc6d61cf base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7fd4ba04d370
#3 0x7fd4b3db61d7 __GI_raise
#4 0x7fd4b3db78c8 __GI_abort
#5 0x7fd4bc6d5202 base::debug::BreakDebugger()
#6 0x7fd4bc6ea7cc logging::LogMessage::~LogMessage()
#7 0x7fd4bb8db1f1 content::ZygoteHostImpl::Init()
#8 0x7fd4bb575da0 content::BrowserMainLoop::EarlyInitialization()
#9 0x7fd4bb57c4c3 content::BrowserMainRunnerImpl::Initialize()
#10 0x7fd4bb575532 content::BrowserMain()
#11 0x7fd4bc3e17fd content::ContentMainRunnerImpl::Run()
#12 0x7fd4bc3e9314 service_manager::Main()
#13 0x7fd4bc3e0462 content::ContentMain()
#14 0x7fd4bb020b74 ChromeMain
#15 0x7fd4b3da2b35 __libc_start_main
#16 0x7fd4bb0209d0
r8: 00007fff21b42080 r9: 0000000000000395 r10: 0000000000000008 r11: 0000000000000206
r12: 00007fff21b424e0 r13: 000000000000016d r14: 00007fff21b424d8 r15: 00007fff21b424d0
di: 0000000000006e6c si: 0000000000006e6c bp: 00007fff21b42080 bx: 00007fff21b42080
dx: 0000000000000006 ax: 0000000000000000 cx: ffffffffffffffff sp: 00007fff21b41ed8
ip: 00007fd4b3db61d7 efl: 0000000000000206 cgf: 0000000000000033 erf: 0000000000000000
trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.
robin@eve ~/project/memostickyserver/node_modules/puppeteer/.local-chromium/linux-494755/chrome-linux (master*) $ ./chrome --no-sandbox
[0819/223234.158902:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
pls help,how to fix this ?
Activity
Garbee commentedon Aug 19, 2017
Right in the error output. Did you go to the referenced page and read what it says about the problem and how to address it?
rlog commentedon Aug 20, 2017
@Garbee Thanks to replay
yes,I read that page and try:
get some other error:
paambaati commentedon Aug 20, 2017
@rlog Looks like a missing dependency. Are you sure you've installed all the dependencies listed here?
rlog commentedon Aug 20, 2017
@paambaati I'm trying to install all this dependencies on centos 7, but nothing new install:
Garbee commentedon Aug 21, 2017
You need to convert the package names to be RHEL names. Those are only the Debian names.
rlog commentedon Aug 21, 2017
@Garbee I don't know how to convert, google them one by one ...?
Garbee commentedon Aug 21, 2017
That or grab an RPM copy of the installer and use software management tools to look at what the dependencies of the package are.
theoutlander commentedon Aug 23, 2017
Having a similar issue. Here's what I discovered:
[root@li583-175 chrome-linux]# ldd chrome | more
linux-vdso.so.1 => (0x00007ffcd3ee4000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f55baf90000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f55bad8c000)
librt.so.1 => /lib64/librt.so.1 (0x00007f55bab83000)
libpangocairo-1.0.so.0 => not found
libpango-1.0.so.0 => not found
libcairo.so.2 => not found
libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f55ba932000)
libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f55ba5fb000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f55ba2bc000)
libX11-xcb.so.1 => /lib64/libX11-xcb.so.1 (0x00007f55ba0ba000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f55b9e98000)
libXcomposite.so.1 => not found
libXcursor.so.1 => not found
libXdamage.so.1 => not found
libXext.so.6 => not found
libXfixes.so.3 => not found
libXi.so.6 => not found
libXrender.so.1 => not found
libXtst.so.6 => not found
libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00007f55b9c91000)
libnss3.so => /lib64/libnss3.so (0x00007f55b9966000)
libnssutil3.so => /lib64/libnssutil3.so (0x00007f55b9739000)
libsmime3.so => /lib64/libsmime3.so (0x00007f55b9512000)
libnspr4.so => /lib64/libnspr4.so (0x00007f55b92d3000)
libcups.so.2 => not found
libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f55b90a9000)
libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x00007f55b8e6b000)
libdbus-1.so.3 => /lib64/libdbus-1.so.3 (0x00007f55b8c23000)
libXss.so.1 => not found
libXrandr.so.2 => not found
libgconf-2.so.4 => not found
libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x00007f55b88a2000)
libasound.so.2 => /lib64/libasound.so.2 (0x00007f55b85a9000)
libm.so.6 => /lib64/libm.so.6 (0x00007f55b82a7000)
libatk-1.0.so.0 => not found
libgtk-3.so.0 => not found
libgdk-3.so.0 => not found
libgdk_pixbuf-2.0.so.0 => not found
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f55b808f000)
libc.so.6 => /lib64/libc.so.6 (0x00007f55b7cce000)
/lib64/ld-linux-x86-64.so.2 (0x000055a8c8793000)
libffi.so.6 => /lib64/libffi.so.6 (0x00007f55b7ac6000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f55b78c1000)
libplc4.so => /lib64/libplc4.so (0x00007f55b76bc000)
libplds4.so => /lib64/libplds4.so (0x00007f55b74b8000)
libfreetype.so.6 => /lib64/libfreetype.so.6 (0x00007f55b7211000)
libz.so.1 => /lib64/libz.so.1 (0x00007f55b6ffb000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f55b6dd3000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f55b6bb9000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f55b6957000)
I had installed one of the missing packages manually, but it still doesn't find it. I can see that particular package under /usr/lib/libpangocairo-1.0.so.0.
historylife commentedon Aug 24, 2017
So bottom of line , puppeteer can not work on centos !
theoutlander commentedon Aug 24, 2017
Here's another issue I'm running into when trying on Docker Centos7:
[root@3dd3c09a9d40 opt]# npm install -g puppeteer
Download failed: EACCES: permission denied, mkdir '/usr/lib/node_modules/puppeteer/.local-chromium'
added 36 packages in 2.437s
I'm running as root. Not sure if that's the issue. I've changed ownership on that folder path. Even tried to create that folder manually and tried with sudo, yet I get that same error repeatedly.
liulangyu90316 commentedon Aug 24, 2017
@rlog try install fonts?
yum install ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc -y
theoutlander commentedon Aug 24, 2017
Tried it in Ubuntu on Docker and got a similar message:
root@6c5ca63ee50a:/opt/node_modules/puppeteer/.local-chromium/linux-494755/chrome-linux# ./chrome
./chrome: error while loading shared libraries: libpangocairo-1.0.so.0: cannot open shared object file: No such file or directory
root@6c5ca63ee50a:/opt/node_modules/puppeteer/.local-chromium/linux-494755/chrome-linux# ldd ./chrome
linux-vdso.so.1 => (0x00007fffd9a6f000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f74809c4000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f74807c0000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f74805b8000)
libpangocairo-1.0.so.0 => not found
libpango-1.0.so.0 => not found
libcairo.so.2 => not found
libgobject-2.0.so.0 => not found
libglib-2.0.so.0 => not found
libX11.so.6 => not found
libX11-xcb.so.1 => not found
libxcb.so.1 => not found
libXcomposite.so.1 => not found
libXcursor.so.1 => not found
libXdamage.so.1 => not found
libXext.so.6 => not found
libXfixes.so.3 => not found
libXi.so.6 => not found
libXrender.so.1 => not found
libXtst.so.6 => not found
libgmodule-2.0.so.0 => not found
libnss3.so => not found
libnssutil3.so => not found
libsmime3.so => not found
libnspr4.so => not found
libcups.so.2 => not found
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f748038f000)
libfontconfig.so.1 => not found
libdbus-1.so.3 => not found
libXss.so.1 => not found
libXrandr.so.2 => not found
libgconf-2.so.4 => not found
libgio-2.0.so.0 => not found
libasound.so.2 => not found
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7480086000)
libatk-1.0.so.0 => not found
libgtk-3.so.0 => not found
libgdk-3.so.0 => not found
libgdk_pixbuf-2.0.so.0 => not found
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f747fe70000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f747faa6000)
/lib64/ld-linux-x86-64.so.2 (0x00007f74887de000)
root@6c5ca63ee50a:/opt/node_modules/puppeteer/.local-chromium/linux-494755/chrome-linux#
101 remaining items