Connection Problem - Win7 Client to Linux Server

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Connection Problem - Win7 Client to Linux Server

Eric Apperley

I would appreciate help to firstly identify where the problem lies and then guidance on how to alleviate the issue.


Since I can successfully connect to the remote machine (database server) using the ISQL tool, and since the OS

of the remote database server machine is not Windows, I'm wondering whether this is something simple like

a character set mismatch??  


THE ISSUE

========


We are unable to connect to the sample database ("employee.fdb") on a Linux server from a Windows 7 client using

FlameRobin.  We can however successfully connect from the Windows PC to the Linux Firebird server using the ISQL tool. 


FlameRobin displays the following error dialog window information after an attempted connection attempt to the

sample database:


   *** IBPP::SQLException ***

   Contect: Database:Connect 

   Message: isc_attach_database_failed


   SQL Message : -904

   Unsuccessful execution caused by an unavailable resource.


   Engine Code : 335544375

   Engine Message: unavailable database



WHAT IS WORKING

================


1. We are able to connect to the Linux server database using the ISQL tool on the Windows 7 PC and perform

SQL commands.


2. We are able to successfully retrieve the server version from the Linux Firebird server using FlameRobin on

the Windows 7 PC.



THE SETUP

=========


(Remote) Firebird Server under Linux

-------------------------------------------------

Server version :  LI-V2.5.6.27020 Firebird 2.5
Operating System :  Linux Mint 18


By default the Firewall is disabled in Linux Mint.  We can ping the Server machine from the windows 7 PC

and successfully request the server version from FlameRobin, plus ISQL works remotely, so the port is open.


The Firebird configuration file (firebird.conf) has been edited to remove the binding to "localhost" so that

we can remotely access the database server, i.e.

"RemoteBindAddress = localhost" changed to "RemoteBindAddress = ".  When this was done the ISQL tool
connected successfully to the "employee.fdb" database on the Linux server.

The default Firebird TCP port has not been modified from the default value of 3050.

The database alias in the aliases configuration file (aliases.conf) for the "employee.fdb" database has been corrected to match the installation:
   employee.fdb = /var/lib/firebird/2.5/data/employee.fdb

The server machine has been rebooted after the configuration changes.


Windows 7 (Client) PC

----------------------------

FlameRobin version: 0.9.3 Unicode x64, using

* IBPP library version :   2.5.2.1,

* wxWidgets library version :  3.1.0,

* Boost library version :  1.63.0


ISQL version :  WI-V2.5.7.27050 Firebird 2.5  



Successful Command Sequence from ISQL Tool

--------------------------------------------------------------

After supplying username and password on entering the ISQL command:

    CONNECT 'celeron-pc:/var/lib/firebird/2.5/data/employee.fdb';


FlameRobin Server Registration Details

---------------------------------------------------

Display name : Celeron PC

Hostname : 192.168.35.81   (this is the static IP address of the remote Linux firebird server - on the same LAN)

Port number : 3050



FlameRobin Database Registration Details for "employee.fdb"

---------------------------------------------------------------------------------

Display name : Employee on Celeron

Database path : 192.168.35.81:employee.fdb    (note the alias definition above)

Authentication :  Use saved user name, but always enter password

Username and Password - same as entered in ISQL tool

Charset :  None

Role :  (blank)







------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Connection Problem - Win7 Client to Linux Server

Eric Apperley
OK, I have now solved this myself.

The problem related to my misunderstanding of the field "Database path" in the Database Registration dialogue.

I had (erroneously) perceived that the "Database path" needed to be the complete path to the remote database, i.e. including the IP address of the remote machine - this was incorrect.

If I'd thought about it a bit longer I would have recalled that the Sever Registration Info" dialogue already provides sufficient information (from the "Hostname" field of the dialogue) to allow FlameRobin to find the path to the physical database server machine across the network.  Therefore, all that is required in the "Database path" field when registering a specific database on the server is the local OS path on that machine to the actual database file (or the alias defined for the database file).

So, in summary, it appears that FlameRobin concatenates the "Database path" information preceded by a colon (":") to the "Hostname" information.

If this fact  isn't already included in the HOWTOs or general documentation for using FlameRobin with a remote server (maybe I missed it) then I suggest that it be added to those documents.

Eric.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Connection Problem - Win7 Client to Linux Server

Michael Hieke
Hi Eric,

On 02.04.2017 08:28, Eric Apperley wrote:

> If this fact  isn't already included in the HOWTOs or general
> documentation for using FlameRobin with a remote server (maybe I
> missed it) then I suggest that it be added to those documents.

It's documented in the FlameRobin manual, under "Getting started / basic
features" and there under "Adding a server" and "Adding an existing
database" respectively.  It looks properly documented to me, but if you
had problems with it that suggests that maybe it isn't.

Anyway, best practice IMHO is to not use a database path at all, but an
alias.  It removes DBA concerns from the client connection string.  Best
documentation for this is found in the Firebird package.

Regards

--
Michael Hieke


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Connection Problem - Win7 Client to Linux Server

Eric Apperley
Michael,

Thanks for the response.

Yes, just after posting I did set up an alias and that is the easiest approach, as you suggested.

Regards,

Eric
Loading...