[syslog-ng] syslog-ng OSE 3.5.1 is not accepting global options
    Tamayo, Andres 
    Andres.Tamayo at viasat.com
       
    Wed Mar  5 23:24:48 CET 2014
    
    
  
Hello,
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.
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:
time_reopen(10);
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:
syslog connection failed; fd='8', server='AF_INET(192.168.1.10:1901)', error='Connection refused (146)', time_reopen='0'
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:
syslog connection failed; fd='8', server='AF_INET(192.168.1.10:1901)', error='Connection refused (146)', time_reopen='60'
But what if I needed to use time_reopen=10 instead.
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:
time_reopen(0xa);
Then, I would see the following syslog-ng debug message:
syslog connection failed; fd='8', server='AF_INET(192.168.1.10:1901)', error='Connection refused (146)', time_reopen='10'
The same is true for the following configuration items:
flush_timeout
log_fetch_limit
log_iw_size
log_fifo_size
max-connections
There may be other configuration items that exhibit the same behavior.
If anybody can explain why this is happening I would appreciate an explanation, thank you.
I hope this helps.
From: Tamayo, Andres [mailto:Andres.Tamayo at viasat.com]
Sent: Friday, February 28, 2014 3:49 PM
To: 'syslog-ng at lists.balabit.hu'
Subject: [syslog-ng] syslog-ng OSE 3.5.1 is not accepting global options
Hello,
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:
@version: 3.5
@include "scl.conf"
options
{
   flush_lines(0);
   time_reopen(10);
   log_fifo_size(1000);
   use_dns(no);
   use_fqdn(yes);
   keep_hostname(no);
   keep_timestamp(yes);
   chain_hostnames(no);
   perm(0640);
   owner("root");
   group("root");
   create_dirs(yes);
   dir_perm(0750);
   dir_owner("root");
   dir_group("root");
};
source s_cache
{
   file("/path/to/some/file.txt", flags(no-parse));
};
destination d_network
{
   syslog("192.168.1.10" port(1901) transport("tcp"));
};
log
{
   source(s_cache);
   destination(d_network);
};
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.
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:
Syslog connection failed; fd='8', server='AF_INET(192.168.1.10:1901)', error='Connection refused (146)', time_reopen='0'
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:
Syslog connection failed; fd='8', server='AF_INET(192.168.1.10:1901)', error='Connection refused (146)', time_reopen='60'
Please let me know if you have any questions for me.
Thank you for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20140305/3bd570ec/attachment-0001.htm 
    
    
More information about the syslog-ng
mailing list