Subject installation - configuration ; troubles : various / newbie :!
Author mikaelderrien
Hi,

i've spent the past days and nights fighting with firebird, i think
this *****
won the first round : i'm exhausted, half-fool and
slighlty...nervous.han!

i compiled here all the issues i met, i had solved some of them but
the others
below are still resisting and i merely don't understand where it
went wrong.

this is quit long, any help, any hint, any idea to any of the
question or problems
described in this message is welcome.

i've installed firebird super server 1.5 RC4 on a suse 8.2 and it
runs quite well
but i've got several issues.
first of all, i had to make some changes in miniInstall.sh, here is
my version :

***CODE**************************************************************
*********************

#!/bin/sh

LinkLib()
{
[ -f $2 ] || ln -s $1 $2
}

echo This script will register firebird in /etc/init.d and start it.
echo press ENTER to continue...
read x

cp -iv firebird.initd /etc/init.d/firebird
chmod -v +x /etc/init.d/firebird
chkconfig -a firebird

ln -fs /etc/init.d/firebird /usr/sbin/rcfirebird

LinkLib /usr/local/firebird/lib/libfbclient.so.1.0.0 /usr/lib/libfbcl
ient.so.1.0.0
LinkLib /usr/lib/libfbclient.so.1.0.0 /usr/lib/libfbclient.so.1
LinkLib /usr/lib/libfbclient.so.1 /usr/lib/libfbclient.so
LinkLib /usr/local/firebird/lib/libib_util.so /usr/lib/libib_util.so

/etc/init.d/firebird start

***\EOC**************************************************************
************************

i had to make some changes too in the original firebird.initd :

***CODE**************************************************************
**************************

#! /bin/sh
### BEGIN INIT INFO
# Provides: firebird
# Required-Start: $network $remote_fs
# X-UnitedLinux-Should-Start:
# Required-Stop:
# X-UnitedLinux-Should-Stop:
# Default-Start: 2 3 5
# Default-Stop: 0 6
# Short-Description: Start the FireBird DataBase SuperServer master
daemon
# Description:
### END INIT INFO

: ${FIREBIRD:=/usr/local/firebird}
: ${ISC_USER:=SYSDBA}
: ${ISC_PASSWORD:=masterke}
: ${FBRunUser:=root}

export FIREBIRD
export ISC_USER
export ISC_PASSWORD

# Check for missing binaries : test, if fbmgr.bin actually exists
and check the file is executable.
MANAGER=$FIREBIRD/bin/fbmgr.bin
[ -x $MANAGER ] || exit 5

# Check for existence of needed config file and read it ; source
SuSE config.
#FB_SYSCONFIG=$FIREBIRD/firebird.conf
#[ -r $FB_SYSCONFIG ] || exit 6
#. $FB_SYSCONFIG

. /etc/rc.status

# Reset status of this service
rc_reset


case "$1" in

start)

echo -n "Starting FireBird SuperServer:"
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.

startproc -n +20 -u $FBRunUser $MANAGER -start -forever &&
read x

# Remember status and be verbose
rc_status -v
;;


stop)

echo -n "Shutting down FireBird SuperServer:"
## Stop daemon with killproc(8) and if this fails
## killproc sets the return value according to LSB.

$MANAGER -shut

# Remember status and be verbose
rc_status -v
;;


try-restart)

## Do a restart only if the service was active before.
## Note: try-restart is not (yet) part of LSB (as of 1.2)

$0 status >/dev/null && $0 restart

# Remember status and be quiet
rc_status
;;


restart)

## Stop the service and regardless of whether it was
## running or not, start it again.

$0 stop
$0 start

# Remember status and be quiet
rc_status
;;


force-reload)

## Signal the daemon to reload its config. Most daemons
## do this on signal 1 (SIGHUP).
## If it does not support it, restart.

$0 stop && $0 start
rc_status
;;


status)

echo
echo -n "Checking for FireBird SuperServer:"

# NOTE: checkproc returns LSB compliant status values.
checkproc -v $FIREBIRD/bin/fbserver

echo
echo -n "Checking for firebird GUARDIAN:"
checkproc -v $FIREBIRD/bin/fbguard

# NOTE: rc_status knows that we called this init script with
# "status" option and adapts its messages accordingly.
rc_status -v
;;


*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-
reload}"
exit 1
;;

esac
rc_exit

***\EOC**************************************************************
*********************

QUESTIONS :

- i'm not familiar with the use of services in INIT INFO paragraph,
what are the interests of
loading all of them in Required-start ?

- i tried to bind firebird.conf in this init script ($FB_SYSCONFIG)
but it fails ; is this idea
useful and exploitable ?

- in the original firebird.initd script there's the line :
#chkconfig 345 20 80
what these numbers mean ? runlevel 3,4 and 5 with nice priority +20
on port 80 ? or something
completely different ?
i guess RETVAL=$ is the same function as rc_status -v, am i wrong ?

- when this script starts the server, there's a little wait during
FBmanager processes but during
this time this script ends and returns the status 'running' before
FBmanager gives his message
'server successfully started' - that's why i added '&& read x' in
cas start (is there any other
way to fix that ?)
server runs correctly, i can use firbird utilities as i wish but a
look in firebird.log shows me :

PCname1 (Client) DATE-----YEAR
INET/inet_error: connect errno = 111
What does that mean ?
Moreover, i thought my computer was 'server' and it prints...
client. Hu.

- i've made the same installation, on an other computer, same OS,
same versions, but when starting
firebird server, rc.status returns 'running', FBmanager
returns 'check $FIREBIRD/firebird.log file
for erros - can not start server' and if i check process, fbguard
and fbserver run.
(i verified the file hosts.equiv, 127.0.0.1 and 127.0.0.2 are
written in) ; then :

$FIREBIRD/bin # ./gsec {ENTER}
connection rejected by remote interface
unable to open database
$FIREBIRD/bin # ./isql {ENTER}
statement failed
error, SQL CODE=-923

but if i do ./gsec (or ./isql) with -user sysdba -password masterkey
it's okay. I think something is wrong with the export in my firebird
init script but i don't understand what.

Finally, when looking at firebird.log, i see :
PCname2 (Server) DATE------YEAR
SERVER/process_packet : connection rejected for root
why is this one server ? And what this error means ?

- is there any interest in linking libfbclient librairies in a
directory /usr/lib/firebird instead of directly
/usr/lib ?
- why not linking fbintl.so, fb_udf.so and ib_udf.so ? i don't
understand when and how use them.

- i use aliases.conf and modified firebird.conf in order to set
directories but it doesn't work, even after a restart,
i must each time specify the complete path. any idea ?

- why is there several (at least three) processes of fbserver
running at the same time ?
- i wanted to put an option 'probe' in my init script but FB doesn't
generates file-like /var/run/firebird.pid ; is it easy
and useful to create one ?


IN FIREBIRD.CONF :

- what is nagle algorithm ?
- what's the use of backward compatible parameter ordering ?


FBGUARD : what is 'signore' ? what is 'onetime' ?

FBMGR : i noticed the options -start and -forever are not register
in the help of FBmanager, are there other hidden commands ?

FBSERVER : how use it and its options when started with the
manager ? i can't see the point of it !

GDS... : the only option i found to gds_drop is -l (successfully
removed semaphores) and to gds_relay is... -z. hu, not very useful.
any available free doc about that ?

fanx, ... u've reached the end :
M.




"firebird is the path path to coffee
coffee is the path to never sleep
never sleep is the path to madness"
YODA