The service did not respond to the start or control request in a timely fashion

Hi there.
After upgrading to version 12.5.5 (the previous version worked well) we’ve got:

The SQLBackupAndFTP (SQL Server backup) service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.

Using workaround provided here we got:

C:\Program Files (x86)\SQLBackupAndFTP>sqlbak.service.exe -console
Starting…

Unhandled Exception: System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. —> System.Data.SQLite.SQLiteException: attempt to write a readonly database
attempt to write a readonly database
at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader…ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
at Net.Pranas.SqlBak.Context.Context.Data.DatabaseHandler.WriteDatabaseVersion(Int32 version, DbConnection connection, TransactionHandler transaction)
at Net.Pranas.SqlBak.Context.Context.Data.DatabaseHandler.UpdateDatabase()
at Net.Pranas.SqlBak.Context.Context.Data.DatabaseHandler.UpdateDatabaseToLastVersion(DatabaseHandler databaseHandler)
at Net.Pranas.SqlBak.Context.Context.Data.DatabaseHandler…ctor(Nullable1 pooling, Nullable1 maxPoolSize)
at Net.Pranas.SqlBak.Context.Context.Data.ContextDatabaseHandler…ctor(ContextHandler handler)
at Pranas.Net.SqlBak.Service.Context.ServiceContext.get_IsLocal()
at Pranas.Net.SqlBak.Service.Context.ServiceContext.get_AccountContentService()
at Pranas.Net.SqlBak.Service.Context.ServiceContext.<>c__DisplayClass21_0.b__0(Object sender, DoWorkEventArgs args)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
— End of inner exception stack trace —
at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at Pranas.Net.SqlBak.Service.Context.ServiceContext.<>c__DisplayClass21_0.b__1(Object sender, RunWorkerCompletedEventArgs args)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

Starting the app using -ignoreStatusService did not help (see the screenshot attached)

Hi lan_Amir,

The folloiwng error message:

attempt to write a readonly database
attempt to write a readonly database

means that this is a user permission issue. Could you please check if the Local System user has all the permissions to write into this directory? Also, please check if “read-only” option is disabled for the files located in C:\ProgramData\Pranas.NET\SQLBackupAndFTP\Db

Sorry for the inconvenience.

All permissions are OK:
image




Hi Ilan_Amir,

Thank you for your reply and for the details.

We have checked the issue and can confirm that everything works smoothly on our side and we also did not receive any other requests related to that issue from our customers. We believe that the issue related to your system. It seems that there is an application on your system that accessing your database. It could be antivirus or profiler. We recommend you contact your system administrator to check the issue.

Sorry for the inconvenience.

OK. I’ve reinstalled the application keeping C:\ProgramData\Pranas.NET folder…
Running the: sqlbak.service.exe -console
Gives us:
C:\Program Files (x86)\SQLBackupAndFTP>sqlbak.service.exe -console
Starting…
Compleate.
Please don’t close this window.

Running in another cmd session: sbf.application.exe -ignoreStatusService
Starts the application and all jobs are there and running well.

But the service doesn’t start in native way…

Please advise.

Hi Ilan_Amir,

There is nothing special for us to add, we believe you have some kind of software that, for some reason, does not allow you to run SQLBackupAndFTP as a service. Most likely this is some kind of software that is responsible for security since SQLBackupAndFTP is launched as a service and has many rights.

Sorry for the inconvenience.