Firebird server on Linux, cleint on windows

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
dudeski
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 04.11.2005, 01:09
Location: Skopje
Contact:

Firebird server on Linux, cleint on windows

Post by dudeski »

Firebird server in instaled on linux server but clients are using windows. Client is delphi 7 application for windows.
If I install Firebird on windows mashine I use next settings on run time:

CONNBAZA.Protocol:='firebird-1.5';
CONNBAZA.HostName:='10.10.0.2';
CONNBAZA.Port:= 3051;
CONNBAZA.Database:= 'e:\DELPHI\KORISNIK.FDB';
CONNBAZA.Password:= 'masterkey';
CONNBAZA.User:= 'SYSDBA';
CONNBAZA.LoginPrompt:= False;
CONNBAZA.ReadOnly:= False;
CONNBAZA.TransactIsolationLevel:= tiReadCommitted ;

and every thing is ok.
But on linux server I can't make it work.

How to write connection string on run time for TZConnection component?
Do I need to make some aditional settings?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi,

I have very little experience with Firebird, but when you connect to a different server I think easiest way is to create an alias on the server. (there is an aliases file in the firebird directory and (on windows) there is an example entry provided. You can use that alias name as database name in zeoslib. I only did this on windows but it should work on Linux as well, I think. This way you don't have to use path names.

Mark
dudeski
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 04.11.2005, 01:09
Location: Skopje
Contact:

Post by dudeski »

I'll try that.
All settings for connection are stored in external file so if I make instalation on some other plase I can only change path and ip and thats it. I don't have same network structure in every place.

I make ti work with IB expert but not with zeos connection component.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Oh... How are your connection settings for IBExpert? Maybe we should figure out where it goes wrong.
What's the error that is reported?
Mark
gto
Zeos Dev Team
Zeos Dev Team
Posts: 278
Joined: 11.11.2005, 18:35
Location: Porto Alegre / Brasil

Post by gto »

CONNBAZA.Protocol:='firebird-1.5';
CONNBAZA.HostName:='10.10.0.2'; // the ip for the server
//CONNBAZA.Port:= 3051; // only assign this if it's not the default port
CONNBAZA.Database:= 'e:\DELPHI\KORISNIK.FDB'; // the path on server!
CONNBAZA.Password:= 'masterkey';
CONNBAZA.User:= 'SYSDBA';
CONNBAZA.LoginPrompt:= False;
CONNBAZA.ReadOnly:= False;
CONNBAZA.TransactIsolationLevel:= tiReadCommitted ;

please take a closer look at Database property. It is relative to the database on server. This means, if your database is stored in /var/data/myDb.fdb, this will be your Database property, the server path of database.
Use the FU!!!!!IN Google !

gto's Zeos Quick Start Guide

Te Amo Taís!
dudeski
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 04.11.2005, 01:09
Location: Skopje
Contact:

Post by dudeski »

mdaems wrote:Oh... How are your connection settings for IBExpert? Maybe we should figure out where it goes wrong.
What's the error that is reported?
Mark
In IBExpert connection settings are:
Server=Remote
ServerVersion=firebird-1.5;
ServerName:=10.10.0.254/3050
DatabaseFile:= /media/backupdisk/EsAppBAZA/baza.FDB
DatbaseAlias=DatbaseAlias
Password:= 'masterkey';
User:= 'SYSDBA';

statment from IBExpert

Attempting to connect to:
10.10.0.254/3050:/media/backupdisk/EsAppBAZA/baza.FDB

Connecting... Passed!
Server version: LI-V6.3.3.4870 Firebird 1.5

Attempting to connect to services manager... Passed!

Disconnecting from database... Passed!


I made same setings directly in TZConnection commponent but it didn't work.
This is message
2006-11-10 11:05:10 cat: Connect, proto: firebird-1.5, msg: Unable to complete network request to host "10.10.0.254". Failed to establish a connection. No connection could be made because the target machine actively refused it.
, errcode: -902, error: Unsuccessful execution caused by a system error that precludes\nsuccessful execution of subsequent statements
gto
Zeos Dev Team
Zeos Dev Team
Posts: 278
Joined: 11.11.2005, 18:35
Location: Porto Alegre / Brasil

Post by gto »

No connection could be made because the target machine actively refused it.
Wow! Very strange o.O

That's the same machine? the way IBExpert uses to connect on firebird isn't much different that zeos uses.
Use the FU!!!!!IN Google !

gto's Zeos Quick Start Guide

Te Amo Taís!
dudeski
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 04.11.2005, 01:09
Location: Skopje
Contact:

Post by dudeski »

Machine is same. Now you see my problem :-(
dudeski
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 04.11.2005, 01:09
Location: Skopje
Contact:

Post by dudeski »

I don't want to ask too mutch, but is it possible some of you to try to make configuration what I have? Firebird server on linux, client application on windows ? I'm interested in results.
Thank you.
gto
Zeos Dev Team
Zeos Dev Team
Posts: 278
Joined: 11.11.2005, 18:35
Location: Porto Alegre / Brasil

Post by gto »

Hello dudeski! I have this configuration up and running on a costumer. Server linux (openSUSE 10) with firebird 1.5, and all clients Windows (from 98 to XP). And, well, everithing works !
Use the FU!!!!!IN Google !

gto's Zeos Quick Start Guide

Te Amo Taís!
dudeski
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 04.11.2005, 01:09
Location: Skopje
Contact:

Post by dudeski »

can you please send settings.
gto
Zeos Dev Team
Zeos Dev Team
Posts: 278
Joined: 11.11.2005, 18:35
Location: Porto Alegre / Brasil

Post by gto »

Well, it's almost the thing you have done.

Protocol is 'firebird-1.5', Hostname is the ip adress of server (192.168.1.1, in case), Database is the path on server (/raid/dados/dados.fdb), User and Password for the server (I've changed the SYSDBA default pass) and TransIsolation is tiReadCommited.
With I don't mention, is set to default.
Use the FU!!!!!IN Google !

gto's Zeos Quick Start Guide

Te Amo Taís!
dudeski
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 04.11.2005, 01:09
Location: Skopje
Contact:

Post by dudeski »

I find the source of problem.
Server configuration was wrong.
But also it was confusing becouse when I put ServerName:=10.10.0.254/3050 in IBexpert everything was fine but when I put ServerName:=10.10.0.254 I have error.
So I changed port to 3051 and every thing is fine now.
Post Reply