linuxserver / docker-healthchecks

GNU General Public License v3.0
177 stars 37 forks source link

[BUG] image does not start, prints realpath() of uwsgi.ini failed: No such file or directory [core/utils.c line 3662] #110

Closed danieldietsch closed 10 months ago

danieldietsch commented 10 months ago

Is there an existing issue for this?

Current Behavior

Image does not start, prints realpath() of uwsgi.ini failed: No such file or directory [core/utils.c line 3662]

Expected Behavior

Image should start.

Steps To Reproduce

  1. Run linuxserver/healthchecks:3.0.1 with default settings.
  2. Observe realpath() of uwsgi.ini failed: No such file or directory [core/utils.c line 3662]

Environment

- OS: Debian 12
- How docker service was installed: disto's packagemanager

CPU architecture

x86-64

Docker creation

yaml
---
version: "2.1"
services:
  healthchecks:
    image: linuxserver/healthchecks:3.0.1
    container_name: ...
    environment:
      - PUID=${HEALTHCHECKS_PUID}
      - PGID=${HEALTHCHECKS_PGID}
      - SITE_ROOT=${HEALTHCHECKS_SITE_ROOT}
      - SITE_NAME=${HEALTHCHECKS_SITE_NAME}
      - DEFAULT_FROM_EMAIL=${HEALTHCHECKS_DEFAULT_FROM_EMAIL}
      - EMAIL_HOST=${HEALTHCHECKS_EMAIL_HOST}
      - EMAIL_PORT=${HEALTHCHECKS_EMAIL_PORT}
      - EMAIL_USE_TLS=${HEALTHCHECKS_EMAIL_USE_TLS}
      - ALLOWED_HOSTS="[*]"
      - SUPERUSER_EMAIL=${HEALTHCHECKS_SUPERUSER_EMAIL}
      - SUPERUSER_PASSWORD=${HEALTHCHECKS_SUPERUSER_PASSWORD}
      - FORCE_HTTPS=False
      - DEBUG=True
      - REGENERATE_SETTINGS=True
    volumes:
      - ...:/config
    restart: unless-stopped
    networks:
      - proxy
      - mail
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.healthchecks.rule=Host(`...`)"
      - "traefik.http.services.healthchecks.loadbalancer.server.port=8000"

networks:
  proxy:
    external: true
  mail:
    external: true

### Container logs

