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

kuberoapp-web container wont start #186

Open
NenoxAG opened this issue Jul 22, 2023 · 3 comments
Open

kuberoapp-web container wont start #186

NenoxAG opened this issue Jul 22, 2023 · 3 comments

Comments

@NenoxAG
Copy link

NenoxAG commented Jul 22, 2023

Hi,

when I try to use a pipeline everything works (ssl, ingress, ...) except the "kuberoapp-web" container. It throws an error and restarts all the time.

Here is the log of the kuberoapp-web container:

/usr/lib/python3.8/site-packages/supervisor/options.py:470: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  self.warnings.warn(
Traceback (most recent call last):
  File "/usr/bin/supervisord", line 11, in <module>
    load_entry_point('supervisor==4.1.0', 'console_scripts', 'supervisord')()
  File "/usr/lib/python3.8/site-packages/supervisor/supervisord.py", line 358, in main
    go(options)
  File "/usr/lib/python3.8/site-packages/supervisor/supervisord.py", line 368, in go
    d.main()
  File "/usr/lib/python3.8/site-packages/supervisor/supervisord.py", line 70, in main
    self.options.make_logger()
  File "/usr/lib/python3.8/site-packages/supervisor/options.py", line 1466, in make_logger
    loggers.handle_file(
  File "/usr/lib/python3.8/site-packages/supervisor/loggers.py", line 417, in handle_file
    handler = RotatingFileHandler(filename, 'a', maxbytes, backups)
  File "/usr/lib/python3.8/site-packages/supervisor/loggers.py", line 213, in __init__
    FileHandler.__init__(self, filename, mode)
  File "/usr/lib/python3.8/site-packages/supervisor/loggers.py", line 160, in __init__
    self.stream = open(filename, mode)
OSError: [Errno 30] Read-only file system: '/app/supervisord.log'
@mms-gianni
Copy link
Member

Your container requires write access.

Turn on the "advanced app Configuration " toggle.

The switch off "read only root filesystem" toggle in the security tab.

@mms-gianni
Copy link
Member

Another option is to turn off the logging option of supervisor.d

Or add a writable mount (i personally would not recommend that)

@NenoxAG
Copy link
Author

NenoxAG commented Jul 22, 2023

I have already tried that but that results in the same error. I have investigated this a bit and think it has to do with the fact that supervisord wants to log to the /app directory and that is not possible using the static buildpack because it mounts to that location read-only.

static-run:
    container_name: "static-run"
    image:  caddy:latest
    working_dir: /app
    #command: supervisord
    #command: caddy file-server --listen :8080 --root /app/public
    command: './init-web.sh'
    volumes:
      - ../../data:/app:ro <--
    ports:
      - "8004:80"
    depends_on:
      static-build:
        condition: service_completed_successfully

What i have tried already is to move the logging to another folder using -l /tmp/supervisord.log in the Run Command section. Then there is an error that is complaining about it not being able to write the supervisord.pid to the app directory. This i fixed using the -j /tmp/supervisord.pid argument.

After adding those two arguments nginx is finally starting but for some odd reason the console output is the following and it is in a crash loop:

2023-07-22 17:01:32,342 INFO spawned: 'nginxd' with pid 61
-> Executing /opt/docker/bin/service.d/nginx.d//10-init.sh
2023-07-22 17:01:32,350 INFO success: nginxd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
nginx: [emerg] host not found in upstream "<PHP_SOCKET>" in /opt/docker/etc/nginx/conf.d/10-php.conf:2
2023-07-22 17:01:32,356 INFO exited: nginxd (exit status 1; not expected)

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

2 participants