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

Jobs are not deregistered when bringing down a docker container #76

Open
codersaur opened this issue Dec 11, 2024 · 0 comments
Open

Jobs are not deregistered when bringing down a docker container #76

codersaur opened this issue Dec 11, 2024 · 0 comments

Comments

@codersaur
Copy link

codersaur commented Dec 11, 2024

I have a strange issue that I can't work out.

Docker discovery is working and jobs are registered when I bring up containers with ofelia labels. However, now that I have multiple jobs for multiple containers across several docker compose projects, I am finding that when I bring down those containers, the associated jobs do not get deregistered as expected. This leads to "No such container" errors next time a job is due...

ERROR  [Job "test" (9714b2942917)] Finished in "1.296536ms", failed: true, skipped: false, error: error creating exec: No such container: testcontainer

The weird thing is that I tested the registration/deregistration of jobs not long ago and it all seemed to be working (in fact I chose the netresearch fork precisely because it doesn't work with the mcuadros image).

What could be causing ofelia to miss docker events or otherwise fail to deregister jobs?

Config:

ofelia:
  container_name: ofelia
  image: ghcr.io/netresearch/ofelia:latest
  command: daemon --config=/etc/ofelia/config.ini
  volumes:
    # Config for global settings (doesn't work as labels):
    - ./volumes/ofelia/etc:/etc/ofelia/:rw
    # Docker socket so jobs defined as labels on other containers can be dynamically registered:
    - /var/run/docker.sock:/var/run/docker.sock:ro
    # Get trusted certs from host:
    - /etc/ssl/certs:/etc/ssl/certs:ro
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

1 participant