Subject Re: [firebird-support] How to start Firebird server, and how to connect (on Linux)?
Author that.SelectedDude
Thanks for your competent reply Milan.

First off, I've identified a file /etc/xinetd.d/firebird2, which I
edited as therein suggested, and rebooted after that. The original file
is attached for the record.

Now (after the reboot, not before) there is a process named inetd.

However, I still can't connect:

-------------------------------------------------------------
# Check whether the sample database exists:
robert@ubuntu:/usr/lib/firebird2/bin$ ls
-l /usr/lib/firebird2/examples/employee.fdb
-rw-r--r-- 1 root root 1028096 2006-08-02
04:26 /usr/lib/firebird2/examples/employee.fdb
# Yes it does.
# Become root to exclude file permission issues:
robert@ubuntu:/usr/lib/firebird2/bin$ sudo -s
# I'm root now.
# Try to connect to the database:
root@ubuntu:/usr/lib/firebird2/bin# ./isql
localhost:/usr/lib/firebird2/examples/employee.fdb -user sysdba -pass
masterkey
Statement failed, SQLCODE = -902

Unable to complete network request to host "localhost".
-Failed to establish a connection.
-Connection refused
Use CONNECT or CREATE DATABASE to specify a database
SQL>
-------------------------------------------------------------

So the status is, there's still no connection.


Below there are replies to your remarks. These are just "for the record"
and for clarification, and don't need to be read by everyone.

Thanks again.


> > I've started /usr/lib/firebird2/bin/fb_inet_server though
>
> I hope that by "I've started" you don't mean that you started it
> manually, but rather that (x)inetd has started it?

No, I've started it because I couldn't see any (other) Firebird process
running. I was hoping this might be the central Firebird process.

> ps ax | grep inetd

inetd was not running before I edited /etc/xinetd.d/firebird2, but now
is running.

> check wheter tcp port 3050 is open

Port 3050 has not been open.

> As I recall, there were problems with Debian package that you
couldn't
> access employee database out-of-the-box (some symlinks messed up). I
> guess Ubuntu is using the same package?

The employee database is delivered in .gz format and you need to extract
it first. I've done that.

> Anyway, while installing, it should ask you for sysdba password. You
can
> try with that:
>
> cd /usr/lib/firebird2/bin/
> ./isql localhost:/usr/lib/firebird2/examples/employee.fdb -user
> sysdba
> -pass your_password

At install time, there was no user interaction required. The SYSDBA
password should be 'masterkey' or 'masterke'.
The result of the command you suggested is quoted at the very top of
this message.

> If that fails, I suggest you define your own directory for databases
> (for example: /dbases) and make that your sandbox. You need to set
> user
> "firebird" as owner of directory, and give it al least 700
> permissions.

I became root to bypass file permission issues.

> My overall impression is that whoever made the Debian packages has
> unnecessarily complicated things. You might want to try and install
> Firebird from the official .tar.gz package found on the website. I
> find
> it to be consistent accross different distributions, so you don't
> have
> to learn the Debian/Ubuntu specifics.

If there'll be no other suggestions, I'll try that.
My own impression is that actually, Firebird should be easy to use,
i.e., its SQL implementation is clean.
The problem is just how to get started.

Thanks and cheers
Robert


On Tue, 2006-08-01 at 21:44 +0200, Milan Babuskov wrote:
> that.SelectedDude wrote:
> > This is on Ubuntu Linux. I've installed Firebird Classic Server
> 1.5.3
> [...]
> > This should mean Firebird Server isn't started.
> > I've started /usr/lib/firebird2/bin/fb_inet_server though
>
> I hope that by "I've started" you don't mean that you started it
> manually, but rather that (x)inetd has started it?
>
> > Any hints on how to proceed?
>
> First check if you have inetd or xinetd installed and running. A
> simple:
>
> ps ax | grep inetd
>
> should do it.
>
> Then, you could also check wheter tcp port 3050 is open with commands
> like lsof, netstat or nmap.
>
> Before going to GUI tools, try with isql, which is probably in:
>
> /usr/lib/firebird2/bin/isql
>
> As I recall, there were problems with Debian package that you
> couldn't
> access employee database out-of-the-box (some symlinks messed up). I
> guess Ubuntu is using the same package?
>
> Anyway, while installing, it should ask you for sysdba password. You
> can
> try with that:
>
> cd /usr/lib/firebird2/bin/
> ./isql localhost:/usr/lib/firebird2/examples/employee.fdb -user
> sysdba
> -pass your_password
>
> If that fails, I suggest you define your own directory for databases
> (for example: /dbases) and make that your sandbox. You need to set
> user
> "firebird" as owner of directory, and give it al least 700
> permissions.
>
> /usr/lib/firebird2/bin/isql
> SQL> create database '/dbases/test1.fdb';
>
> If this fails as well, you might need to edit the file
> /etc/firebird2/firebird.conf and uncomment the DatabaseAccess setting
> (you can leave it on Full for testing, and set it to /dbases later).
>
> My overall impression is that whoever made the Debian packages has
> unnecessarily complicated things. You might want to try and install
> Firebird from the official .tar.gz package found on the website. I
> find
> it to be consistent accross different distributions, so you don't
> have
> to learn the Debian/Ubuntu specifics.
>
> --
> Milan Babuskov
> http://swoes.blogspot.com/
> http://www.flamerobin.org
>
>
>
>
>

----------

# default: off
# description: FirebirdSQL server xinetd configuration fragment
#
# To enable xinetd support for firebird2-classic-server, do the following
# 1. make sure xinetd is installed
# 2. disable gds_db servide in inetd. The easiest way to do this is to run
# update-inetd --disable gds_db
# 3. comment out the line below that reads "disable = yes"
#
service gds_db
{
flags = REUSE
socket_type = stream
wait = no
user = firebird
# These lines cause problems with Windows XP SP2 clients
# using default firewall configuration (SF#1065511)
# log_on_success += USERID
# log_on_failure += USERID
server = /usr/lib/firebird2/bin/fb_inet_server
# disable = yes
}


[Non-text portions of this message have been removed]