可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I've got a seemingly unique issue on just one computer in the company (had to be my boss's). I've got a program from Borland C++ that uses a TSQLConnection
. It connects to a local Firebird server 2.1.1.17910 running as an application. The other computers work fine.
It will absolutely not connect on this one lappy (local server) for anything. I remember he always had trouble with InterBase when it was installed as well. I think he installed up to 7.5 possibly. It's gone now and I went through and wiped out any old GDS32.dll files and updated them with the FireBird ones, and the connection is using fbclient.dll anyways...
I tried uninstalling and reinstalling FB and running it as a service. Didn't work.
I went into etc/services and added in this line:
gds_db 3050/tcp #Firebird
No dice.
Sticking "localhost:" in front of the database location gets this error
Unable to complete network request to host "localhost".
Failed to establish a connection.
I checked netstat, it's listening on 127.0.0.1 port 3050...
Tried sticking "127.0.0.1:" before the database location, I get:
connection rejected by remote interface
Tried taking 127.0.0.1 or localhost out entirely and just using the database location, which is the right location, I get
Unavailable Database.
The exact same CD works fine on other machines. I tried sticking "localhost", "127.0.0.1", and nothing at all in front of the database location and all connect fine on other machines.
I've made him turn his firewall off, still no dice... This problem has been going on for a long time and I'm at the end of my rope. I've tried everything I can possibly think of. It works fine on my computer, blank test computers, for the beta testers... everybody except my boss. Any help would be vastly appreciated.
回答1:
I had "exactly" same problem now today 5/11-2011
and went to work quite methodically on the issue.
Searched internet for hints and tips.
I tried uninstalling my Firebird 2. I reinstalled it. Same error persisted when I tried using database via Delphi.
I renamed GDS32.DLL in system32 folder and copied it from another computer where everything was working fine.
Still same problem. Always refusing to connect to the database for some reason.
I checked the logfile of Firebird and.. yes. it always refuse, but when I use IB-Console, I can create a new database or work with existing ones.
I decided to do one final attempt and uninstalled Firebird again.
I then deleted the rest of the installation in programfiles\firebird.
I did a complete registry check with AML Free registry cleaner. (I think most good ones will do)
It found about 1500 entries that were invalid and I just decided to "Fix All"
When finished, I reinstalled firebird 2. Installed it as a server.
Voila.
I can now use IBqueries and SQL Databases with Firebird in my development of software again.
My best guess is that something was wrong with Windows Registry, although I can not pinpoint this.
Good luck and best regards.
Morten, Norway, a very late Saturday evening.
回答2:
I authored the "InterBase Operations Guide" way back in 1998, when I worked for Borland. I tried to address troubleshooting for common connection-related errors.
Connection Refused is when the client application cannot complete a network connection to the IB/FB server at all. If a firewall were blocking connections, this is the error you'd get.
Connection Rejected is when the network connection reached the database server, but the database server decided to terminated the connection request. Reasons for this include:
- You entered the wrong path to the database.
- You specified an incorrect username or password (i.e. they don't match entries in
isc4.gdb
).
- The database directory is on a networked filesystem. It must be on a filesystem that is physically local to the laptop.
- The database server process doesn't have filesystem-level permission to read & write the database files (including
isc4.gdb
). Could there be anti-virus software or other filesystem security blocking I/O for unauthorized processes?
回答3:
For those who have smilar problem. A common problem on 64-bit OS: bad copies of GDS32.DLL and FBCLIENT.DLL are in C:\Windows\SysWOW64
directory. Uninstall FireBird, remove all copies of mentioned libraries from both C:\Windows\System32
and C:\Windows\SysWOW64
and then reinstall FireBird. It will create new and valid copies of those libraries for both 64bit and 32bit applications.
回答4:
I just worked through a similar problem with an old D7 Interbase client app connected to Firebird 1.5.x on a remote linux server. To get things working, I migrated the XP Interbase client directory structure to a Win7 x64 workstation, and wrote a registry entry similar to the following:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Borland\InterBase\CurrentVersion]
"RootDirectory"="c:\\utils\\INTRBASE"
which in my case is necessary to locate the ib_licen.dat file. The migrated IB tools also worked but required the correct GDS32.DLL file that was located in the system32 directory of the retired XP workstation.
On the active Win7 workstation, I didn't bother hunting down and deleting gds32.dll files especially since I have a newer but incompatible gds32.dll installed in SysWow64. So to make D7 and the app happy, I copied the older GDS32.DLL file to the same directories containing D7 (delphi32.exe) and the compiled app; not exactly practical but workable. The DLL was also copied to the BDE directory for the convenience of using bdeadmin.exe to maintain the corresponding Interbase alias.
By the way, the connection rejected by remote interface message that I received via bdeadmin.exe was symptomatic of an incompatible/missing GDS32.DLL. With the correct GDS32.DLL in place, the following message concerning licensing was then displayed: product REMOTE INTERFACE is not licensed which was resolved with the aforementioned registry entry. Also, Firebird and the network were not contributing factors to the connectivity problems.
Another point: the ib_licen.dat being used supported the R option.
回答5:
As Bill pointed the "rejected by remote interface" message means the TCP connection was established correctly, but the Firebird server itself rejected the connection.
Check the firebird.log file in the firebird server \bin folder.
It may have useful information on why the server rejected the connection.
回答6:
I solved removing the gds32.dll file which was in the same directory of my .exe. I guess in this way the programm uses the DLL installed somewhere else in the system, which probably is more compatible.
回答7:
In my personal case I solved the problem by backuping/restoring the targeted database.
回答8:
I had this issue on a Virtual XP Machine. I simply shut down Firebird, and then shut down and started back up the Virtual XP machine. Started Firebird back up and the problem was gone.
回答9:
Others may have discovered this before me but when I was faced with the message 'Unable to complete network request to host "localhost". Failed to establish a connection' I concluded there was a good chance that it was due to interference by malware or perhaps a PUP. Consequently I ran Malwarebytes which cleaned up almost 400 instances of these things, mostly PUPs and after the clean up the error disappeared. Unfortunately I cannot say which one of the malware or PUP instances was the guilty party but it was certainly one of them. Thus, I would like to suggest that running Malwarebytes would be a good first step before resorting to something more drastic like reinstalling the product.
回答10:
Here's the solution to this issue:
Go to services and Start Firebird services. There should be two services.
The application does start but when trying to locate the database using FB it fails due to the FB services being not started.
Cheers.. Siseko Bukani