Subject Re: [firebird-support] How to start Firebird server, and how to connect (on Linux)?
Author Milan Babuskov
that.SelectedDude wrote:
> # Yes it does.
> # Become root to exclude file permission issues:
> robert@ubuntu:/usr/lib/firebird2/bin$ sudo -s
> # I'm root now.

Doesn't help. The server runs as user "firebird" independently of you.

> # Try to connect to the database:
> root@ubuntu:/usr/lib/firebird2/bin# ./isql
> localhost:/usr/lib/firebird2/examples/employee.fdb -user sysdba -pass
> masterkey

You used the "localhost:..." connection string. This means that the
client (isql) will try to establish TCP/IP connection to server at port
3050. The server itself runs as user "firebird" so file:

/usr/lib/firebird2/examples/employee.fdb

has to be readable by user "firebird". From "ls -l" output you sent,
that is clearly not the case:

-rw-r--r-- 1 root root

If you wish to have advantage of being "root", connect directly to the
database file:

./isql /usr/lib/firebird2/examples/employee.fdb

That should work, but it doesn't solve the initial problem.

> Statement failed, SQLCODE = -902
>
> Unable to complete network request to host "localhost".
> -Failed to establish a connection.
> -Connection refused

Perhaps you have firewall active, or inetd is dropping the connection.
Take a look at /etc/hosts.allow and /etc/hosts.deny files if they exist
on your system. Also try:

iptables -t nat --list

to see if you have some firewall rules set up.

--
Milan Babuskov
http://swoes.blogspot.com/
http://www.flamerobin.org