Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 283667 - app-admin/syslog-ng-3.0.2: cant get it to run
Summary: app-admin/syslog-ng-3.0.2: cant get it to run
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal
Assignee: Mr. Bones. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-04 15:47 UTC by Rafael Azevedo
Modified: 2009-11-09 10:52 UTC (History)
2 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 Rafael Azevedo 2009-09-04 15:47:39 UTC
I've installed SYSLOG-NG and it seems to have a problem on starting up.

I did follow the instructions from
http://en.gentoo-wiki.com/wiki/Syslog-ng_directly_to_MySQL
but it never starts.

Reproducible: Always

Steps to Reproduce:
1. emerge =app-admin/syslog-ng-3.0.2
2. vi /etc/syslog-ng/syslog-ng.conf
3. edit the config file
4. /etc/init.d/syslog-ng start

Actual Results:  
syslog-ng # /etc/init.d/syslog-ng start
 * Caching service dependencies ...                                                                                                                                                                      [ ok ]
Excess number of arguments
 * Configuration error. Please fix your configfile (/etc/syslog-ng/syslog-ng.conf)         

Expected Results:  
It needs to run

This is my syslog-ng.conf file:

@version: 3.0

# RAFA
#
options {
        stats_freq(3600);
        keep_hostname(yes);
        flush_lines(16);
        log_fifo_size(16384);
};

source s_src {
        unix-stream("/dev/log");
        file("/proc/kmsg");
        internal();
};

destination d_mysql {
        sql(type(mysql)
        host("SERVER_NAME") username("admin") password("*******")
        database("syslog")
        table("logs")
        columns("host", "facility", "priority", "level", "tag", "datetime", "program", "msg", "seq")
        values("$HOST_FROM", "$FACILITY", "$PRIORITY", "$LEVEL", "$TAG", "$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC", "$PROGRAM", "$MSG", "$SEQNUM")
        indexes("host", "facility", "priority", "datetime", "program", "seq"));
};

log { source(s_src); destination(d_mysql); };
Comment 1 Rafael Azevedo 2009-09-04 15:48:56 UTC
The SQL scheema was already created.

The reason I upgraded the syslog version was because the older version was consuming the entire cpu, crashing the server down.
Comment 2 Rafael Azevedo 2009-09-04 15:53:22 UTC
I re-emerged the package and even with the original syslog-ng.conf file it wont run.

This is the syslog-ng.conf file:
@version: 3.0
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3.0,v 1.1 2009/05/25 20:07:21 mr_bones_ Exp $
#
# Syslog-ng default configuration file for Gentoo Linux

options {
        chain_hostnames(no);

        # The default action of syslog-ng is to log a STATS line
        # to the file every 10 minutes.  That's pretty ugly after a while.
        # Change it to every 12 hours so you get a nice daily update of
        # how many messages syslog-ng missed (0).
        stats_freq(43200);
};

source src {
    unix-stream("/dev/log" max-connections(256));
    internal();
    file("/proc/kmsg");
};

destination messages { file("/var/log/messages"); };

# By default messages are logged to tty12...
destination console_all { file("/dev/tty12"); };
# ...if you intend to use /dev/console for programs like xconsole
# you can comment out the destination line above that references /dev/tty12
# and uncomment the line below.
#destination console_all { file("/dev/console"); };

log { source(src); destination(messages); };
log { source(src); destination(console_all); };


When I try to run:
/etc/init.d/syslog-ng start
 * Caching service dependencies ...                                                                                                                                                                      [ ok ]
Excess number of arguments
 * Configuration error. Please fix your configfile (/etc/syslog-ng/syslog-ng.conf)   
Comment 3 Rafael Azevedo 2009-09-04 15:54:19 UTC
This is my emerge --info:
---

Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.28.8 x86_64)
=================================================================
System uname: Linux-2.6.28.8-x86_64-Intel-R-_Pentium-R-_D_CPU_3.40GHz-with-glibc2.2.5
Timestamp of tree: Tue, 25 Aug 2009 18:45:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r13, 2.5.2-r7, 3.1
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.7.9-r1, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://www.las.ic.unicamp.br/pub/gentoo/ "
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.samerica.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog mmx mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl sse sse2 ssl sysfs tcpd unicode xorg zlib ~amd64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2009-09-06 15:57:31 UTC
3.0.2 isn't in portage.
Comment 5 Milo van Dijk 2009-09-07 10:44:34 UTC
check the file: /etc/init.d/syslog-ng

your checkconfig() probably contains something like:
syslog-ng -s /etc/syslog-ng/syslog-ng.conf
this should be either:
syslog-ng -s -f /etc/syslog-ng/syslog-ng.conf #custom config file
or
syslog-ng -s #default config file

When i upgraded to 3.0.4 got the same error but adding the -f fixed it.
Think etc-update only removed the -f and not the config file aswell.
Comment 6 Nebojsa Trpkovic 2009-11-09 10:52:31 UTC
same problem here.

adding -f solved the problem.

app-admin/syslog-ng-3.0.4