Re: [Sqlrelay-discussion] Problem with startup on RHEL ES5 64 bit
Brought to you by:
mused
|
From: Rob T. <rt...@li...> - 2010-03-03 02:04:55
|
I¹m replying to my own message. Did dome googling and apparently this
startup issue with the listener has been discussed before and the work
around is to create a dummy instance in the sqlrelay.conf file prior to the
actual instance. So I simply made a copy of the real instance and named it
³dummy² (okay, I¹m just not that creative today). Now, when I start
sqlrelay, all the daemons start but I get this back:
Starting SQL Relay:
Launching instance with id 'webapps': [ OK ]
19440 is not sqlr! removing pidfile ...
The pid that it claims isn¹t sqlr! is actually the sqlr-cachemanager and
since it removes the pid file, when I stop sqlrelay, sqlr-cachemanger isn¹t
stopped and I have to kill it manually. Is this the compromise that at
least brings up all the components and so I¹m just stuck with it as a
downside? I can certainly live with that if I have to, but is there a
work-around for this as well?
Thanks,
Rob
On 3/2/10 5:04 PM, "Rob Tanner" <rt...@li...> wrote:
> Hi,
>
> The regular startup script in the distribution
> (sqlrelay-0.41/init/redhat/init.d/sqlrelay) fails to start the listener and
> the scaler, the latter I presume because sqlr-listener is not running.
> However, I can manually start both of them, listener first and then the
> scaler. Is there a way to get the listener to provide some debug info when it
> doesn¹t start up?
>
> Here the startup script as found in the sqlrelay distribution after compile.
> Can anyone see any problems in it?
>
> Thanks,
> Rob
>
> #! /bin/sh
> #
> # sqlrelay This starts and stops SQL relay.
> #
> # chkconfig: 345 85 15
> # description: Persistent database connection system.
>
> # Source function library.
> success() {
> echo success
> }
> failure() {
> echo failure
> }
> passed() {
> echo passed
> }
> if [ -r "/etc/init.d/functions" ]; then
> . /etc/init.d/functions
> else
> if [ -r "/etc/rc.d/init.d/functions" ]; then
> . /etc/rc.d/init.d/functions
> fi
> fi
>
> # Get config.
> test -f /etc/sysconfig/network && . /etc/sysconfig/network
>
> # Check that networking is up.
> [ ${NETWORKING} = "yes" ] || exit 0
>
> prefix=${DESTDIR}/usr/local/firstworks
> sysconfdir=${prefix}/etc
> localstatedir=${prefix}/var
> tmpdir=${localstatedir}/sqlrelay/tmp
> cachedir=${localstatedir}/sqlrelay/cache
> debugdir=${localstatedir}/sqlrelay/debug
>
> [ -f ${sysconfdir}/sqlrelay.conf ] || exit 1
>
> RETVAL=0
>
> # Add appropriate bin/lib paths
> if [ ${prefix} != "/usr" ]; then
> export PATH=$PATH:${prefix}/bin
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${prefix}/lib
> fi
>
> cleanup(){
> for i in `ls ${tmpdir}/pids/* 2>/dev/null`
> do
> if ( test -r "$i" )
> then
> PID=`cat $i`
> if ( test -z "`ps -p $PID | egrep -E
> 'sqlr-cachemana|sqlr-connectio|sqlr-listener'`" )
> then
> echo "$PID is not sqlr! removing pidfile ..."
> rm $i
> fi
> fi
> done
> }
>
> start(){
> echo -n $"Starting SQL Relay: "
> if [ -r /etc/sysconfig/sqlrelay ]; then
> launched=0
> for connid in `grep -v ^# /etc/sysconfig/sqlrelay`; do
> echo
> echo -n $"Launching instance with id '${connid}':"
> sqlr-start -id ${connid} 0<&- 1>&- 2>&-
> RETVAL=$?
> [ $RETVAL -eq 0 ] && success || failure
> launched=1
> done
> [ "$launched" -eq 1 ] || passed
> echo
> else
> failure
> fi
> [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sqlrelay
> cleanup
> return $RETVAL
> }
>
> stop(){
> echo -n $"Stopping SQL Relay: "
> if [ -r /etc/sysconfig/sqlrelay ]; then
> launched=0
> for connid in `grep -v ^# /etc/sysconfig/sqlrelay`; do
> echo
> echo -n $"Stopping instance with id '${connid}':"
> sqlr-stop ${connid} 0<&- 1>&- 2>&-
> RETVAL=$?
> [ $RETVAL -eq 0 ] && success || failure
> launched=1
> done
> [ "$launched" -eq 1 ] || passed
> echo
> else
> failure
> fi
> [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sqlrelay
> cleanup
> return $RETVAL
> }
>
> restart(){
> stop
> start
> }
>
> condrestart(){
> [ -e /var/lock/subsys/sqlrelay ] && restart
> return 0
> }
>
>
> # See how we were called.
> case "$1" in
> start)
> start
> ;;
> stop)
> stop
> ;;
> status)
> status sqlr-listener
> ;;
> restart)
> restart
> ;;
> reload)
> restart
> ;;
> condrestart)
> condrestart
> ;;
> *)
> echo "Usage: sqlrelay {start|stop|status|restart|condrestart}"
> RETVAL=1
> esac
>
> exit $RETVAL
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
>
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
|