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

ERROR: FPM initialization failed #1963

Open
quick-tutoriel opened this issue Mar 21, 2023 · 6 comments
Open

ERROR: FPM initialization failed #1963

quick-tutoriel opened this issue Mar 21, 2023 · 6 comments
Labels
docker containers & cloud feedback needed support installation and configuration issues

Comments

@quick-tutoriel
Copy link

Bonjour,

Voici le message que j'ai en permanence dans les logs avec la dernier version de l'image docker de Shaarli (v0.12.2):

[21-Mar-2023 20:12:44] ERROR: Another FPM instance seems to already listen on /var/run/php-fpm.sock
[21-Mar-2023 20:12:45] ERROR: FPM initialization failed
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
[21-Mar-2023 20:12:45] ERROR: Another FPM instance seems to already listen on /var/run/php-fpm.sock
[21-Mar-2023 20:12:45] ERROR: FPM initialization failed
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
[21-Mar-2023 20:12:46] ERROR: Another FPM instance seems to already listen on /var/run/php-fpm.sock
[21-Mar-2023 20:12:46] ERROR: FPM initialization failed
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] still could not bind()
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
[21-Mar-2023 20:12:47] ERROR: Another FPM instance seems to already listen on /var/run/php-fpm.sock
[21-Mar-2023 20:12:47] ERROR: FPM initialization failed

Je ne comprends pas pourquoi et comment résoudre ce problème.
Cependant l'application a l'air de fonctionner correctement.
D'avance merci pour votre aide.

@nodiscc
Copy link
Member

nodiscc commented Mar 23, 2023

Hi, so that everyone can contribute to the discussion, please report issues in English (https://www.deepl.com/translator is quite good if you are not comfortable writing in English), merci d'avance!

Please post the full installation steps you followed.

It looks like Shaarli is trying to bind to port 80 on the host (I assume you used --publish 8000:80) but another service is already bound to this port. If you have multiple services running on the same host, the usual solution is to not bind them to port 80, and instead use a reverse proxy that will bind to port 80/443, and forward requests to the appropriate container/service/php-fpm pool.

https://docs.docker.com/engine/reference/commandline/run/#publish

E.g. docker run [...] --publish 127.0.0.1:8000:8000, and configure your reverse proxy for forward requests with Host: shaarli.example.org header, to 127.0.0.1:8000.

@nodiscc nodiscc added the support installation and configuration issues label Mar 23, 2023
@nodiscc nodiscc added this to the backlog to the future milestone Mar 23, 2023
@quick-tutoriel
Copy link
Author

quick-tutoriel commented Mar 23, 2023

Hello,

thank you for your answer.

Here is my docker-compose file that I use :

version: '3'
services:
  shaarli:
    container_name: shaarli
    image: ghcr.io/shaarli/shaarli:latest
    restart: unless-stopped
    environment:
      - TZ=Europe/Paris
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /opt/containers/shaarli/shaarli-data:/var/www/shaarli/data
      - /opt/containers/shaarli/shaarli-cache:/var/www/shaarli/cache
    networks:
      - proxy
    labels:
      - traefik.enable=true
      - traefik.http.routers.shaarli.entrypoints=http
      - traefik.http.routers.shaarli.rule=Host(`shaarli.monsite.fr`)
      - traefik.http.middlewares.shaarli-https-redirect.redirectscheme.scheme=https
      - traefik.http.routers.shaarli.middlewares=shaarli-https-redirect
      - traefik.http.routers.shaarli-secure.entrypoints=https
      - traefik.http.routers.shaarli-secure.rule=Host(`shaarli.monsite.fr`)
      - traefik.http.routers.shaarli-secure.tls=true
      - traefik.http.routers.shaarli-secure.tls.certresolver=http
      - traefik.http.routers.shaarli-secure.service=shaarli
      - traefik.http.services.shaarli.loadbalancer.server.port=80
networks:
  proxy:
    external: true

Thank you for your help.

@nodiscc nodiscc added the docker containers & cloud label Mar 24, 2023
@ArthurHoaro
Copy link
Member

Is it possible that you already have a Shaarli instance running, and that you try to start the new one without stopping the previous one?

What do you have with docker ps -a?

@quick-tutoriel
Copy link
Author

Hello,
no I don't have any other instances of shaarli running.
thank you for your help

shaarli

@ArthurHoaro
Copy link
Member

Thanks for the quick update!

I'm a little confused by 2 things:

  • where is this error coming from?
  • the running Shaarli container's image is not the same as the one in the docker-compose file (ghcr.io)

Could you share a step by step reproduction of your issue, so we can help?

@nodiscc
Copy link
Member

nodiscc commented Mar 10, 2024

Hi @quick-tutoriel any news regarding this issue? Were you able to resolve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker containers & cloud feedback needed support installation and configuration issues
Projects
None yet
Development

No branches or pull requests

3 participants