Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Named parser cannot be referenced multiple times #1347

Merged
merged 1 commit into from Feb 17, 2017

Conversation

presidento
Copy link
Contributor

The syslog-ng cannot start (with message Error initializing message pipeline;) if a named parser is referenced multiple times.

Version of syslog-ng

syslog-ng 3.9.1
Installer-Version: 3.9.1
Revision: 
Module-Directory: /home/matefarkas/install/syslog-ng/lib/syslog-ng
Module-Path: /home/matefarkas/install/syslog-ng/lib/syslog-ng
Available-Modules: afmongodb,affile,sdjournal,confgen,cryptofuncs,syslogformat,pseudofile,afsocket,afamqp,basicfuncs,afuser,linux-kmsg-format,tfgetent,afprog,kvformat,mod-python,date,graphite,disk-buffer,csvparser,dbparser,add-contextual-data,cef,afstomp,system-source,json-plugin
Enable-Debug: on
Enable-GProf: off
Enable-Memtrace: off
Enable-IPv6: on
Enable-Spoof-Source: off
Enable-TCP-Wrapper: off
Enable-Linux-Caps: off

Steps to reproduce

  1. touch etc/hosts.csv
  2. Edit syslog-ng.conf
  3. Try to start syslog-ng

Configuration

@version: 3.9
parser p_contextual {
    add_contextual_data( database("hosts.csv") selector("${HOST}") );
};
log {
    source{ internal(); };
    parser(p_contextual);
    #parser(p_contextual); # Enable this line and syslog-ng won't start
    destination { file("/dev/null"); };
};

It also fails if the parser is referenced by 2 absolutely different log path.

The selector field was always null after a clone, because of
a typo.

Signed-off-by: Máté Farkas <mate.farkas@balabit.com>
@presidento presidento changed the title add-contextual-data: fix clone function Named parser cannot be referenced multiple times Feb 16, 2017
@bazsi bazsi merged commit 9390cd3 into syslog-ng:master Feb 17, 2017
@presidento presidento deleted the fix-add-contextual-data-clone branch March 13, 2017 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants