[syslog-ng] Problems creating syslog-ng.persit- file
Tamayo, Andres
Andres.Tamayo at viasat.com
Fri Mar 7 17:48:16 CET 2014
Hello,
No it did not. Here is the debug output when I try to use the JFFS2 directory to store the persist file:
I hope it helps.
# syslog-ng --cfgfile=/etc/syslog-ng.conf --pidfile=/mnt/syslog/syslog-ng.pid -persist-file=/mnt/syslog/syslog-ng.persist --foregro
und --debug
Starting to read include file; filename='/etc/scl.conf', depth='1'
Global value changed; define='scl-root', value='/usr/share/include/scl'
Global value changed; define='include-path', value='/etc:/usr/share/include'
Starting to read include file; filename='/usr/share/include/scl/system/plugin.conf', depth='2'
Finishing include; filename='/usr/share/include/scl/system/plugin.conf', depth='2'
Starting to read include file; filename='/usr/share/include/scl/pacct/plugin.conf', depth='2'
Reading path for candidate modules; path='/usr/lib/syslog-ng'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='affile.so', module='affile'
Registering candidate plugin; module='affile', context='source', name='file', preference='0'
Registering candidate plugin; module='affile', context='source', name='pipe', preference='0'
Registering candidate plugin; module='affile', context='destination', name='file', preference='0'
Registering candidate plugin; module='affile', context='destination', name='pipe', preference='0'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='afprog.so', module='afprog'
Registering candidate plugin; module='afprog', context='source', name='program', preference='0'
Registering candidate plugin; module='afprog', context='destination', name='program', preference='0'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='afsocket-notls.so', module='afsocket-notls'
Registering candidate plugin; module='afsocket-notls', context='source', name='unix-stream', preference='0'
Registering candidate plugin; module='afsocket-notls', context='destination', name='unix-stream', preference='0'
Registering candidate plugin; module='afsocket-notls', context='source', name='unix-dgram', preference='0'
Registering candidate plugin; module='afsocket-notls', context='destination', name='unix-dgram', preference='0'
Registering candidate plugin; module='afsocket-notls', context='source', name='tcp', preference='0'
Registering candidate plugin; module='afsocket-notls', context='destination', name='tcp', preference='0'
Registering candidate plugin; module='afsocket-notls', context='source', name='tcp6', preference='0'
Registering candidate plugin; module='afsocket-notls', context='destination', name='tcp6', preference='0'
Registering candidate plugin; module='afsocket-notls', context='source', name='udp', preference='0'
Registering candidate plugin; module='afsocket-notls', context='destination', name='udp', preference='0'
Registering candidate plugin; module='afsocket-notls', context='source', name='udp6', preference='0'
Registering candidate plugin; module='afsocket-notls', context='destination', name='udp6', preference='0'
Registering candidate plugin; module='afsocket-notls', context='source', name='syslog', preference='0'
Registering candidate plugin; module='afsocket-notls', context='destination', name='syslog', preference='0'
Registering candidate plugin; module='afsocket-notls', context='source', name='network', preference='0'
Registering candidate plugin; module='afsocket-notls', context='destination', name='network', preference='0'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='afsocket-tls.so', module='afsocket-tls'
Registering candidate plugin; module='afsocket-tls', context='source', name='unix-stream', preference='100'
Registering candidate plugin; module='afsocket-tls', context='destination', name='unix-stream', preference='100'
Registering candidate plugin; module='afsocket-tls', context='source', name='unix-dgram', preference='100'
Registering candidate plugin; module='afsocket-tls', context='destination', name='unix-dgram', preference='100'
Registering candidate plugin; module='afsocket-tls', context='source', name='tcp', preference='100'
Registering candidate plugin; module='afsocket-tls', context='destination', name='tcp', preference='100'
Registering candidate plugin; module='afsocket-tls', context='source', name='tcp6', preference='100'
Registering candidate plugin; module='afsocket-tls', context='destination', name='tcp6', preference='100'
Registering candidate plugin; module='afsocket-tls', context='source', name='udp', preference='100'
Registering candidate plugin; module='afsocket-tls', context='destination', name='udp', preference='100'
Registering candidate plugin; module='afsocket-tls', context='source', name='udp6', preference='100'
Registering candidate plugin; module='afsocket-tls', context='destination', name='udp6', preference='100'
Registering candidate plugin; module='afsocket-tls', context='source', name='syslog', preference='100'
Registering candidate plugin; module='afsocket-tls', context='destination', name='syslog', preference='100'
Registering candidate plugin; module='afsocket-tls', context='source', name='network', preference='100'
Registering candidate plugin; module='afsocket-tls', context='destination', name='network', preference='100'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='afsocket.so', module='afsocket'
Registering candidate plugin; module='afsocket', context='source', name='unix-stream', preference='100'
Registering candidate plugin; module='afsocket', context='destination', name='unix-stream', preference='100'
Registering candidate plugin; module='afsocket', context='source', name='unix-dgram', preference='100'
Registering candidate plugin; module='afsocket', context='destination', name='unix-dgram', preference='100'
Registering candidate plugin; module='afsocket', context='source', name='tcp', preference='100'
Registering candidate plugin; module='afsocket', context='destination', name='tcp', preference='100'
Registering candidate plugin; module='afsocket', context='source', name='tcp6', preference='100'
Registering candidate plugin; module='afsocket', context='destination', name='tcp6', preference='100'
Registering candidate plugin; module='afsocket', context='source', name='udp', preference='100'
Registering candidate plugin; module='afsocket', context='destination', name='udp', preference='100'
Registering candidate plugin; module='afsocket', context='source', name='udp6', preference='100'
Registering candidate plugin; module='afsocket', context='destination', name='udp6', preference='100'
Registering candidate plugin; module='afsocket', context='source', name='syslog', preference='100'
Registering candidate plugin; module='afsocket', context='destination', name='syslog', preference='100'
Registering candidate plugin; module='afsocket', context='source', name='network', preference='100'
Registering candidate plugin; module='afsocket', context='destination', name='network', preference='100'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='afuser.so', module='afuser'
Registering candidate plugin; module='afuser', context='destination', name='usertty', preference='0'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='basicfuncs.so', module='basicfuncs'
Registering candidate plugin; module='basicfuncs', context='template-func', name='grep', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='if', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='echo', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='length', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='substr', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='strip', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='sanitize', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='lowercase', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='uppercase', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='replace-delimiter', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='+', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='-', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='*', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='/', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='%', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='ipv4-to-int', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='indent-multi-line', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='context-length', preference='0'
Registering candidate plugin; module='basicfuncs', context='template-func', name='env', preference='0'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='confgen.so', module='confgen'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='cryptofuncs.so', module='cryptofuncs'
Registering candidate plugin; module='cryptofuncs', context='template-func', name='uuid', preference='0'
Registering candidate plugin; module='cryptofuncs', context='template-func', name='hash', preference='0'
Registering candidate plugin; module='cryptofuncs', context='template-func', name='sha1', preference='0'
Registering candidate plugin; module='cryptofuncs', context='template-func', name='sha256', preference='0'
Registering candidate plugin; module='cryptofuncs', context='template-func', name='sha512', preference='0'
Registering candidate plugin; module='cryptofuncs', context='template-func', name='md4', preference='0'
Registering candidate plugin; module='cryptofuncs', context='template-func', name='md5', preference='0'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='csvparser.so', module='csvparser'
Registering candidate plugin; module='csvparser', context='parser', name='csv-parser', preference='0'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='dbparser.so', module='dbparser'
Registering candidate plugin; module='dbparser', context='parser', name='db-parser', preference='0'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='json-plugin.so', module='json-plugin'
Registering candidate plugin; module='json-plugin', context='parser', name='json-parser', preference='0'
Registering candidate plugin; module='json-plugin', context='template-func', name='format_json', preference='0'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='linux-kmsg-format.so', module='linux-kmsg-format'
Registering candidate plugin; module='linux-kmsg-format', context='format', name='linux-kmsg', preference='0'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='syslog-ng-crypto.so', module='syslog-ng-crypto'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='syslogformat.so', module='syslogformat'
Registering candidate plugin; module='syslogformat', context='format', name='syslog', preference='0'
Registering candidate plugin; module='syslogformat', context='parser', name='syslog-parser', preference='0'
Reading shared object for a candidate module; path='/usr/lib/syslog-ng', fname='system-source.so', module='system-source'
Finishing include; filename='/usr/share/include/scl/pacct/plugin.conf', depth='2'
Starting to read include file; filename='/usr/share/include/scl/syslogconf/plugin.conf', depth='2'
Finishing include; filename='/usr/share/include/scl/syslogconf/plugin.conf', depth='2'
Finishing include; filename='/etc/scl.conf', depth='1'
From: Balazs Scheidler [mailto:bazsi77 at gmail.com]
Sent: Thursday, March 06, 2014 12:53 PM
To: Syslog-ng users' and developers' mailing list
Subject: Re: [syslog-ng] Problems creating syslog-ng.persit- file
It should have reported the issue more explicitly though.
Did it offer any diagnosis when it failed?
On Mar 6, 2014 7:01 PM, "Tamayo, Andres" <Andres.Tamayo at viasat.com<mailto:Andres.Tamayo at viasat.com>> wrote:
That explains it, I was not aware that syslog-ng created a temporary file with the '-' suffix first.
Thank you.
-----Original Message-----
From: Sandor Geller [mailto:Sandor.Geller at morganstanley.com<mailto:Sandor.Geller at morganstanley.com>]
Sent: Thursday, March 06, 2014 6:29 AM
To: Syslog-ng users' and developers' mailing list
Subject: Re: [syslog-ng] Problems creating syslog-ng.persit- file
syslog-ng first creates a tempfile having the '-' suffix then uses mmap(). A quick googling showed that jffs2 doesn't support mmap()
On Thu, Mar 6, 2014 at 2:10 PM, Tamayo, Andres <Andres.Tamayo at viasat.com<mailto:Andres.Tamayo at viasat.com>> wrote:
> Hello,
>
>
>
> I am having problems starting up syslog-ng when I specify the location
> and name for its persist file. Here is the way I am trying to start it:
>
>
>
> syslog-ng --cfgfile=/etc/syslog-ng.conf
> --pidfile=/mnt/config/syslog-ng.pid
> --persist-file=/mnt/config/syslog-ng.persist
>
>
>
> When I use this command, syslog-ng starts and creates the
> /mnt/config/syslog-ng.persist file but it adds a '-' (dash) character
> to the end of the filename, like this: /mnt/config/syslog-ng.persist-
>
>
>
> Then it executes right to the point where it is about to parse the
> configuration file (I can see this in the debug logs) and stops. The
> command return value is 2. I have seen syslog-ng return 0 on success
> and 1 on failure but I do not know what is the meaning of 2 as the return value.
>
>
>
> I tried the same filename but a different location (/tmp) and it worked.
> The filename did not have the appended '-' and syslog-ng returned 0.
> The location I am trying to use is a flash memory mount that has JFFS2
> file system. I wonder if this is part of the problem.
>
>
>
> I tried to change the name of the persist file to something different like:
> --persist-file=/mnt/config/something.else and the behavior is the
> same. The file is created like this: /mnt/config/something.else- and
> syslog-ng returns 2.
>
>
>
> Does anybody know why the '-' is appended to the filename or what is
> the meaning of a 2 return value?
>
>
>
> Thank you for your help.
>
>
>
>
> ______________________________________________________________________
> ________ Member info:
> https://urldefense.proofpoint.com/v1/url?u=https://lists.balabit.hu/ma
> ilman/listinfo/syslog-ng&k=OWT%2FB14AE7ysJN06F7d2nQ%3D%3D%0A&r=o7GqWGD
> QQvuJbgvvR6T88i9N1FvBWrMPYBwWrEtosko%3D%0A&m=9U2fA5pAvv64ZBCDAlvDrsK4w
> HZF1VKshd70qHQDB2Y%3D%0A&s=d3d699552d1d34bc83939ab579bfceddfa405638444
> 627361f85d4b89634fa90
> Documentation:
> https://urldefense.proofpoint.com/v1/url?u=http://www.balabit.com/supp
> ort/documentation/?product%3Dsyslog-ng&k=OWT%2FB14AE7ysJN06F7d2nQ%3D%3
> D%0A&r=o7GqWGDQQvuJbgvvR6T88i9N1FvBWrMPYBwWrEtosko%3D%0A&m=9U2fA5pAvv6
> 4ZBCDAlvDrsK4wHZF1VKshd70qHQDB2Y%3D%0A&s=0d6558d264a691bef96842ac394f8
> e5c1a4ee6afb5261186a9a47e680d010f4a
> FAQ:
> https://urldefense.proofpoint.com/v1/url?u=http://www.balabit.com/wiki
> /syslog-ng-faq&k=OWT%2FB14AE7ysJN06F7d2nQ%3D%3D%0A&r=o7GqWGDQQvuJbgvvR
> 6T88i9N1FvBWrMPYBwWrEtosko%3D%0A&m=9U2fA5pAvv64ZBCDAlvDrsK4wHZF1VKshd7
> 0qHQDB2Y%3D%0A&s=b3d5e07cc73d451c651ef2f26299087d15d71d408d6218f4346ca
> 86ae015ca5c
>
>
______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng<https://urldefense.proofpoint.com/v1/url?u=https://lists.balabit.hu/mailman/listinfo/syslog-ng&k=OWT%2FB14AE7ysJN06F7d2nQ%3D%3D%0A&r=o7GqWGDQQvuJbgvvR6T88i9N1FvBWrMPYBwWrEtosko%3D%0A&m=9pr3hQ1AS00uNXAWzIz%2FdwqobnXJk9lAApG3T8QUc2A%3D%0A&s=25abde1b91898493eb1d16a328383cbaff8f748b2e2545a152d35c46d2d2e70e>
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng<https://urldefense.proofpoint.com/v1/url?u=http://www.balabit.com/support/documentation/?product%3Dsyslog-ng&k=OWT%2FB14AE7ysJN06F7d2nQ%3D%3D%0A&r=o7GqWGDQQvuJbgvvR6T88i9N1FvBWrMPYBwWrEtosko%3D%0A&m=9pr3hQ1AS00uNXAWzIz%2FdwqobnXJk9lAApG3T8QUc2A%3D%0A&s=0427f351c90219989333a1c1f590aa4e34d3a0d7c13b6cc2b25937c840468794>
FAQ: http://www.balabit.com/wiki/syslog-ng-faq<https://urldefense.proofpoint.com/v1/url?u=http://www.balabit.com/wiki/syslog-ng-faq&k=OWT%2FB14AE7ysJN06F7d2nQ%3D%3D%0A&r=o7GqWGDQQvuJbgvvR6T88i9N1FvBWrMPYBwWrEtosko%3D%0A&m=9pr3hQ1AS00uNXAWzIz%2FdwqobnXJk9lAApG3T8QUc2A%3D%0A&s=2370fa077d482225735580eef21334a21e6816057fecf168f04178e12f18e194>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20140307/9cdaf004/attachment-0001.htm
More information about the syslog-ng
mailing list