Logging, Syslog and Log Anaylsys Forums
July 30, 2010, 09:42:59 pm
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
WIKI
BLOG
Help
Search
Recent Topics
GoogleTagged
Login
Register
Logging, Syslog and Log Anaylsys Forums
>
Forums
>
syslog-ng
>
syslog-ng 3.0.1 restart script
Pages: [
1
]
« previous
next »
Print
Author
Topic: syslog-ng 3.0.1 restart script (Read 2148 times)
munthajeeb
Newbie
Offline
Posts: 11
syslog-ng 3.0.1 restart script
«
on:
August 10, 2009, 02:29:13 am »
Hi,
I upgraded to syslog-ng 3.0.1 on Linux. But the restart script stops it but is unable to start
at times. Is there some change I need to do the startup scripts ? is there a new version for syslog-ng 3.0 ? The script is given below
-------------------------------------------
INIT_PROG="/usr/local/my/sbin/syslog-ng" # Full path to daemon
INIT_OPTS="-f /usr/local/my/etc/syslog-ng.conf" # options passed to daemon
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/my/bin:/usr/local/my/sbin
INIT_NAME=`basename "$INIT_PROG"`
# Source Redhat function library.
#
. /etc/rc.d/init.d/functions
RETVAL=0
umask 077
ulimit -c 0
# See how we were called.
case "$1" in
start)
echo -n "Starting $INIT_NAME: "
daemon --check $INIT_PROG "$INIT_PROG $INIT_OPTS"
RETVAL=$?
echo -n "Starting Kernel Logger: "
[ -x "/sbin/klogd" ] && daemon klogd
echo
[ $RETVAL -eq 0 ] && touch "/var/lock/subsys/${INIT_NAME}"
;;
stop)
echo -n "Stopping $INIT_NAME: "
killproc $INIT_PROG
RETVAL=$?
echo -n "Stopping Kernel Logger: "
[ -x "/sbin/klogd" ] && killproc klogd
echo
[ $RETVAL -eq 0 ] && rm -f "/var/lock/subsys/${INIT_NAME}"
;;
status)
status $INIT_PROG
RETVAL=$?
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload}"
exit 1
esac
exit $RETVAL
--------------------------
Logged
mutex
Administrator
Newbie
Offline
Posts: 901
Re: syslog-ng 3.0.1 restart script
«
Reply #1 on:
August 10, 2009, 06:39:10 am »
is there any indication as to why it doesn't start in the logs?
Logged
munthajeeb
Newbie
Offline
Posts: 11
Re: syslog-ng 3.0.1 restart script
«
Reply #2 on:
August 10, 2009, 07:46:22 am »
I dont get any error message.
What I see is :-
-----------------
Aug 6 01:00:01 syslog01 crond[28465]: (root) CMD (/usr/local/my/scripts/restartsyslog.pl > /dev/null 2>&1)
Aug 6 01:00:01 syslog01 syslog-ng[29980]: Termination requested via signal, terminating;
Aug 6 01:00:01 syslog01 syslog-ng[29980]: syslog-ng shutting down; version='3.0.1'
-----------------
restartsyslog.pl script is called by cronjob and it only calls the above init.d syslog-ng startup script with restart option.
/usr/local/my/etc/init.d/syslog-ng restart
Logged
Admin
Administrator
Newbie
Offline
Posts: 146
Re: syslog-ng 3.0.1 restart script
«
Reply #3 on:
August 10, 2009, 08:34:48 am »
I have a hard time thinking this is it, but it appears that the stop and start commands are more or less initiated simuilateneously. You could try changing:
Code:
restart|reload)
$0 stop
$0 start
to
Code:
restart|reload)
$0 stop && $0 start
Logged
munthajeeb
Newbie
Offline
Posts: 11
Re: syslog-ng 3.0.1 restart script
«
Reply #4 on:
August 10, 2009, 10:39:07 am »
Thanks you very much.
Will try it and let you know the result.
Logged
munthajeeb
Newbie
Offline
Posts: 11
Re: syslog-ng 3.0.1 restart script
«
Reply #5 on:
August 11, 2009, 04:06:34 am »
This did not help.
but was able to find one thing, it fails to restart only if this script is triggered by
cronJob. If I trigger it manually it works fine.
any clue why this behaviour ?
Logged
munthajeeb
Newbie
Offline
Posts: 11
Re: syslog-ng 3.0.1 restart script
«
Reply #6 on:
August 13, 2009, 09:50:54 am »
I was able to catch the error this time, by redirecting the output from the script to
a log file :
Stopping syslog-ng: [ OK ] Stopping Kernel Logger: [ OK ]
Starting syslog-ng: /usr/local/my/sbin/syslog-ng: error while loading shared libraries: libevtlog.so.0: cannot open shared object file: No such file or directory
[FAILED] Starting Kernel Logger: [ OK ]
What can be the isuue ?
Logged
Pages: [
1
]
Print
GoogleTagged:
syslog-ng init script redhat for
syslog-ng init script error while loading shared libevtlog
libevtlog cannot open shared object such file directory
error while loading shared libevtlog cannot open shared object
restart
logger syslog script
libevtlog error
syslog-ng
error while loading shared libevtlog cannot open shared object
libevtlog cannot open
how restart klogd
syslog-ng error while loading shared libraries
redirect script output syslog
syslog restart
syslog-ng libevtlog
syslog-ng ulimit
google
syslog stop
restart syslog-ng
syslog-ng init
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Forums
-----------------------------
=> Syslog & syslogd
=> syslog-ng
=> Log Data and Analysis
=> Windows Event Log
=> Web Server Logs
=> Security Event Management
=> General Discussion
===> Red Light District
Loading...