```bash
Attaching to healthchecks
healthchecks | [migrations] started
healthchecks | [migrations] no migrations found
healthchecks | ───────────────────────────────────────
healthchecks |
healthchecks |       ██╗     ███████╗██╗ ██████╗
healthchecks |       ██║     ██╔════╝██║██╔═══██╗
healthchecks |       ██║     ███████╗██║██║   ██║
healthchecks |       ██║     ╚════██║██║██║   ██║
healthchecks |       ███████╗███████║██║╚██████╔╝
healthchecks |       ╚══════╝╚══════╝╚═╝ ╚═════╝
healthchecks |
healthchecks |    Brought to you by linuxserver.io
healthchecks | ───────────────────────────────────────
healthchecks |
healthchecks | To support LSIO projects visit:
healthchecks | https://www.linuxserver.io/donate/
healthchecks |
healthchecks | ───────────────────────────────────────
healthchecks | GID/UID
healthchecks | ───────────────────────────────────────
healthchecks |
healthchecks | User UID:    1000
healthchecks | User GID:    1000
healthchecks | ───────────────────────────────────────
healthchecks |
healthchecks | WARNING: CSRF_TRUSTED_ORIGINS is set to allow connections from all origins, this is insecure.
healthchecks | Migrations for 'api':
healthchecks |   hc/api/migrations/0101_alter_channel_kind.py
healthchecks |     - Alter field kind on channel
healthchecks | Migrations for 'payments':
healthchecks |   hc/payments/migrations/0009_remove_subscription_next_billing_date_and_more.py
healthchecks |     - Remove field next_billing_date from subscription
healthchecks |     - Remove field renew_notice_date from subscription
healthchecks |     - Remove field setup_date from subscription
healthchecks | Admin Command Error: ./manage.py makemigrations
healthchecks | Traceback (most recent call last):
healthchecks |   File "/app/healthchecks/./manage.py", line 13, in <module>
healthchecks |     execute_from_command_line(sys.argv)
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
healthchecks |     utility.execute()
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
healthchecks |     self.fetch_command(subcommand).run_from_argv(self.argv)
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
healthchecks |     self.execute(*args, **cmd_options)
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
healthchecks |     output = self.handle(*args, **options)
healthchecks |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/base.py", line 106, in wrapper
healthchecks |     res = handle_func(*args, **kwargs)
healthchecks |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/commands/makemigrations.py", line 259, in handle
healthchecks |     self.write_migration_files(changes)
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/commands/makemigrations.py", line 363, in write_migration_files
healthchecks |     with open(writer.path, "w", encoding="utf-8") as fh:
healthchecks |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
healthchecks | PermissionError: [Errno 13] Permission denied: '/app/healthchecks/hc/payments/migrations/0009_remove_subscription_next_billing_date_and_more.py'
healthchecks | Traceback (most recent call last):
healthchecks |   File "/app/healthchecks/./manage.py", line 17, in <module>
healthchecks |     raise e
healthchecks |   File "/app/healthchecks/./manage.py", line 13, in <module>
healthchecks |     execute_from_command_line(sys.argv)
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
healthchecks |     utility.execute()
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
healthchecks |     self.fetch_command(subcommand).run_from_argv(self.argv)
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
healthchecks |     self.execute(*args, **cmd_options)
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
healthchecks |     output = self.handle(*args, **options)
healthchecks |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/base.py", line 106, in wrapper
healthchecks |     res = handle_func(*args, **kwargs)
healthchecks |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/commands/makemigrations.py", line 259, in handle
healthchecks |     self.write_migration_files(changes)
healthchecks |   File "/lsiopy/lib/python3.11/site-packages/django/core/management/commands/makemigrations.py", line 363, in write_migration_files
healthchecks |     with open(writer.path, "w", encoding="utf-8") as fh:
healthchecks |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
healthchecks | PermissionError: [Errno 13] Permission denied: '/app/healthchecks/hc/payments/migrations/0009_remove_subscription_next_billing_date_and_more.py'
healthchecks | Operations to perform:
healthchecks |   Apply all migrations: accounts, admin, api, auth, contenttypes, payments, sessions
healthchecks | Running migrations:
healthchecks |   Applying contenttypes.0001_initial... OK
healthchecks |   Applying auth.0001_initial... OK
healthchecks |   Applying accounts.0001_initial... OK
healthchecks |   Applying accounts.0002_profile_ping_log_limit... OK
healthchecks |   Applying accounts.0003_profile_token... OK
healthchecks |   Applying accounts.0004_profile_api_key... OK
healthchecks |   Applying accounts.0005_auto_20160509_0801... OK
healthchecks |   Applying accounts.0006_profile_current_team... OK
healthchecks |   Applying accounts.0007_profile_check_limit... OK
healthchecks |   Applying accounts.0008_profile_bill_to... OK
healthchecks |   Applying accounts.0009_auto_20170714_1734... OK
healthchecks |   Applying accounts.0010_profile_team_limit... OK
healthchecks |   Applying accounts.0011_profile_sort... OK
healthchecks |   Applying accounts.0012_auto_20171014_1002... OK
healthchecks |   Applying accounts.0013_remove_profile_team_access_allowed... OK
healthchecks |   Applying accounts.0014_auto_20171227_1530... OK
healthchecks |   Applying accounts.0015_auto_20181029_1858... OK
healthchecks |   Applying accounts.0016_remove_profile_bill_to... OK
healthchecks |   Applying accounts.0017_auto_20190112_1426... OK
healthchecks |   Applying accounts.0018_auto_20190112_1426... OK
healthchecks |   Applying accounts.0019_project_badge_key... OK
healthchecks |   Applying accounts.0020_auto_20190112_1950... OK
healthchecks |   Applying accounts.0021_auto_20190112_2005... OK
healthchecks |   Applying accounts.0022_auto_20190114_0857... OK
healthchecks |   Applying accounts.0023_auto_20190117_1419... OK
healthchecks |   Applying accounts.0024_auto_20190119_1540... OK
healthchecks |   Applying accounts.0025_remove_member_team... OK
healthchecks |   Applying accounts.0026_auto_20190204_2042... OK
healthchecks |   Applying accounts.0027_profile_deletion_notice_date... OK
healthchecks |   Applying accounts.0028_auto_20191119_1346... OK
healthchecks |   Applying accounts.0029_remove_profile_current_project... OK
healthchecks |   Applying accounts.0030_member_transfer_request_date... OK
healthchecks |   Applying accounts.0031_auto_20200803_1413... OK
healthchecks |   Applying accounts.0032_auto_20200819_0757... OK
healthchecks |   Applying accounts.0033_member_rw... OK
healthchecks |   Applying accounts.0034_credential... OK
healthchecks |   Applying accounts.0035_profile_reports... OK
healthchecks |   Applying accounts.0036_fill_profile_reports... OK
healthchecks |   Applying accounts.0037_profile_tz... OK
healthchecks |   Applying accounts.0038_profile_theme... OK
healthchecks |   Applying accounts.0039_remove_profile_reports_allowed... OK
healthchecks |   Applying accounts.0040_auto_20210722_1244... OK
healthchecks |   Applying accounts.0041_fill_role... OK
healthchecks |   Applying accounts.0042_remove_member_rw... OK
healthchecks |   Applying accounts.0043_add_role_manager... OK
healthchecks |   Applying accounts.0044_auto_20210730_0942... OK
healthchecks |   Applying accounts.0045_auto_20210908_1257... OK
healthchecks |   Applying accounts.0046_profile_deletion_scheduled_date... OK
healthchecks |   Applying accounts.0047_profile_over_limit_date... OK
healthchecks |   Applying accounts.0048_alter_profile_user... OK
healthchecks |   Applying admin.0001_initial... OK
healthchecks |   Applying admin.0002_logentry_remove_auto_add... OK
healthchecks |   Applying admin.0003_logentry_add_action_flag_choices... OK
healthchecks |   Applying api.0001_initial... OK
healthchecks |   Applying api.0002_auto_20150616_0732... OK
healthchecks |   Applying api.0003_auto_20150616_1249... OK
healthchecks |   Applying api.0004_auto_20150616_1319... OK
healthchecks |   Applying api.0005_auto_20150630_2021... OK
healthchecks |   Applying api.0006_check_grace... OK
healthchecks |   Applying api.0007_ping... OK
healthchecks |   Applying api.0008_auto_20150801_1213... OK
healthchecks |   Applying api.0009_auto_20150801_1250... OK
healthchecks |   Applying api.0010_channel... OK
healthchecks |   Applying api.0011_notification... OK
healthchecks |   Applying api.0012_auto_20150930_1922... OK
healthchecks |   Applying api.0013_auto_20151001_2029... OK
healthchecks |   Applying api.0014_auto_20151019_2039... OK
healthchecks |   Applying api.0015_auto_20151022_1008... OK
healthchecks |   Applying api.0016_auto_20151030_1107... OK
healthchecks |   Applying api.0017_auto_20151117_1032... OK
healthchecks |   Applying api.0018_remove_ping_body... OK
healthchecks |   Applying api.0019_check_tags... OK
healthchecks |   Applying api.0020_check_n_pings... OK
healthchecks |   Applying api.0021_ping_n... OK
healthchecks |   Applying api.0022_auto_20160130_2042... OK
healthchecks |   Applying api.0023_auto_20160131_1919... OK
healthchecks |   Applying api.0024_auto_20160203_2227... OK
healthchecks |   Applying api.0025_auto_20160216_1214... OK
healthchecks |   Applying api.0026_auto_20160415_1824... OK
healthchecks |   Applying api.0027_auto_20161213_1059... OK
healthchecks |   Applying api.0028_auto_20170305_1907... OK
healthchecks |   Applying api.0029_auto_20170507_1251... OK
healthchecks |   Applying api.0030_check_last_ping_body... OK
healthchecks |   Applying api.0031_auto_20170509_1320... OK
healthchecks |   Applying api.0032_auto_20170608_1158... OK
healthchecks |   Applying api.0033_auto_20170714_1715... OK
healthchecks |   Applying api.0034_auto_20171227_1530... OK
healthchecks |   Applying api.0035_auto_20171229_2008... OK
healthchecks |   Applying api.0036_auto_20180116_2243... OK
healthchecks |   Applying api.0037_auto_20180127_1215... OK
healthchecks |   Applying api.0038_auto_20180318_1306... OK
healthchecks |   Applying api.0039_remove_check_last_ping_body... OK
healthchecks |   Applying api.0040_auto_20180517_1336... OK
healthchecks |   Applying api.0041_check_desc... OK
healthchecks |   Applying api.0042_auto_20181029_1522... OK
healthchecks |   Applying api.0043_channel_name... OK
healthchecks |   Applying api.0044_auto_20181120_2004... OK
healthchecks |   Applying api.0045_flip... OK
healthchecks |   Applying api.0046_auto_20181218_1245... OK
healthchecks |   Applying api.0047_auto_20181225_2315... OK
healthchecks |   Applying api.0048_auto_20190102_0737... OK
healthchecks |   Applying api.0049_auto_20190102_0743... OK
healthchecks |   Applying api.0050_ping_kind... OK
healthchecks |   Applying api.0051_auto_20190104_0908... OK
healthchecks |   Applying api.0052_auto_20190104_1122... OK
healthchecks |   Applying api.0053_check_subject... OK
healthchecks |   Applying api.0054_auto_20190112_1427... OK
healthchecks |   Applying api.0055_auto_20190112_1427... OK
healthchecks |   Applying api.0056_auto_20190114_0857... OK
healthchecks |   Applying api.0057_auto_20190118_1319... OK
healthchecks |   Applying api.0058_auto_20190312_1716... OK
healthchecks |   Applying api.0059_auto_20190314_1744... OK
healthchecks |   Applying api.0060_tokenbucket... OK
healthchecks |   Applying api.0061_webhook_values... OK
healthchecks |   Applying api.0062_auto_20190720_1350... OK
healthchecks |   Applying api.0063_auto_20190903_0901... OK
healthchecks |   Applying api.0064_auto_20191119_1346... OK
healthchecks |   Applying api.0065_auto_20191127_1240... OK
healthchecks |   Applying api.0066_channel_last_error... OK
healthchecks |   Applying api.0067_last_error_values... OK
healthchecks |   Applying api.0068_auto_20200117_1023... OK
healthchecks |   Applying api.0069_auto_20200117_1227... OK
healthchecks |   Applying api.0070_auto_20200411_1310... OK
healthchecks |   Applying api.0071_check_manual_resume... OK
healthchecks |   Applying api.0072_auto_20200701_1007... OK
healthchecks |   Applying api.0073_auto_20200721_1000... OK
healthchecks |   Applying api.0074_auto_20200803_1411... OK
healthchecks |   Applying api.0075_auto_20200805_1004... OK
healthchecks |   Applying api.0076_auto_20201128_0951... OK
healthchecks |   Applying api.0077_auto_20210506_0755... OK
healthchecks |   Applying api.0078_sms_values... OK
healthchecks |   Applying api.0079_auto_20210907_0918... OK
healthchecks |   Applying api.0080_fill_slug... OK
healthchecks |   Applying api.0081_channel_last_notify... OK
healthchecks |   Applying api.0082_fill_last_notify... OK
healthchecks |   Applying api.0083_channel_disabled... OK
healthchecks |   Applying api.0084_ping_body_raw... OK
healthchecks |   Applying api.0085_ping_object_size... OK
healthchecks |   Applying api.0086_remove_check_last_ping_was_fail_and_more... OK
healthchecks |   Applying api.0087_check_failure_kw_check_filter_body_and_more... OK
healthchecks |   Applying api.0088_fill_kw... OK
healthchecks |   Applying api.0089_remove_check_subject_remove_check_subject_fail... OK
healthchecks |   Applying api.0090_alter_check_filter_subject... OK
healthchecks |   Applying api.0091_alter_check_filter_body... OK
healthchecks |   Applying api.0092_alter_check_success_kw... OK
healthchecks |   Applying api.0093_alter_check_failure_kw... OK
healthchecks |   Applying api.0094_ping_rid_alter_channel_kind... OK
healthchecks |   Applying api.0095_check_last_start_rid... OK
healthchecks |   Applying api.0096_check_start_kw_alter_channel_kind... OK
healthchecks |   Applying api.0097_alter_channel_kind... OK
healthchecks |   Applying api.0098_channel_last_notify_duration... OK
healthchecks |   Applying api.0099_alter_channel_disabled... OK
healthchecks |   Applying api.0100_opsgenie_values... OK
healthchecks |   Applying api.0101_alter_channel_kind... OK
healthchecks |   Applying contenttypes.0002_remove_content_type_name... OK
healthchecks |   Applying auth.0002_alter_permission_name_max_length... OK
healthchecks |   Applying auth.0003_alter_user_email_max_length... OK
healthchecks |   Applying auth.0004_alter_user_username_opts... OK
healthchecks |   Applying auth.0005_alter_user_last_login_null... OK
healthchecks |   Applying auth.0006_require_contenttypes_0002... OK
healthchecks |   Applying auth.0007_alter_validators_add_error_messages... OK
healthchecks |   Applying auth.0008_alter_user_username_max_length... OK
healthchecks |   Applying auth.0009_alter_user_last_name_max_length... OK
healthchecks |   Applying auth.0010_alter_group_name_max_length... OK
healthchecks |   Applying auth.0011_update_proxy_permissions... OK
healthchecks |   Applying auth.0012_alter_user_first_name_max_length... OK
healthchecks |   Applying payments.0001_initial... OK
healthchecks |   Applying payments.0002_subscription_plan_id... OK
healthchecks |   Applying payments.0003_subscription_address_id... OK
healthchecks |   Applying payments.0004_subscription_send_invoices... OK
healthchecks |   Applying payments.0005_subscription_plan_name... OK
healthchecks |   Applying payments.0006_subscription_invoice_email... OK
healthchecks |   Applying payments.0007_auto_20200727_1430... OK
healthchecks |   Applying payments.0008_subscription_setup_date... OK
healthchecks |   Applying sessions.0001_initial... OK
healthchecks | Superuser created.
healthchecks | [custom-init] No custom files found, skipping...
healthchecks | realpath() of uwsgi.ini failed: No such file or directory [core/utils.c line 3662]
github-actions[bot] commented 10 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

danieldietsch commented 10 months ago
wrycta commented 10 months ago

I'm not sure how the s6 overlay & init stuff works exactly, but it looks like the uwsgi.ini file is copied into the app directory in https://github.com/linuxserver/docker-healthchecks/blob/339b9982db821988afc1196195b6ac296aa98f33/root/etc/s6-overlay/s6-rc.d/init-healthchecks-config/run#L119

Removing the end of the line that drops output from the mv command gives: healthchecks | mv: cannot move '/defaults/uwsgi.ini' to a subdirectory of itself, '/app/healthchecks/uwsgi.ini'

I'm not sure how to proceed from here, but it appears that the ini file is never copied into the app directory.

thespad commented 10 months ago

Looks like an upstream change broke our init for new installs, the above PR should hopefully fix things.