Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Failed to stop syslog-ng
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Fri Mar 15, 2013 8:32 pm    Post subject: Failed to stop syslog-ng Reply with quote

syslog-ng failed to stop during shutdown.

rc.log looks like this:
Code:
rc boot logging started at Thu Mar 14 18:43:42 2013

 * Setting system clock using the hardware clock [UTC] ... [ ok ]
 * Autoloaded 0 module(s)
 * Checking local filesystems  ...
Reiserfs super block in block 16 on 0x803 of format 3.6 with standard journal
Blocks (total/free): 5243200/1438253 by 4096 bytes
Filesystem is clean
samsung_1_/boot: sauber, 63/12048 Dateien, 38518/48160 Blöcke [ ok ]
 * Remounting root filesystem read/write ... [ ok ]
 * Remounting filesystems ... [ ok ]
 * Updating /etc/mtab ... [ ok ]
 * Activating swap devices ... [ ok ]
 * Mounting local filesystems ... [ ok ]
 * Configuring kernel parameters ... [ ok ]
 * Creating user login records ... [ ok ]
 * Cleaning /var/run ... [ ok ]
 * Wiping /tmp directory ... [ ok ]
 * Restoring Mixer Levels ... [ ok ]
 * Setting hostname to gentoo ... [ ok ]
 * Setting terminal encoding [UTF-8] ... [ ok ]
 * Setting keyboard mode [UTF-8] ... [ ok ]
 * Loading key mappings [de-latin1-nodeadkeys] ... [ ok ]
 * Bringing up interface lo
 *   127.0.0.1/8 ... [ ok ]
 *   Adding routes
 *     127.0.0.0/8 via 127.0.0.1 ... [ ok ]
 * Activating additional swap space ... [ ok ]
 * setting up tmpfiles.d entries ... [ ok ]
 * Initializing random number generator ... [ ok ]

rc boot logging stopped at Thu Mar 14 18:43:45 2013


rc default logging started at Thu Mar 14 18:43:45 2013

 * Starting D-BUS system messagebus ... [ ok ]
 * Starting syslog-ng ... [ ok ]
 * Starting ConsoleKit daemon ... [ ok ]
 * Setting console font [lat9w-16] ... [ ok ]
 * Bringing up interface wlp0s2f2u5
 *   Starting wpa_supplicant on wlp0s2f2u5 ... [ ok ]
 *   Starting wpa_cli on wlp0s2f2u5 ... [ ok ]
 *   Backgrounding ... ...
 * WARNING: net.wlp0s2f2u5 has started, but is inactive
 * WARNING: netmount is scheduled to start when net.wlp0s2f2u5 has started
 * Setting up kdm ... [ ok ]
 * Starting mysql ... [ ok ]
 * Starting apache2 ... [ ok ]
 * Starting cupsd ... [ ok ]
 * Starting pcscd ... [ ok ]
 * Starting vixie-cron ... [ ok ]
 * Starting xinetd ... [ ok ]
 * Starting local [ ok ]

rc default logging stopped at Thu Mar 14 18:43:58 2013


rc shutdown logging started at Thu Mar 14 19:47:23 2013

 * Caching service dependencies ... [ ok ]
 * Stopping local [ ok ]
 * Stopping xinetd ... [ ok ]
 * Stopping vixie-cron ... [ ok ]
 * Saving random seed ... [ ok ]
 * Deactivating additional swap space ... [ ok ]
 * Stopping pcscd ... [ ok ]
 * Stopping cupsd ... [ ok ]
 * Stopping apache2 ... [ ok ]
 * Stopping mysql ... [ ok ]
 * Storing ALSA Mixer Levels ... [ ok ]
 * Stopping kdm ... [ ok ]
 * Unmounting network filesystems ... [ ok ]
 * Bringing down interface wlp0s2f2u5
 *   start-stop-daemon: no matching processes found
 *   Stopping wpa_cli on wlp0s2f2u5 ... [ ok ]
 *   Stopping wpa_supplicant on wlp0s2f2u5 ... [ ok ]
 * Bringing down interface lo
 *   start-stop-daemon: no matching processes found
 * Stopping ConsoleKit daemon ... [ ok ]
 * Stopping syslog-ng ...
 * start-stop-daemon: 1 process refused to stop
 * Failed to stop syslog-ng [ !! ]
 * Stopping D-BUS system messagebus ... [ ok ]
 * Unmounting loop devices
 * Unmounting filesystems
 *   Unmounting /mnt/store ... [ ok ]
 * Deactivating swap devices ... [ ok ]
 * Stopping udev ... [ ok ]
 * Setting hardware clock using the system clock [UTC] ... [ ok ]

rc shutdown logging stopped at Thu Mar 14 19:47:39 2013

Could someone help?
Does someone have an idea why the start-stop-daemon doesn't find matching processes for my wlan and the lo interface?
Is there a possibility to get more information about it e.g. a log file?
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Mon Mar 18, 2013 6:30 pm    Post subject: Reply with quote

Does somebody have an idea?
Back to top
View user's profile Send private message
Balage
n00b
n00b


Joined: 10 Jan 2008
Posts: 18
Location: Hungary

PostPosted: Wed Mar 20, 2013 9:48 am    Post subject: Reply with quote

I am not sure why the intefaces reported 'start-stop-daemon: no matching processes found '.
However the syslog-ng most probably failed to stop because the pid file vanished or disappeared somehow or the service wasn't even running (ie. it crashed).

Could you give me the output of 'emerge --info' as well as the version of syslog-ng / openrc and the syslog-ng.conf too.
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Wed Mar 20, 2013 6:00 pm    Post subject: Reply with quote

Here are the requested infos:
app-admin/syslog-ng 3.2.5
sys-apps/openrc 0.11.8
Code:
# emerge --info
Portage 2.1.11.52 (default/linux/x86/13.0/desktop/kde, gcc-4.6.3, glibc-2.15-r3, 3.5.7-gentoo i686)
=================================================================
System uname: Linux-3.5.7-gentoo-i686-AMD_Athlon-tm-_XP_3200+-with-gentoo-2.1
KiB Mem:     2596300 total,   1472024 free
KiB Swap:    1052252 total,   1052252 free
Timestamp of tree: Fri, 15 Mar 2013 20:30:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/mnt/store/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"     
FFLAGS="-O2 -march=i686 -pipe"                                                                                     
GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"                                                                                   
LANG="de_DE.utf8"                                                                                                   
LDFLAGS="-Wl,-O1 -Wl,--as-needed"                                                                                   
PKGDIR="/usr/portage/packages"                                                                                     
PORTAGE_CONFIGROOT="/"                                                                                             
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                         
PORTAGE_TMPDIR="/mnt/store"                                                                                         
PORTDIR="/usr/portage"                                                                                             
PORTDIR_OVERLAY="/usr/local/portage"                                                                               
SYNC="rsync://rsync.gentoo.org/gentoo-portage"                                                                     
USE="32bit 3dnow 3dnowext X a52 aac acl acpi addressbook akonadi alsa amarok amazon apache2 audiofile avi berkdb branding bzip2 cairo caps cdda cdr cjk cli consolekit cracklib crypt css cups curl cxx dbus declarative digikam disk-partition dri dts dvb dvd dvdr dvdread embedded emboss encode exif extras fam farstream fbcondecor ffmpeg firefox flac fortran gd gdbm gif gimp gimpprint gnome-keyring gnutls gpg gphoto2 gpm gstreamer gtk2 history hpcups iconv ipv6 java jpeg json kate kde kdeenablefinal kerberos kipi lan lcms ldap libkms libnotify libv4l2 libwww llvm mad mjpeg mmx mng modules mp3 mp4 mpeg mplayer msn mudflap mysql mythtv ncurses nls nptl nsplugin odbc ogg oggvorbis opengl openmp pam pango pcre pcsc-lite pdf phonon pkcs11 plasma png policykit posix ppds python qt3support qt4 quicktime rdesktop readline reiserfs rtc rtsp samba savedconfig scanner script sdl semantic-desktop session sip slp smartcard snmp spell sql sse ssl startup-notification stream stun svg tcltk tcpd telepathy threads threadsafe tiff truetype udev udisks unicode upower usb userlocales v4l v4l2 vcd video vlc vorbis wav webkit win32codecs winbind wxwidgets x264 x86 xcb xine xml xorg xscreensaver xulrunner xv xvid yahoo zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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="authn_core authz_core authz_host dav dir mime socache_shmcb unixd" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de th" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev vga radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

