Problem connecting to "localhost"

1,438 views
Skip to first unread message

Ertan Küçükoglu

unread,
Dec 14, 2021, 3:43:53 AM12/14/21
to firebird...@googlegroups.com
Hello,

There is a customer using FirebirdSQL 2.5.9.latest Win32 on all of their systems. System OSes differ as Windows 10 x64, Windows 7, Windows XP. There are more than 50 systems. I do not have the exact number.

There is an operation running manually just before midnight everyday. This is a consolidated report being sent to a central server. Sometimes that fails with a message like below:

2021-12-09 23:53:31.689 ERROR     TRANSFER archive DB modification error: DM.sqlCCTransferMark: Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements. SQL error state =08006 Unable to complete network request to host "LOCALHOST". Error writing data to the connection.

This error is not specific to a single system. We observe it on other machines (not all of them) and it happens about once a week. Other times the operation completed successfully.

Same database is accessed just before modification. Same database accessed for reading together with the modification. I am clueless as to why a localhost could not be reached in the middle of the operation.

Any help would be appreciated.

Thanks & Regards,
Ertan Küçükoğlu

Dimitry Sibiryakov

unread,
Dec 14, 2021, 5:55:30 AM12/14/21
to firebird...@googlegroups.com
Ertan Küçükoglu wrote 14.12.2021 9:43:
>
> Same database is accessed just before modification. Same database accessed for
> reading together with the modification. I am clueless as to why a localhost
> could not be reached in the middle of the operation

Usually it is the result of Firebird server crash. Look at firebird.log and
Windows Event Log for any record around that time.
Another possibility may be Firewall/Antivirus issues but I have no specific
information about them (except a bug in old NOD32 versions).

--
WBR, SD.

Ertan Küçükoglu

unread,
Dec 14, 2021, 8:02:22 AM12/14/21
to firebird...@googlegroups.com
Hello,

There are below lines in the FirebirdSQL log file around crash times. We are always using SYSDBA as our database user. Below the first log line says user as Windows user. This is kind of confusing.
JOKER (Server) Sat Dec 11 23:58:20 2021
INET/inet_error: read errno = 10054, client address = 127.0.0.1/63064, user = ADMINISTRATOR.-1.-1


JOKER (Client) Sat Dec 11 23:58:20 2021
INET/inet_error: read errno = 10054, server address = 127.0.0.1/3050

I am not good at Windows Event Log. I have no idea how to search for any firebird related records. Some links or instructions are welcome.
There is no firewall and Windows firewall is also disabled on these systems.

Thanks & Regards,
Ertan

Dimitry Sibiryakov <s...@ibphoenix.com>, 14 Ara 2021 Sal, 13:55 tarihinde şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/7191670d-bd86-7146-6cc4-da36727762ff%40ibphoenix.com.

Dimitry Sibiryakov

unread,
Dec 14, 2021, 8:07:58 AM12/14/21
to firebird...@googlegroups.com
Ertan Küçükoglu wrote 14.12.2021 14:02:
> I am not good at Windows Event Log. I have no idea how to search for any
> firebird related records.

Events in the log are sorted by date.

--
WBR, SD.

Ertan Küçükoglu

unread,
Dec 14, 2021, 5:25:38 PM12/14/21
to firebird...@googlegroups.com
Hello,

I could not find any firebird related event log entry. I checked all the left side different tree nodes (except Microsoft 5th from bottom) in the below screen capture.

image.png

Only thing that seems relevant is our application log entry with Event name AppHangB1 just before or at the time we get the error. Which is normal because operation takes about 1.5 minutes without any GUI interaction at all.
After error time I see a log entry with Event name AppHangTransient
Finally I see a log entry with the Event name APPCRASH
All above are for our application. There is no single FirebirdSQL log entry that I could find.

However, well after 2 seconds of the error time, I see a log entry for "Microsoft Windows.NetworkDiagnostics.4.0" event name: ScriptedDiagFailure I am not sure if that is relevant. I included it just because it has a "network" word in its name.

These are all under log "Windows Logs -> Application".

I also checked other days for this very same machine as there are three recent reports for it. There is nothing related to FirebirdSQL as far as I can see.

I would say FirebirdSQL logs are not saying much and Windows event logs are not saying much. Is there anything else that I can do to figure this error out? I don't know, turn on a database trace log maybe?

Thanks & Regards,
Ertan Küçükoğlu




Dimitry Sibiryakov <s...@ibphoenix.com>, 14 Ara 2021 Sal, 16:07 tarihinde şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.

Dimitry Sibiryakov

unread,
Dec 14, 2021, 5:34:37 PM12/14/21
to firebird...@googlegroups.com
Ertan Küçükoglu wrote 14.12.2021 23:25:
> Finally I see a log entry with the Event name APPCRASH
> All above are for our application. There is no single FirebirdSQL log entry that
> I could find.

10054 is "a normal error" in firebird.log if your application crash so there
is really nothing suspicious here.
But in list of logs I see "Kaspersky Endpoint Security" and "Kaspersky Event
Log". AFAIK this is antivirus software with firewall (packet filter)
capabilities. Is there anything interesting inside them near of the error time?

--
WBR, SD.

Ertan Küçükoglu

unread,
Dec 14, 2021, 5:57:55 PM12/14/21
to firebird...@googlegroups.com
Hello,

Only "suspicious" thing I see in our error message is that localhost is not accessible and an existing connection cannot be used.
SQL where we get errors is static, written in a component, never changing and executed using parameters with type check over and over again.
I will see if we can convince this customer to completely turn off Kaspersky for a certain period of time or at least ensure to exclude our application for good just to be able to rule out that option (or find the source of the problem).
Additionally, I will activate a trace file to check query parameters and database connect/disconnect logs at the time of a crash.

Thanks & Regards,
Ertan

Dimitry Sibiryakov <s...@ibphoenix.com>, 15 Ara 2021 Çar, 01:34 tarihinde şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.

Tim Crawford

unread,
Dec 14, 2021, 7:18:43 PM12/14/21
to firebird...@googlegroups.com, Ertan Küçükoglu
I have been running Kaspersky and Firebird on my computer for several years,
connecting in as localhost, and never had an issue with the firewall.
Stats in Kaspersky reported over 10,000 Kaspersky users use Firebird.
I am fairly sure it gets recognized as Trusted.
So firewall seems like a red herring....

One silly thing to check... Device Manager, network card properties,
make sure 'allow to be turned off to conserve power' is not enabled.
I have had to disable this on a number of customer servers,
and highly suspect it was causing similar issues with lost connections

Ashley

unread,
Dec 15, 2021, 3:08:06 AM12/15/21
to firebird...@googlegroups.com

Please confirm contents of hosts file?

Does their router maybe reboot at midnight, therefor no dns for 2 minutes or so?

Try run this process maybe 30 minutes earlier?
Can be some other process on the machine, updates or something, uses all resources and
the app connection times out?

Best regards
 ashley


 

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages