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

[enhancement] retry on DNS or connection failures #4

Open
jguay opened this issue Mar 15, 2019 · 0 comments
Open

[enhancement] retry on DNS or connection failures #4

jguay opened this issue Mar 15, 2019 · 0 comments

Comments

@jguay
Copy link

jguay commented Mar 15, 2019

Current behaviour
When I connect to a container which may be down or not yet started, I hit error like this one

nflow0                     | time="2019-03-15T10:32:45Z" level=fatal msg="Error connecting to the target collector: write udp 172.18.0.5:40304->172.18.0.6:2055: write: connection refused"

Cause
It seems a connection error is considered fatal here

Same point about DNS problem a few lines above which is also considered fatal

Requested feature
It would be great if any connection error was just displayed and the connection would just be retried after 10 seconds so the nflow-generator container just keeps trying instead of failing

Workaround
If I just set a restart policy for the container, or some script which would delay entrypoint till the destination host/port is reachable, I will be able to get around it but would prefer if the code just retry, never coded in go but could probably make a PR for this as change may be trivial

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