Recent

Author Topic: I need help with basic firebird connection  (Read 11157 times)

jluix

  • New Member
  • *
  • Posts: 19
I need help with basic firebird connection
« on: March 14, 2007, 09:58:46 pm »
Hi! I'm probing firebird in ubuntu edgy and, after two days I've working client flawor (version 2). Just now I'm working with a database through isql, so I think  is all right... but I can't connect to that database with ibconnection control. I follow the instruction of several topics in this ans others forums, but it's always the same error at runtime and at design-time:

project raised exception class 'EIBDatabaseError' with message:
IBConnection1 : DoInternalConnect:
Unable to complete network request to host localhost
Failed to stablish a connection
Conexion rechazada.

I'm almost to give up. Please, help me.

PD: I'm running fb_inet_server.
PD2: I've tried to load fb ODBC with unixODBC after downloading OdbcFb32-beta-2.0.0142.tar.gz from ibphoenix and, another time, I wasn't able.

krsears

  • New Member
  • *
  • Posts: 19
RE: I need help with basic firebird connection
« Reply #1 on: March 14, 2007, 10:52:18 pm »
Make sure that you add the

gds_db 3050/tcp # Firebird SQL Database Remote Protocol

line to your /etc/services file and add the corresponding service definition to your inetd service definitions.

isql connects directly so it may not show you the network error that you're getting with ibconnection.

I use firebird with lazarus with no problems (other than a multiselect issue with tdbgrid :-)

Kendall

jluix

  • New Member
  • *
  • Posts: 19
I need help with basic firebird connection
« Reply #2 on: March 15, 2007, 07:37:58 pm »
Well, the first part is done (added the line to /etc/services).

But I don't have idea about how to do the second part (adding the service to inetd). I've been working for a lot of years in windows, but only two months with ubuntu and linux in general.

I'll thank you very much if you help me to finish this work.

krsears

  • New Member
  • *
  • Posts: 19
I need help with basic firebird connection
« Reply #3 on: March 16, 2007, 05:04:32 am »
Add the following to your xinetd.d directory (or the equivalent that you might be using) and call it "firebird" or something that makes sense to you.  The filename isn't important but the contents are.

Kendall
--

# default: on
# description: FirebirdSQL server
#
# Be careful when commenting out entries in this file.
# Active entry should be first as some scripts
# (CSchangeRunUser.sh in particular) use sed scripting
# to modify it.
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                  = /opt/firebird/bin/fb_inet_server
    disable         = no
}

jluix

  • New Member
  • *
  • Posts: 19
I need help with basic firebird connection
« Reply #4 on: March 16, 2007, 10:08:48 pm »
Well...

It's starting to work, at least apparently.

I got, at design time, a correct link between my database file an a dbgrid trough a select into a sqlquery. But at runtime, the program gives me (in console mode) the messasge:

./project1: symbol lookup error: /usr/lib/libgds.so: undefined symbol: crypt

and then, it ends. I don't know why. Now, I'm working with the version #1 of firebird (tomorrow I'm going to try the #1.5 and #2 version to see if it work another time), and I'm not sure which parameters I have to use in tibconnection component (for instance the Dialect number), and at the moment I haven't found documentation about it. Perhaps this is the problem. What do you think?

Many thanks!

krsears

  • New Member
  • *
  • Posts: 19
I need help with basic firebird connection
« Reply #5 on: March 17, 2007, 03:28:51 am »
You'll need at least 1.5.2 of libgds to get the correct crypt API call.  The dialect will depend on your database file.  If you're creating a new database then always use dialect 3.  Dialect 1 is for legacy databases only.  Everything else works the same regardless of the Firebird version.

Kendall

jluix

  • New Member
  • *
  • Posts: 19
I need help with basic firebird connection
« Reply #6 on: March 17, 2007, 02:37:52 pm »
No way.

I've installed firebird 2.0 version.

Then, I checked /etc/services has the line you told me.

Afte that, I put into a file called firebird the lines you suggested me in /etc/xinetd.d (even in initd.d too).

I can connect and create firebird databases through isql, but I can't link those databases in Lazarus (I probed fblib component too, and the same result).

The error, always, is:

SQL Code: -999
Unable to complete network request to host "localhost".
Failed to stablish a connection.
Conexion rechazada.

Ah! I haven't any firewall neither proxy (but I think it hasn't anything to do with my issue).

krsears

  • New Member
  • *
  • Posts: 19
I need help with basic firebird connection
« Reply #7 on: March 18, 2007, 01:25:52 am »
I *HATE* when that happens.  Usually I will get around that issue by using a non localhost IP.

ifconfig lo:0 192.168.0.123

then I will enter a name for that IP in /etc/hosts.  Use that as your server name.

It's a hack but it does work for me when I run into that particular issue.

 

TinyPortal © 2005-2018