Code:
# cat /etc/syslog-ng/syslog-ng.conf
@version: 3.2
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3.2,v 1.1 2011/01/18 17:44:14 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);
        # The default action of syslog-ng is to log a MARK line
        # to the file every 20 minutes.  That's seems high for most
        # people so turn it down to once an hour.  Set it to zero
        # if you don't want the functionality at all.
        mark_freq(3600);
};

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

# define destinations
destination authlog { file("/var/log/auth.log"); };
destination syslog { file("/var/log/syslog"); };
destination cron { file("/var/log/cron.log"); };
destination daemon { file("/var/log/daemon.log"); };
destination kern { file("/var/log/kern.log"); };
destination lpr { file("/var/log/lpr.log"); };
destination user { file("/var/log/user.log"); };
destination mail { file("/var/log/mail.log"); };
destination mailinfo { file("/var/log/mail.info"); };
destination mailwarn { file("/var/log/mail.warn"); };
destination mailerr { file("/var/log/mail.err"); };
destination newscrit { file("/var/log/news/news.crit"); };
destination newserr { file("/var/log/news/news.err"); };
destination newsnotice { file("/var/log/news/news.notice"); };
destination debug { file("/var/log/debug"); };
destination messages { file("/var/log/messages"); };
destination console { usertty("root"); };

# 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"); };

# create filters
filter f_authpriv { facility(auth, authpriv); };
filter f_syslog { not facility(authpriv, mail); };
filter f_cron { facility(cron); };
filter f_daemon { facility(daemon); };
filter f_kern { facility(kern); };
filter f_lpr { facility(lpr); };
filter f_mail { facility(mail); };
filter f_user { facility(user); };
filter f_debug { not facility(auth, authpriv, news, mail); };
filter f_messages { level(info..warn) and not facility(auth, authpriv, mail, news); };
filter f_emergency { level(emerg); };
filter f_info { level(info); };
filter f_notice { level(notice); };
filter f_warn { level(warn); };
filter f_crit { level(crit); };
filter f_err { level(err); };
filter f_failed { message("failed"); };
filter f_denied { message("denied"); };

# connect filter and destination
log { source(src); filter(f_authpriv); destination(authlog); };
log { source(src); filter(f_syslog); destination(syslog); };
log { source(src); filter(f_cron); destination(cron); };
log { source(src); filter(f_daemon); destination(daemon); };
log { source(src); filter(f_kern); destination(kern); };
log { source(src); filter(f_lpr); destination(lpr); };
log { source(src); filter(f_mail); destination(mail); };
log { source(src); filter(f_user); destination(user); };
log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); };
log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };
log { source(src); filter(f_debug); destination(debug); };
log { source(src); filter(f_messages); destination(messages); };
log { source(src); filter(f_emergency); destination(console); };

# default log
log { source(src); destination(console_all); };
Back to top
View user's profile Send private message
Balage
n00b
n00b


Joined: 10 Jan 2008
Posts: 18
Location: Hungary

PostPosted: Fri Mar 29, 2013 8:16 am    Post subject: Reply with quote

Well, all the info you gave seems to be normal.
You should check syslog-ng's internal logs for more details, you'll find them in /var/log/messages. If you still have them from that time when the issue happened.
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Fri Mar 29, 2013 10:45 am    Post subject: Reply with quote

The issue happens with every shutdown.

/var/log/messages doesn't exist.
Back to top
View user's profile Send private message
Balage
n00b
n00b


Joined: 10 Jan 2008
Posts: 18
Location: Hungary

PostPosted: Fri Mar 29, 2013 1:45 pm    Post subject: Reply with quote

Please reproduce it with a rather basic configuration:
If it fails, then upload / paste the content of /var/log/syslog-ng-internal.

Cheers,

Code:
@version: 3.2

@include "scl.conf"

### global options
options {
        #threaded(yes);
        chain_hostnames(no);
        create_dirs(yes);
        keep_hostname(yes);
        stats_freq(43200);
        time_reap(1);
};

### sources

source_internal {
    internal();
};

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

destination d_internal {
  file("/var/log/syslog-ng-internal");
};

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

log { source(s_internal); destination(d_internal); };

log { source(src); destination(d_messages); };
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Tue Apr 02, 2013 4:58 pm    Post subject: Reply with quote

Quote:
source_internal {

I guess this was a little typing mistake. I changed my /etc/syslog-ng/syslog-ng.conf like follows:
Code:
@version: 3.2
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3.2,v 1.1 2011/01/18 17:44:14 mr_bones_ Exp $
#
# Syslog-ng default configuration file for Gentoo Linux

#include "scl.conf"

### global options
options {
        #threaded(yes);
        chain_hostnames(no);
        create_dirs(yes);
        keep_hostname(yes);
        stats_freq(43200);
        time_reap(1);
};

### sources

source s_internal {
        internal();
};

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

destination d_internal {
        file("/var/log/syslog-ng-internal");
};

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

log { source(s_internal); destination(d_internal); };

log { source(src); destination(d_messages); };

But without success. I get the same errors during shutdown. Neither /var/log/messages nor /var/log/syslog-ng-internal is available.
Back to top
View user's profile Send private message
Balage
n00b
n00b


Joined: 10 Jan 2008
Posts: 18
Location: Hungary

PostPosted: Fri Apr 05, 2013 11:41 am    Post subject: Reply with quote

Yes, that was a typo :)

It seems that the service isn't even starts properly.
Try this:
1) stop the service first
2)
Code:
/path/to/syslog-ng -Fedv --enable-core -f /path/to/syslog-ng.conf &> /path/to/save/the/debug/file


This will force the service to start in the foreground and redirect every output (even the incoming / outgoing logs, you can omit the '-d' switch if you don't want to include the logs) into a file.
If you got the prompt back immediately then it failed to start.
Try stopping the service by sending a simple kill signal to it. (kill -p $pid)
There should be two syslog-ng processes (pgrep syslog-ng or pidof syslog-ng), the first one is a supervisor process and the other one with bigger pid is the 'working' process. Kill the latter one.

Upload the resulted log file somewhere.
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Fri Apr 05, 2013 11:08 pm    Post subject: Reply with quote

I did the following steps:

1. Stop syslog-ng
Code:
# /etc/init.d/syslog-ng stop
 * Stopping syslog-ng ...
 * start-stop-daemon: 1 process refused to stop
 * Failed to stop syslog-ng                                                                                   [ !! ]

2. Start syslog-ng
Code:
# /usr/sbin/syslog-ng -Fedv --enable-core -f /etc/syslog-ng/syslog-ng.conf &> /var/log/messages

3. Check process
Code:
# pgrep syslog-ng
1370
1371
2617

4. Kill process
Code:
# kill -9 2617

5. Check log
Code:
# cat /var/log/messages
Trying to open module; module='syslogformat', filename='/usr/lib/syslog-ng/libsyslogformat.so'
Trying to open module; module='basicfuncs', filename='/usr/lib/syslog-ng/libbasicfuncs.so'
Trying to open module; module='afsocket', filename='/usr/lib/syslog-ng/libafsocket.so'
Trying to open module; module='affile', filename='/usr/lib/syslog-ng/libaffile.so'
Trying to open module; module='afprog', filename='/usr/lib/syslog-ng/libafprog.so'
Trying to open module; module='afuser', filename='/usr/lib/syslog-ng/libafuser.so'
Trying to open module; module='dbparser', filename='/usr/lib/syslog-ng/libdbparser.so'
Trying to open module; module='csvparser', filename='/usr/lib/syslog-ng/libcsvparser.so'
Trying to open module; module='afsql', filename='/usr/lib/syslog-ng/libafsql.so'
Running application hooks; hook='1'
Running application hooks; hook='3'
syslog-ng starting up; version='3.2.5'
Incoming log entry; line='<7>ehci_hcd 0000:00:02.2: cache line size of 32 is not supported'
Initializing destination file writer; template='/var/log/messages', filename='/var/log/messages'
Incoming log entry; line='<6>ehci_hcd 0000:00:02.2: irq 20, io mem 0xed083000'
Incoming log entry; line='<6>ehci_hcd 0000:00:02.2: USB 2.0 started, EHCI 1.00'
Incoming log entry; line='<6>hub 1-0:1.0: USB hub found'
Incoming log entry; line='<6>hub 1-0:1.0: 6 ports detected'
Incoming log entry; line='<6>ohci_hcd: USB 1.1 \'Open\' Host Controller (OHCI) Driver'
...
Back to top
View user's profile Send private message
Balage
n00b
n00b


Joined: 10 Jan 2008
Posts: 18
Location: Hungary

PostPosted: Wed Apr 10, 2013 1:06 pm    Post subject: Reply with quote

That doesn't show anything suspicious.
As a last idea, you may want to attach an strace to the stuck syslog-ng process (after you treid to stop it) to see what's going on but that's a bit beyond my skills.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum