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

s6-overlay-suexec: fatal: can only run as pid 1 #165

Open
sglebs opened this issue Jan 3, 2024 · 4 comments
Open

s6-overlay-suexec: fatal: can only run as pid 1 #165

sglebs opened this issue Jan 3, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@sglebs
Copy link

sglebs commented Jan 3, 2024

Summary

When deploying to Railway.app I get:

s6-overlay-suexec: fatal: can only run as pid 1 

Steps to reproduce

Deploy to Railway.app

What is the expected correct behavior?

Locally/docker:

2024-01-03.20:11:59 [NOTICE] ** [monitoring] Container configured for monitoring with 'zabbix modern'
2024-01-03.20:11:59 [NOTICE] ** [scheduling] Container configured for scheduled tasks with 'cron'
2024-01-03.20:11:59 [NOTICE] ** [messaging] Container configured to route mail via SMTP to 'postfix-relay'
2024-01-03.20:11:59 [NOTICE] ** [php-fpm] Creating sample index.php
2024-01-03.20:12:00 [WARN] ** [freescout] Potential New Installation / Standalone Installation Detected - Copying Freescout Sourcecode
2024-01-03.20:12:00 [WARN] ** [freescout] Detected /data directory. Persistently saving settings/sessions/cache/uploads/modules
2024-01-03.20:12:02 [INFO] ** [freescout] Auto Configuring based on Environment Variables
2024-01-03.20:12:07 [WARN] ** [freescout] Installing Modules into container
Cache cleared successfully.
2024-01-03.20:12:17 [INFO] ** [freescout] Initialization Complete. Please visit http://localhost.foo.ai:8888 and login with your credentials..
2024-01-03.20:12:17 [STARTING] ** [nginx] [1] Starting nginx 1.25.3
2024-01-03.20:12:17 [STARTING] ** [monitoring] [1] Starting Zabbix Agent (modern) 6.4.10
2024-01-03.20:12:17 [STARTING] ** [php-fpm] [1] Starting php-fpm 8.2.14
2024-01-03.20:12:17 [STARTING] ** [scheduling] [1] Starting cron

Relevant logs and/or screenshots

This is what I found that is relevant: NginxProxyManager/nginx-proxy-manager#2765

It seems to be related to /init

Environment

ARG PHP_VERSION=8.2
ARG DISTRO="alpine"

FROM docker.io/tiredofit/nginx-php-fpm:${PHP_VERSION}-${DISTRO}

Possible fixes

I tried this:

# MQM for Railway.app https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2765
ENTRYPOINT ["exec", "/init"]

But it did not fix it.

@sglebs sglebs added the bug Something isn't working label Jan 3, 2024
@tiredofit
Copy link
Owner

This image is designed to be run as root - Are you doing anything that would change the user context like user name spaces?

I'm available for custom development to make it NOT work this way.

@sglebs
Copy link
Author

sglebs commented Jan 3, 2024

I just deployed to Railway.app, which is an inexpensive cloud platform (like a mini heroku) and does not require expensive DevOps talent. Perhaps they do some wrapping that exposes this issue?

I can also try fly.io, which is another cloud platform for poor folks like me . I will update it here.

@matharvard
Copy link

matharvard commented May 22, 2024

I tried deploying to Dokku both with a custom Dockerfile and through Dokku's image deployment feature and got the same error: s6-overlay-suexec: fatal: can only run as pid 1. I'm still tinkering with it and will update if I make any progress, otherwise I'll likely just try and run it directly on Docker.

Update: I was able to get it working after changing this option through Dokku: dokku scheduler-docker-local:set <APP_NAME> init-process false.

@1cec0ld
Copy link

1cec0ld commented Jun 6, 2024

I have a relatively surface level understanding of Dokku, but can confirm that deploying via dokku git:from-image <app_name> docker.io/tiredofit/freescout:latest had the same error as above, and was fixed with the same command @matharvard entered. Thank you!

Edit: It may not have completed Initialization steps, however, as I look in the docker logs and it says 30-freescout did not pass completion check.
Edit edit: May be my fault for not setting all the environment variables before trying to run it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants