Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 277308 - app-admin/syslog-ng duplicate configuration element in syslog-ng.conf for hardened gentoo
Summary: app-admin/syslog-ng duplicate configuration element in syslog-ng.conf for har...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-10 12:32 UTC by Marcin Deranek
Modified: 2013-11-25 14:07 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Deranek 2009-07-10 12:32:51 UTC
Currently we have defined /dev/tty12 in 2 destinations
(hardened syslog-ng.conf template):

destination kern { file("/var/log/kern.log"); file("/dev/tty12"); };
destination console_all { file("/dev/tty12"); };

Syslog-ng doesn't like that:

May 28 03:10:04 mac syslog-ng[1313]: Internal error, duplicate configuration
elements refer to the same persistent config;
name='affile_dd_writers(/dev/tty12)'

In BUG#204164 more people reported same issue.

Reproducible: Always

Steps to Reproduce:
1. Set your profiles to hardened
2. emerge syslog-ng
3. try to start it

Actual Results:  
syslog-ng should not produce errors
Comment 1 Jory A. Pratt gentoo-dev 2009-09-07 02:01:10 UTC
what version of syslog-ng are we talking about? I have latest arch testing installed and only a few warnings but nothing that is a show stopper as far as usability is concerned.
Comment 2 Marcin Deranek 2009-09-07 08:43:59 UTC
Just tried it with 2.1.4 and seems like things work fine (no error during startup). Version 2.0.10 works fine as well although according to logs I had 2.1.4 emerged when I reported this bug:

mac ~ # awk '/syslog-ng/ && /completed emerge/ {print strftime("%c",substr($1,1,length($1)-1)),$8}' /var/log/emerge.log
<snip>
Wed 06 May 2009 04:52:08 AM CEST app-admin/syslog-ng-2.1.3
Sun 28 Jun 2009 10:40:55 PM CEST app-admin/syslog-ng-2.1.4
Sun 05 Jul 2009 01:44:20 PM CEST app-admin/syslog-ng-2.1.4

Maybe it was a bug/missing feature in underlying libraries (?). Can't tell now.
Closing.
Comment 3 mimosinnet 2009-11-20 18:41:39 UTC
I have the same issue in a new hardened install using app-admin/syslog-ng-3.0.4. After doing some googling, I have found this link:
http://arturmartins.wordpress.com/2008/12/06/gentoo-syslog-ng-duplicate-configuration-elements/

It suggests to change this line in syslog-ng.conf:

destination kern { file("/var/log/kern.log"); file("/dev/tty12"); };

to:

destination kern { file("/var/log/kern.log"); };

Cheers!
Comment 4 Attila Tóth 2010-02-16 13:53:18 UTC
IT ISN'T FIXED. The proposed fix is correct, but please apply it before change the bug to RESOLVED.

Regards,
Dw.
Comment 5 Marcin Deranek 2010-02-16 19:56:57 UTC
According to http://marc.info/?l=syslog-ng&m=125726439216633&w=2 currently it should be possible and works for me..

mac ~ # grep tty12 /etc/syslog-ng/syslog-ng.conf 
destination kern { file("/var/log/kern.log"); file("/dev/tty12"); };
destination console_all { file("/dev/tty12"); };

mac ~ # syslog-ng -f /etc/syslog-ng/syslog-ng.conf -s
WARNING: the match() filter without the use of the value() option is deprecated and hinders performance, please update your configuration;
mac ~ # echo $?
0
mac ~ # equery -q -C list syslog-ng
[I--] [  ] app-admin/syslog-ng-3.0.4 (0)
Comment 6 Bert Geens (theBlackDragon) 2011-07-18 12:33:10 UTC
Is this actually fixed? I've been getting these messages every night:

Jul 18 03:10:07 localhost syslog-ng[14067]: Internal error, duplicate configuration elements refer to the same persistent config; name='affile_dd_writers(/dev/tty12)'

% grep tty12 /etc/syslog-ng/syslog-ng.conf
destination kern { file("/var/log/kern.log"); file("/dev/tty12"); };
destination console_all { file("/dev/tty12"); };

% equery list syslog-ng
 * Searching for syslog-ng ...
[IP-] [  ] app-admin/syslog-ng-3.2.4:0

This is a default install of syslog-ng on hardened Gentoo (I didn't change the configuration by hand)

Either this is a regression or upstream changed it's mind about opening a file twice (or it was never fixed in the first place).

The fix suggested by mimosinnet fixes the issue.

I suggest reopening this bug as it's still around.
Comment 7 Balint SZENTE 2013-11-25 14:07:40 UTC
This issue still exists, please reopen the ticket!

=app-admin/syslog-ng-3.4.2

Relevant part of the "/var/log/syslog" file:
----
Nov 25 03:10:01 server syslog-ng[29572]: Configuration reload request received, reloading configuration;                                                       
Nov 25 03:10:02 server syslog-ng[29572]: Internal error, duplicate configuration elements refer to the same persistent config; name='affile_dd_writers(/dev/tty12)'
----

Please apply mimosinnet's fix.