Hi,
I've been using FB1.5 and access the database using Kinterbasdb +
Python. My connection is established using kinterbasdb.connect() method
and the parameters host, dns, database, user, password are all defaulted
to 'None'.
On my own machine running Mac OSX 10.3, I can connect using the following:
host = 'localhost'
database = '<my path to FB database>'
user = '<user>'
password = '<password>'
At the same time, I can also connect if I set host=None on my machine.
However, I cannot use 'localhost' on a shared Linux machine (not
allowed. Don't ask why, system admin's mandate. And the Linux machine is
without inetd). So when I set host=None, I get this error:
Connecting to Muscopedia Database
Connection:
localhost:/mnt/disk/home/mling/muscorian/BioDatabases/muscopedia.fdb:mouse:mouse
<-- default
None <-- actual host (with 'print self.dbhost' where
kinterbasdb.connect(host = self.dbhost,.....)
OperationalError
(-902, 'isc_attach_database: Unable to complete network request to host
"localhost".. Failed to establish a connection.. Connection refused. ')
File "muscorian.py", line 641, in main
result = mosys.run(command)
File "muscorian.py", line 597, in run
elif (command[0] == 'linkmuscopedia'):
self.commandLinkMuscopediaDB(command)
File "muscorian.py", line 129, in commandLinkMuscopediaDB
self.muscopedia = PubMedGrabber.FBUtilities(str(command[1]))
File "abcrawl/PubMedGrabber.py", line 340, in __init__
user = self.dbuser, password = self.dbpwd, charset='UNICODE_FSS')
File "/usr/lib/python2.2/site-packages/kinterbasdb/__init__.py", line
470, in connect
return Connection(*args, **keywords_args)
File "/usr/lib/python2.2/site-packages/kinterbasdb/__init__.py", line
608, in __init__
self._C_con = _k.attach_db(dsn, dpb, dialect)
Any ideas or solutions?
Thanks in advance.
Cheers
maurice 5 4515
Maurice LING wrote: I've been using FB1.5 and access the database using Kinterbasdb + Python. My connection is established using kinterbasdb.connect() method and the parameters host, dns, database, user, password are all defaulted to 'None'.
On my own machine running Mac OSX 10.3, I can connect using the following: host = 'localhost' database = '<my path to FB database>' user = '<user>' password = '<password>'
At the same time, I can also connect if I set host=None on my machine.
However, I cannot use 'localhost' on a shared Linux machine (not allowed. Don't ask why, system admin's mandate. And the Linux machine is without inetd). So when I set host=None, I get this error:
Just for my understanding: if you start your script on the machine hosting
the DB you're able to connect. If you start it on a different machine, you
are not able to connect without giving a hostname? Whats wrong with
offering the the name (or IP-address) of your MacOS-box instead of
'localhost' to the script?
Mathias
How is your Firebird database configured -- Classic Server or Super
Server? If it's in classic server mode, you don't need to worry about
the host portion. You do need to worry about permissions on the
database file. I got it to work by making it 664 and owner + group
firebird.
Grig
Mathias Waack wrote: Maurice LING wrote:
I've been using FB1.5 and access the database using Kinterbasdb + Python. My connection is established using kinterbasdb.connect() method and the parameters host, dns, database, user, password are all defaulted to 'None'.
On my own machine running Mac OSX 10.3, I can connect using the following: host = 'localhost' database = '<my path to FB database>' user = '<user>' password = '<password>'
At the same time, I can also connect if I set host=None on my machine.
However, I cannot use 'localhost' on a shared Linux machine (not allowed. Don't ask why, system admin's mandate. And the Linux machine is without inetd). So when I set host=None, I get this error:
Just for my understanding: if you start your script on the machine hosting the DB you're able to connect. If you start it on a different machine, you are not able to connect without giving a hostname? Whats wrong with offering the the name (or IP-address) of your MacOS-box instead of 'localhost' to the script?
Hi Mathias,
What I am trying to do is "port" a workable program from my own machine
(Mac OSX) to a larger machine (Linux). So, the DB and the program are
also on the same Linux machine.
On the Linux machine, I cannot use localhost, so I set host parameter in
kinterbasdb.connect() method to None, which is the default kinterbasdb
uses. On Linux machine, I get the error as posted. On my Mac OSX
machine, initiating host parameter to 'localhost' or None has no
difference, it works.
Thanks and cheers
Maurice
On Tue, 05 Jul 2005 09:35:25 +1000, Maurice LING <ma*********@acm.org>
declaimed the following in comp.lang.python: On the Linux machine, I cannot use localhost, so I set host parameter in
So... Does the machine have a defined name? Plug that name into
the connect.
Or just hard-code "127.0.0.1", the loopback IP # that normally
is assigned to "localhost" <G>
-- ================================================== ============ < wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG < wu******@dm.net | Bestiaria Support Staff < ================================================== ============ < Home Page: <http://www.dm.net/~wulfraed/> < Overflow Page: <http://wlfraed.home.netcom.com/> <
Maurice LING wrote: What I am trying to do is "port" a workable program from my own machine (Mac OSX) to a larger machine (Linux). So, the DB and the program are also on the same Linux machine.
On the Linux machine, I cannot use localhost, so I set host parameter in kinterbasdb.connect() method to None, which is the default kinterbasdb uses. On Linux machine, I get the error as posted. On my Mac OSX machine, initiating host parameter to 'localhost' or None has no difference, it works.
How do you connect to the Linux-DB using tools like isql?
Check you firebird config (most likely in /etc/firebird2/firebird.conf) for
the parameters "RemoteServicePort" and "RemoteBindAddress". And at least
try "netstat -alp | grep fbserv" (as root) to check if the firebird is
running properly.
If you're running the classic server you can simply follow Grig's advice and
connect "directly" to the db files.
Mathias This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: MiLF |
last post by:
Is it possible to write a Audio CD Player by using python only?
|
by: Jon Moldover |
last post by:
Hi, I'm using Python in my win32 app by linking to the python23.dll.
I'm trying to expose some c++ code in my app to Python so I can make
application calls from Python scripts (according to the...
|
by: The_Incubator |
last post by:
As the subject suggests, I am interested in using Python as a scripting
language for a game that is primarily implemented in C++, and I am also
interested in using generators in those scripts...
...
|
by: Sridhar R |
last post by:
Hi,
I am a little experienced python programmer (2 months). I am somewhat
experienced in C/C++. I am planning (now in design stage) to write an
IDE in python. The IDE will not be a simple...
|
by: Joakim Persson |
last post by:
Hello all. I am involved in a project where we have a desire to
improve our software testing tools, and I'm in charge of looking for
solutions regarding the logging of our software (originating...
|
by: P. Adhia |
last post by:
Hello,
I was wondering if anyone is successfully using using
Python(2.5)+DB2+pydb2. I get an error in all situations. It seems that
this problem might be limited to python 2.5. A quick Google...
|
by: dominiquevalentine |
last post by:
Hello, I'm a teen trying to do my part in improving the world, and me
and my pal came up with some concepts to improve the transportation
system.
I have googled up and down for examples of using...
|
by: Vicent Giner |
last post by:
Hello.
I am new to Python. It seems a very interesting language to me. Its
simplicity is very attractive.
However, it is usually said that Python is not a compiled but
interpreted programming...
|
by: fatimang |
last post by:
can someone give me codes or things to use on connecting Python to MS Access.
thank you in advance..
GOD BLESS..
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |