<p dir="ltr">Ah, for this use case, having to wait for dns timeout sucks. :(</p>
<p dir="ltr">Adding an asynchronous DNS resolver would  be possible, but I am afraid it won&#39;t make it to our schedule soon enough to solve your problem. I see two solutions:</p>
<p dir="ltr">1) what about you or a colleague submit a patch? :)</p>
<p dir="ltr">2) validate the hostname before generating it into the configuration</p>
<p dir="ltr">3) hack the syslog-ng startup script and validate it before syslog-ng is launched with the erroneous hostname</p>
<p dir="ltr">Ops, that was three not two, but you get the idea.</p>
<div class="gmail_quote">On Aug 24, 2015 7:27 PM, &quot;David Hauck&quot; &lt;<a href="mailto:davidh@netacquire.com">davidh@netacquire.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Monday, August 24, 2015 10:10 AM, <a href="mailto:syslog-ng-bounces@lists.balabit.hu">syslog-ng-bounces@lists.balabit.hu</a> wrote:<br>
&gt; The destinations don&#39;t have dns resolution problems. They resolve<br>
&gt; their target name once and at every reconnect. On the source side you<br>
&gt; have a potential name lookup for every message (if uncached of course).<br>
<br>
Understood, but see below.<br>
<br>
&gt; Or you mean that the target server cannot be resolved?<br>
<br>
Correct. These target destinations are configured by administrators and the DNS failures may or may not be seen in a timely fashion (so the continual reconnects will result in frequent blockage).<br>
<br>
&gt; Why not add it<br>
&gt; to /etc/hosts?<br>
<br>
This isn&#39;t an option when the operator simply gets the name wrong (independent of whether the host is actually online and DNS resolvable) ;).<br>
<br>
&gt; Initiating a reconnect is handled in the main thread,<br>
&gt; thus name resolution of the target server would block other threads as well.<br>
<br>
By other do you mean all other threads? If not, which ones? What operations are suspended during the time of the blocked DNS resolution (note: typical resolver configuration is to retry 2-3 times with retry timeouts set to ~10s - so the total blockage time on a failed DNS lookup could be significant)?<br>
<br>
&gt; The basic problem of name resolution is on the source side though,<br>
&gt; there each incoming message can have an associated dns cache miss but<br>
&gt; that&#39;s delegated to the workers.<br>
<br>
OK, understood for the source, but I&#39;m still trying to determine the exact effect on destinations that fail to resolve...<br>
<br>
&gt; On Monday, August 24, 2015 7:31 AM, <a href="mailto:syslog-ng-bounces@lists.balabit.hu">syslog-ng-bounces@lists.balabit.hu</a><br>
&gt; wrote:<br>
&gt;&gt; sources/destinations are worked on by a set of worker threads, which<br>
&gt;&gt; are not dedicated to a source or destination.<br>
&gt;&gt;<br>
&gt;&gt; DNS resolution happens at the input side, so if you have multiple log<br>
&gt;&gt; statements, it will only happen once, right after reception, on the<br>
&gt;&gt; input side.<br>
&gt;&gt;<br>
&gt;&gt; however, if you only have one udp() source, that will only use one<br>
&gt;&gt; worker at a time, so if you have multiple threads the others will not<br>
&gt;&gt; be affected.<br>
&gt;&gt;<br>
&gt;&gt; hope this helps.<br>
&gt;<br>
&gt; ;) Not sure. First off, my UDP DNS resolution concern is in relation<br>
&gt; to a<br>
&gt; *destination* definition.<br>
&gt;<br>
&gt; destination d_NAaudit_Prio { file(&quot;/var/log/zzz/audit_log&quot;<br>
&gt; template(t_NAFormat_Prio)); udp(&quot;testing&quot; port(514)<br>
&gt; template(t_NAFormat_Prio)); };<br>
&gt;<br>
&gt; This same destination is used in several log statements, the main one<br>
&gt; of which is in a fairly complex log statement with multiple junction<br>
&gt; definitions (see the genesis of this in the following mailing list<br>
&gt; thread:<br>
&gt; <a href="https://lists.balabit.hu/pipermail/syslog-ng/2014-April/021330.html" rel="noreferrer" target="_blank">https://lists.balabit.hu/pipermail/syslog-ng/2014-April/021330.html</a>).<br>
&gt;<br>
&gt; So it isn&#39;t entirely clear to me how a statement definition like this<br>
&gt; results in a specific thread breakdown... Would isolating this<br>
&gt; destination to its own thread be as simple as adding &quot;threaded&quot; to the<br>
&gt; flags option for this destination (and then any of the referenced &quot;log&quot;<br>
&gt; statements would be running in their own threads), or does this<br>
&gt; happened by default (in v3.6.x)?<br>
&gt;<br>
&gt; Apologies if I&#39;m missing something obvious here ;).<br>
&gt; __________________________________________________________<br>
&gt; ______________ ______ Member info:<br>
&gt; <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a> Documentation:<br>
&gt; <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a> FAQ:<br>
&gt; <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
&gt;<br>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>