2

One of our clients is getting this error very randomly. Once or twice a week. It has only been happening for the last month or so.

Error message: 
I/O error during "CreateFile (open)" operation for file "ttt"
Error while trying to open file
Stack trace:
   at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
   at FirebirdSql.Data.FirebirdClient.FbConnectionPoolManager.Pool.CreateNewConnection(FbConnectionString connectionString, FbConnection owner)
   at FirebirdSql.Data.FirebirdClient.FbConnectionPoolManager.Pool.CreateNewConnectionIfPossibleImpl(FbConnectionString connectionString, FbConnection owner)
   at FirebirdSql.Data.FirebirdClient.FbConnectionPoolManager.Pool.GetConnection(FbConnection owner)
   at FirebirdSql.Data.FirebirdClient.FbConnectionPoolManager.Get(FbConnectionString connectionString, FbConnection owner)
   at FirebirdSql.Data.FirebirdClient.FbConnection.Open()
   at TTT.DALFirebird.FbSocket.ExecuteScalar(CommandType commandType, String commandText, String connectionString, FbParameter[] parameters)
   at TTT.LibGlobal.Data.FirebirdHelper.TestConnection(String connectionString)
------
Error message: 
I/O error during "CreateFile (open)" operation for file "ttt"
Error while trying to open file
Stack trace:
   at FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ProcessResponse(IResponse response)
   at FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ReadResponse()
   at FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ReadGenericResponse()
   at FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.Attach(DatabaseParameterBuffer dpb, String dataSource, Int32 port, String database)
   at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()

The database is hosted on a dedicated PC with Windows 8.1.

Firebird version: 3.0.7.33374 (x64)

Firebird Sql Data Client version: 4.6.1.0

I checked the security settings for the database file and gave full control for the system and users. Not sure what else it could be as the 3050 port is open and there's no issue with users connecting 99% of the time. Is a particular test their I.T. can run to diagnose?

The connection string for the desktop application is:

dialect=3;initial catalog=<Database Alias>;data source=<IP ADDRESS>;user id=<User>;password=<Password>;character set=ISO8859_1;pooling=True;connection lifetime=30;server type=Default;port number=3050

Please let me know if you require any further information.

Netstrata
  • 75
  • 1
  • 7
  • What is your actual connection string? The problem seems to be that `` is `ttt`, and no such alias is defined in the `databases.conf` of your Firebird installation, and no database file exists with that name in the path your Firebird installation uses to resolve relative paths. – Mark Rotteveel Jun 29 '21 at 11:13
  • Sorry Mark, the alias exists, I just replaced sensitive information in the connection string in the question with what you see between <> signs. e.g. the database alias, user and password etc. – Netstrata Jun 30 '21 at 05:19
  • The error indicates otherwise. Also is your database (or its alias) really called `ttt`, or did you anonymize the error message as well? The error could also indicate that the database server does not have write access to the specified location. – Mark Rotteveel Jun 30 '21 at 12:54
  • I can 100% confirm the alias is correct and the database path. I neglected to anoymize the error message. I've set the read/write access to full control so every user in the network has access. The weird thing about it is that the software is working 99.9% of the time for everybody. It's just once or twice a week they get this error. – Netstrata Jul 01 '21 at 23:13
  • If you only get it occasionally, it could indicate that a process other than the Firebird server is taking a lock on the database file. In the default mode, Firebird works in SuperServer mode, which requires an exclusive lock. If another process takes a shared or exclusive lock when no one is connected to the database, this will prevent Firebird from opening the database when a user tries to connect. – Mark Rotteveel Jul 02 '21 at 11:25
  • This could also happen if a user on the database server tries to connect to the database using isql with only the database filename or alias, as that will use Firebird embedded, or uses gbak directly (instead of through the service manager). – Mark Rotteveel Jul 02 '21 at 11:27
  • [This thread](http://fb-list-archive.s3-website-eu-west-1.amazonaws.com/firebird-java/2018/10/11465.html) is a similar issue that was caused by a virus scanner taking out a lock on the database file. – Mark Rotteveel Jul 02 '21 at 12:09

1 Answers1

1

They are trying to connect to database "ttt". This database (or alias) is not found so they get the error. As the developer of the application you should know what "TTT" object in the call stack may be and how connection string is formed.

user13964273
  • 1,012
  • 1
  • 4
  • 7
  • Sorry mate, the alias exists I just replaced sensitive information in the connection string in the question with what you see between <> signs. e.g. the database alias, user and password etc. – Netstrata Jun 30 '21 at 05:20