Skip to content

[v0.4.0] Targeted containers are not updated #357

Open
@tlvenn

Description

@tlvenn

I am running the beta and it seems like Ofelia does not detect new containers and still try to access containers that have been stopped.

Starting Ofelia with existing container already running with

docker run -d --name ofelia --restart=always -v /var/run/docker.sock:/var/run/docker.sock:ro mcuadros/ofelia:0.4.0-beta daemon --docker

Logs:

2025-05-14T02:36:05.355Z  common.go:127 ▶ NOTICE  [Job "wp_action-scheduler" (79124470ea69)] Finished in "1.3494229s", failed: false, skipped: false, error: none
2025-05-14T02:36:09.004Z  cron_utils.go:30 ▶ DEBUG  [cron=wake now=2025-05-14 02:36:09.00310951 +0000 UTC]
2025-05-14T02:36:09.004Z  cron_utils.go:30 ▶ DEBUG  [cron=run now=2025-05-14 02:36:09.00310951 +0000 UTC entry=1 next=2025-05-14 02:36:14 +0000 UTC]
2025-05-14T02:36:09.005Z  common.go:127 ▶ NOTICE  [Job "wp_action-scheduler" (fac04b28d59e)] Started - sudo -E -u www-data wp action-scheduler run
2025-05-14T02:36:10.407Z  common.go:127 ▶ NOTICE  [Job "wp_action-scheduler" (fac04b28d59e)] StdOut: 0 batches executed.
Success: 0 scheduled tasks completed.
2025-05-14T02:36:10.407Z  common.go:127 ▶ NOTICE  [Job "wp_action-scheduler" (fac04b28d59e)] Finished in "1.402274596s", failed: false, skipped: false, error: none

I then redeploy my app with Kamal which stops the exisiting container and spawn a new one.

2025-05-14T02:36:14.003Z  cron_utils.go:30 ▶ DEBUG  [cron=wake now=2025-05-14 02:36:14.000998841 +0000 UTC]
2025-05-14T02:36:14.003Z  cron_utils.go:30 ▶ DEBUG  [cron=run now=2025-05-14 02:36:14.000998841 +0000 UTC entry=1 next=2025-05-14 02:36:19 +0000 UTC]
2025-05-14T02:36:14.005Z  common.go:127 ▶ NOTICE  [Job "wp_action-scheduler" (cfe7f7aceae6)] Started - sudo -E -u www-data wp action-scheduler run
2025-05-14T02:36:14.006Z  common.go:123 ▶ ERROR  [Job "wp_action-scheduler" (cfe7f7aceae6)] Finished in "1.076622ms", failed: true, skipped: false, error: error creating exec: API error (409): container 91cb1e6a10b58f2549f9c582b4469d2ea3cfb495789527a8e625adf29b9a6fe3 is not running
2025-05-14T02:36:19.007Z  cron_utils.go:30 ▶ DEBUG  [cron=wake now=2025-05-14 02:36:19.002992931 +0000 UTC]
2025-05-14T02:36:19.007Z  cron_utils.go:30 ▶ DEBUG  [cron=run now=2025-05-14 02:36:19.002992931 +0000 UTC entry=1 next=2025-05-14 02:36:24 +0000 UTC]
2025-05-14T02:36:19.008Z  common.go:127 ▶ NOTICE  [Job "wp_action-scheduler" (61c0e6839b1d)] Started - sudo -E -u www-data wp action-scheduler run
2025-05-14T02:36:19.008Z  common.go:123 ▶ ERROR  [Job "wp_action-scheduler" (61c0e6839b1d)] Finished in "466.977µs", failed: true, skipped: false, error: error creating exec: API error (409): container 91cb1e6a10b58f2549f9c582b4469d2ea3cfb495789527a8e625adf29b9a6fe3 is not running
2025-05-14T02:36:24.004Z  cron_utils.go:30 ▶ DEBUG  [cron=wake now=2025-05-14 02:36:24.004525875 +0000 UTC]

Expected results:

  • New containers are detected properly.
  • Stopped containers are not targeted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions