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

Fails to start if destination host unreachable #318

Closed
algernon opened this issue Dec 1, 2014 · 13 comments
Closed

Fails to start if destination host unreachable #318

algernon opened this issue Dec 1, 2014 · 13 comments
Labels

Comments

@algernon
Copy link
Contributor

algernon commented Dec 1, 2014

Reported by one of the Debian admins, syslog-ng 3.5.6 fails to start if a TLS destination is unreachable at the time syslog-ng is started during boot. This is very unfortunate, because this makes the whole system unbootable without manual intervention.

The desired behaviour would be suspending the destination until time-reopen() or somesuch. As far as I remember, something similar was attempted for tcp() destinations, but it appears it still does not work.

@ihrwein
Copy link
Contributor

ihrwein commented Jan 21, 2015

I can confirm, that syslog-ng v3.5.6 is indeed affected, but I couldn't reproduce the bug with v3.6.

We can find and correct this bug but it would require a new Debian syslog-ng release (3.5.7). Since 3.6 isn't affected, we can use it directly to create unofficial packages that can be given to you. What do you think about it?

@algernon
Copy link
Contributor Author

I'd prefer a 3.5.7, or a fix on the 3.5 branch, with which I can patch the official Debian package. Since this would go on official Debian machines, it would need to be in Jessie, which will ship with 3.5.

@ihrwein
Copy link
Contributor

ihrwein commented Jan 22, 2015

I tried to reproduce this issue with a clean install dir, but it solved the problem. I found a very similar issue (maybe the same), at [1]. Could you upload to somewhere an strace log? I suspect there is a different version from libsyslog-ng.so somewhere in the linker path.

[1] https://bugzilla.balabit.com/show_bug.cgi?id=226

@algernon
Copy link
Contributor Author

There definitely isn't any conflicting libsyslog-ng.so, the Debian dependencies make that impossible. The problem is different too: it's not related to iv_tls_user_register at all. It fails to start because syslog-ng fails to initialize the destination, and syslog-ng itself decides that it should quit. It's not a crash, but a fail-to-start scenario.

I don't have the resources to reproduce it at the moment, but I was told that with TLS, this happens with 100% reliability (as long as the destination is, indeed, not resolvable).

@ihrwein
Copy link
Contributor

ihrwein commented Jan 22, 2015

So, if syslog-ng cannot lookup the destination's domain name (because the DNS record doesn't exist) it fails to start? Or it cannot connect to the destination (because of firewalls, network outage, etc)?

@algernon
Copy link
Contributor Author

If it can't look it up, or if it can't connect, then it fails to start, correct. The desired behaviour would be to start, with the destination suspended, and retried after time-reopen(). Basically, the same behaviour that can be observed when a destination disconnects, should be applied to startup too.

@hbakken
Copy link

hbakken commented Feb 25, 2015

I can reproduce this in 3.6.2 as well, and for both syslog(... transport("udp")) and syslog(... transport("tls"))

This problem prevents us from forwarding logs using syslog-ng directly, so we have to resort to piping via a program() driver or a local pipe or something.

@czanik
Copy link
Contributor

czanik commented Mar 10, 2015

There is a related bug also in the openSUSE bugzilla at https://bugzilla.opensuse.org/show_bug.cgi?id=921252
Please fix it also for syslog-ng 3.5 (current openSUSE also has this version).

@czanik
Copy link
Contributor

czanik commented Mar 12, 2015

The opensuse ticket has some further info and workarounds added. Might be just another expression of the same problem or something completely different, but the end result is the same: syslog-ng does not try hard enough to reach network destinations and fails.

@faxm0dem
Copy link
Contributor

faxm0dem commented May 5, 2015

For the record we stumbled on something similar with a standard network() destination

@justcallmegreg
Copy link
Contributor

PR #490 hopefully solves this issue. (Merged)

@ihrwein
Copy link
Contributor

ihrwein commented Jun 8, 2015

@algernon @gregory094 : What should be the done definition of this issue? I think the problem is solved by the PR.

@justcallmegreg
Copy link
Contributor

The problem stated above is solved. I think we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants