Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium fails to start inside docker container #879

Closed
cliff-wakefield-acurus opened this issue May 14, 2024 · 5 comments
Closed

Chromium fails to start inside docker container #879

cliff-wakefield-acurus opened this issue May 14, 2024 · 5 comments

Comments

@cliff-wakefield-acurus
Copy link

When the container starts up with -- or when the first invocation against Chromium occurs I get the following, this seems to happen for 8.x and 8.5.x

[FATAL] starting chromium: launch supervisor: start process: run exec allocator: chrome failed to start:
[0514/070136.832582:FATAL:spawn_subprocess.cc(237)] posix_spawn /opt/google/chrome/chrome_crashpad_handler: Operation not permitted (1)
[0514/070137.324653:WARNING:spawn_subprocess.cc(262)] intermediate process terminated by signal 5 (Trace/breakpoint trap) (core dumped)

The rest of the startup seems normal


  _____     __           __
 / ___/__  / /____ ___  / /  ___ _______ _
/ (_ / _ \/ __/ -_) _ \/ _ \/ -_) __/ _ '/
\___/\___/\__/\__/_//_/_.__/\__/_/  \_, /
                                   /___/

A Docker-powered stateless API for PDF files.
Version: 8.5.0
-------------------------------------------------------
[SYSTEM] modules: api chromium exiftool libreoffice libreoffice-api libreoffice-pdfengine logging pdfcpu pdfengines pdftk prometheus qpdf webhook
[SYSTEM] libreoffice-api: LibreOffice ready to start
[SYSTEM] prometheus: collecting metrics
[SYSTEM] pdfengines: exiftool libreoffice-pdfengine pdfcpu pdftk qpdf

Have tried this under

  • Ubuntu 16.04 and Docker v20.x.x
  • Ubuntu 20.04 and Docker v26.1.1

The container is simply started using Docker compose

services:
  gotenberg1:
    container_name: gotenberg1
    image: gotenberg/gotenberg:8
    command:
      - gotenberg
      - --chromium-auto-start 

I have no idea where to start to debug this, really wanted to move from AthenaPDF to Gotenberg but the only place I can get it to run is on my Macbook Pro (M1 Max).

@gulien
Copy link
Collaborator

gulien commented May 14, 2024

Hey @cliff-wakefield-acurus 👋

I wonder if your Ubuntu versions are not "too old". Could you try on 24.04?

@christianmittler
Copy link

I actually have a similar problem, when I try to deploy gotenberg to Heroku or DigitalOcean, the deployment fails with the following error message:

[FATAL] provision module api: get routers: provision module chromium: CHROMIUM_BIN_PATH environment variable is not set

@cliff-wakefield-acurus
Copy link
Author

Hey @cliff-wakefield-acurus 👋

I wonder if your Ubuntu versions are not "too old". Could you try on 24.04?

I am not able to change the OS used by our production environment anytime soon.

The theory of a docker container is that it has all of its dependencies bundled within it, so the outer operating systems just needs to be able to run docker itself.

I can try it on Ubuntu 22.04 or 24.04 but if it works I am not sure how that helps me resolve or track down the issue.

@cliff-wakefield-acurus
Copy link
Author

Ok created clean VMs based on Ubuntu cloud images for 16.04, 18.04, 20.04, 22.04 and 24.04.

Installed docker from the official Docker apt repositories, except for 16.04 where I had to use the Ubuntu apt repositories.

Ran the same docker-compose.yml on all of them, all seemed to work except for 16.04 which still gets

gotenberg_1  |
gotenberg_1  |   _____     __           __
gotenberg_1  |  / ___/__  / /____ ___  / /  ___ _______ _
gotenberg_1  | / (_ / _ \/ __/ -_) _ \/ _ \/ -_) __/ _ '/
gotenberg_1  | \___/\___/\__/\__/_//_/_.__/\__/_/  \_, /
gotenberg_1  |                                    /___/
gotenberg_1  |
gotenberg_1  | A Docker-powered stateless API for PDF files.
gotenberg_1  | Version: 8.5.0
gotenberg_1  | -------------------------------------------------------
gotenberg_1  | [SYSTEM] modules: api chromium exiftool libreoffice libreoffice-api libreoffice-pdfengine logging pdfcpu pdfengines pdftk prometheus qpdf webhook
gotenberg_1  | [SYSTEM] libreoffice-api: LibreOffice ready to start
gotenberg_1  | [SYSTEM] prometheus: collecting metrics
gotenberg_1  | [SYSTEM] pdfengines: exiftool libreoffice-pdfengine pdfcpu pdftk qpdf
gotenberg_1  | [FATAL] starting chromium: launch supervisor: start process: run exec allocator: chrome failed to start:
gotenberg_1  | [0517/025433.125110:FATAL:spawn_subprocess.cc(237)] posix_spawn /opt/google/chrome/chrome_crashpad_handler: Operation not permitted (1)
gotenberg_1  | [0517/025433.336253:WARNING:spawn_subprocess.cc(262)] intermediate process terminated by signal 5 (Trace/breakpoint trap) (core dumped)
gotenberg_1  |
ubuntu_gotenberg_1 exited with code 1

@gulien
Copy link
Collaborator

gulien commented May 17, 2024

👍 nothing much I can do on my side.

It's either: the Docker version or the kernel that is too old (or both).

@gulien gulien closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants