[GH-ISSUE #55] DNS missing HOSTNAMES env from neighbors container #24

Closed
opened 2026-02-26 04:33:48 +03:00 by kerem · 6 comments
Owner

Originally created by @andrezaycev on GitHub (Jan 11, 2018).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/55

Originally assigned to: @mageddo on GitHub.

Hello.

We have issue:
if some containers started later than dns-proxy (for example longstart database), dns is not learning their HOSTNAMES variable (detected missing in proxy log)

We fix it over force-restart dns-proxy container in the end.

Tell me please how often dns-proxy have refresh HOSTNAMES vars from neighbor? Maybe possible to add parameter for it (reduce to 1 min for example)?

Originally created by @andrezaycev on GitHub (Jan 11, 2018). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/55 Originally assigned to: @mageddo on GitHub. Hello. We have issue: if some containers started later than dns-proxy (for example longstart database), dns is not learning their HOSTNAMES variable (detected missing in proxy log) We fix it over force-restart dns-proxy container in the end. Tell me please how often dns-proxy have refresh HOSTNAMES vars from neighbor? Maybe possible to add parameter for it (reduce to 1 min for example)?
kerem 2026-02-26 04:33:48 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@mageddo commented on GitHub (Jan 11, 2018):

It happens only at SO startup or at any moment? I think I experienced this bug before but I couldn't confirm it.

Actually there isn't a refresh interval DPS uses Docker API library events

github.com/mageddo/dns-proxy-server@4a4de3c/events/docker/DockerEvents.go (L43)

Maybe I missed some configuration in that API

<!-- gh-comment-id:356935038 --> @mageddo commented on GitHub (Jan 11, 2018): It happens only at SO startup or at any moment? I think I experienced this bug before but I couldn't confirm it. Actually there isn't a refresh interval DPS uses [Docker API](http://github.com/docker/engine-api/) library events https://github.com/mageddo/dns-proxy-server/blob/4a4de3c/events/docker/DockerEvents.go#L43 Maybe I missed some configuration in that API
Author
Owner

@andrezaycev commented on GitHub (Jan 11, 2018):

Detect it on startup. i'm use docker-machine for develop. It's happenning when containers autostart after virtualbox starting

<!-- gh-comment-id:356940739 --> @andrezaycev commented on GitHub (Jan 11, 2018): Detect it on startup. i'm use docker-machine for develop. It's happenning when containers autostart after virtualbox starting
Author
Owner

@mageddo commented on GitHub (Jan 11, 2018):

Thanks for the feedback, I think a figure out a problem in that code.

  • When dns-proxy-server starts it gets a list of all started containers
  • Then it register itself at Docker events
  • I think there is a gap between the containers list and the events registration, If some container starts at this time it will not be registered. That's simple to fix so we can fix it and see what happens.
  • Basically we need to register in Docker events first, then list the containers, it can provide duplicated records but that is not a problem

Please confirm If this issue is intermittent (don't happens every time even in the same situation)

<!-- gh-comment-id:356943897 --> @mageddo commented on GitHub (Jan 11, 2018): Thanks for the feedback, I think a figure out a problem in that code. * When dns-proxy-server starts it gets a list of all started containers * Then it register itself at Docker events * I think there is a gap between the containers list and the events registration, If some container starts at this time it will not be registered. That's simple to fix so we can fix it and see what happens. * Basically we need to register in Docker events first, then list the containers, it can provide duplicated records but that is not a problem Please confirm If this issue is intermittent (don't happens every time even in the same situation)
Author
Owner

@mageddo commented on GitHub (Jan 11, 2018):

After that I can try to update the Docker client API.

<!-- gh-comment-id:356944993 --> @mageddo commented on GitHub (Jan 11, 2018): After that I can try to update the Docker client API.
Author
Owner

@mageddo commented on GitHub (Jan 11, 2018):

Please checkout the new release with a possible fix, then let me know if it works for you. If not then send me a log file dump since machine startup

<!-- gh-comment-id:357084026 --> @mageddo commented on GitHub (Jan 11, 2018): Please checkout [the new release](https://github.com/mageddo/dns-proxy-server/releases/tag/2.2.3) with a possible fix, then let me know if it works for you. If not then send me a log file dump since machine startup
Author
Owner

@andrezaycev commented on GitHub (Jan 12, 2018):

Thanks man. Will check in dynamic nearest week. Will write feedback later

<!-- gh-comment-id:357109419 --> @andrezaycev commented on GitHub (Jan 12, 2018): Thanks man. Will check in dynamic nearest week. Will write feedback later
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#24
No description provided.