<div dir="ltr"><div>I didn't seem to be right, rather it's a more important bug. All LL_NUMBER tokens are parsed into a gint64 value through a glong * pointer. So all 32 bit big endian platforms seem to be affected.<br>
<br></div>... a patch is coming soonish.<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 7, 2014 at 5:13 PM, Balazs Scheidler <span dir="ltr"><<a href="mailto:bazsi77@gmail.com" target="_blank">bazsi77@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>hmm... I think I may have a potential issue at hand, the function parse_number_with_suffix() returns its result using a long pointer, and time_reopen is just a int. Can it happen that you might use a big-endian platform where the size of a long and a int is different?<br>
<br></div>Do you have compilation warnings while compiling syslog-ng?<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Wed, Mar 5, 2014 at 11:24 PM, Tamayo, Andres <span dir="ltr"><<a href="mailto:Andres.Tamayo@viasat.com" target="_blank">Andres.Tamayo@viasat.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p>Hello,<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>I have found a solution to the problem (syslog-ng OSE 3.5.1 is not accepting global options) but I still do not understand what is the cause of the problem.<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>First some background information. I have built syslog-ng into a buildroot toolchain and flashed into an embedded development board. When I was prototyping my syslog-ng configuration file in the host computer, I was able to use configuration
like this:<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>time_reopen(10);<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>However, when I started to use syslog-ng on the embedded target, the configuration previously mentioned did not work. If I included this line in my syslog-ng.conf file; syslog-ng would automatically assume time_reopen was equal to zero
and show debug messages like this one:<u></u><u></u></p><div>
<p><u></u> <u></u></p>
<p>syslog connection failed; fd=’8’, server=’AF_INET(192.168.1.10:1901)’, error=’Connection refused (146)’, time_reopen=’0’<u></u><u></u></p>
<p><u></u> <u></u></p>
</div><p>If I deleted that configuration line from the configuration file, syslog-ng would use its default value. This is the message I would see if the configuration line was removed:<u></u><u></u></p><div>
<p><u></u> <u></u></p>
<p>syslog connection failed; fd=’8’, server=’AF_INET(192.168.1.10:1901)’, error=’Connection refused (146)’, time_reopen=’60’<u></u><u></u></p>
<p><u></u> <u></u></p>
</div><p>But what if I needed to use time_reopen=10 instead.<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>Anyway, as I said in the beginning I do now know what is causing this behavior but I found a solution.....hex notation. If I use the following configuration line instead:<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>time_reopen(0xa);<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>Then, I would see the following syslog-ng debug message:<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>syslog connection failed; fd=’8’, server=’AF_INET(192.168.1.10:1901)’, error=’Connection refused (146)’, time_reopen=’10’<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>The same is true for the following configuration items:<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>flush_timeout<u></u><u></u></p>
<p>log_fetch_limit<u></u><u></u></p>
<p>log_iw_size<u></u><u></u></p>
<p>log_fifo_size<u></u><u></u></p>
<p>max-connections<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>There may be other configuration items that exhibit the same behavior.<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>If anybody can explain why this is happening I would appreciate an explanation, thank you.<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>I hope this helps.<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Tamayo, Andres [<a href="mailto:Andres.Tamayo@viasat.com" target="_blank">mailto:Andres.Tamayo@viasat.com</a>]
<br>
<b>Sent:</b> Friday, February 28, 2014 3:49 PM<br>
<b>To:</b> '<a href="mailto:syslog-ng@lists.balabit.hu" target="_blank">syslog-ng@lists.balabit.hu</a>'<br>
<b>Subject:</b> [syslog-ng] syslog-ng OSE 3.5.1 is not accepting global options<u></u><u></u></span></p>
</div>
</div><div><div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif"">Hello,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif"">I am experiencing problems with syslog-ng OSE 3.5.1 reading the configuration file and accepting its global options. I had problems with 2 global options specified in my syslog-ng.conf
file:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas">@version: 3.5<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas">@include "scl.conf"</span><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas">options<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas">{<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> flush_lines(0);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> time_reopen(10);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> log_fifo_size(1000);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> use_dns(no);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> use_fqdn(yes);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> keep_hostname(no);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> keep_timestamp(yes);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> chain_hostnames(no);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas">
<span>perm</span>(0640);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> owner("root");<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> group("root");<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> create_dirs(yes);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> dir_perm(0750);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> dir_owner("root");<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> dir_group("root");<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas">};</span><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas">source s_cache
<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas">{<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> file("/path/to/some/file.txt", flags(no-parse));<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas">};</span><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas">destination d_network<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas">{<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas">
<span>syslog</span>("192.168.1.10" port(1901) transport("<span>tcp</span>"));<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas">};</span><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas">log<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas">{<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> source(s_cache);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas"> destination(d_network);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas">};</span><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif"">The time_reopen and log_fifo_size seem to be forced to zero if I try to specify alternate values for them as shown above. If I do not include them in the configuration file,
syslog-ng uses their default values time_reopen=60 and log_fifo_size=10000.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif"">Does anybody know what may be causing this problem? The log_fifo_size default value is OK but I need a faster time_reopen window and I cannot find a way to specify it. If
I do, syslog-ng forces it to time_reopen=0. I can tell because I get message like this when it is trying to reconnect:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas">Syslog connection failed; fd=’8’, server=’AF_INET(192.168.1.10:1901)’, error=’Connection refused (146)’, time_reopen=’0’</span><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif"">If I remove the time_reopen(10) global option from the syslog-ng.conf file, then I get the following message when syslog-ng it is trying to reconnect:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas">Syslog connection failed; fd=’8’, server=’AF_INET(192.168.1.10:1901)’, error=’Connection refused (146)’, time_reopen=’60’</span><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif"">Please let me know if you have any questions for me.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif"">Thank you for your help.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
</div></div></div>
</div>
<br></div></div>______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br>Bazsi
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br>Bazsi
</div>