Subject Re: [firebird-support] Connection by alias fails
Author Paul Vinkenoog
jarni_ua wrote:

> I'm trying to connect to database file testdb.fdb stored on my remote linux machine at /var/lib/firebird/2.0/data/testdb.fdb. I've defined alias for this file in aliases.conf as
>
> online_test = /var/lib/firebird/2.0/data/testdb.fdb
>
> Now I'm trying to connect to this database from my program using this alias (IBPP library is used) but I receive the following error:
> *** IBPP::SQLException ***
> Context: Database::Connect
> Message: isc_attach_database failed
>
> SQL Message : -902
> Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements
>
> Engine Code : 335544344
> Engine Message :
> I/O error during "open" operation for file "online_test"
> Error while trying to open file
> No such file or directory
>
> Note that if I use full path to the database instead of alias (connection string is remote_host:/var/lib/firebird/2.0/data/testdb.fdb instead of remote_host:online_test) the connection is successfull and all works fine.
>
> First I thought that the access right may be involved because I've installed FB SS as root. So I've changed /etc/firebird/ rights recursively to firebird:firebird. Still the same.

This error occurs when either the alias doesn't exist, or the alias exists but the file it points to doesn't.

Are you sure that Firebird expects aliases.conf to be in /etc/firebird and not for instance in /opt/firebird ?

Also, as what user is the Firebird *process* running? And does this user have access to aliases.conf?

And if you log onto your linux machine and connect locally to online_test, what happens?
(If you run Classic or SuperClassic, try both 'online_test' and 'localhost:online_test')


Paul Vinkenoog