02-21-2018 03:50 AM
In our M.App Enterprise system we have two servers: the first for the application pools and M.App Service, the second for the Tile Service and the Database where we store features data.
At the moment, the servers are ON only 12 hours per day. Sometimes happens the both services M.App Service and Tile Service do not start automatically when the server restart.
In our configuration the second server (with Tile Service and Database for features) is started two minutes before than the other with the applications pools and M.App Service.
Can you please support me?
Thank you very much
Solved! Go to Solution.
02-21-2018 04:22 AM
It usually helps to set the services to Automatic (Delayed start) instead of Automatic. You should see in the Event Log why M.App service failed to start - it might be that the master database was not initialized during the start attempt.
You might also further adjust the services Start up options to be dependend on another services.
02-21-2018 07:47 AM
Thank you Jan.
So the starting order should be this:
Is it Right?
02-21-2018 08:08 AM
I have always the same error:
Service cannot be started. Npgsql.PostgresException (0x80004005): 57P03: il database si sta avviando
at Npgsql.NpgsqlConnector.DoReadMessage(DataRowLoadingMode dataRowLoadingMode, Boolean isPrependedMessage)
at Npgsql.NpgsqlConnector.ReadMessageWithPrepended(DataRowLoadingMode dataRowLoadingMode)
at Npgsql.NpgsqlConnector.HandleAuthentication(String username, NpgsqlTimeout timeout)
at Npgsql.NpgsqlConnector.Open(NpgsqlTimeout timeout)
at Npgsql.ConnectorPool.Allocate(NpgsqlConnection conn, NpgsqlTimeout timeout)
at MApp.Data.Database.Select[T](String sqlCommand, IEnumerable`1 parameters)
at MApp.Service.MAppService.OnStart(String args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
I will try to o set the services to Automatic (Delayed start).
02-22-2018 04:05 AM - edited 02-22-2018 04:06 AM
Correct, the master DB must be started fist. Since the DB service startup tend to vary or prolong during the machine age. You can adjust the service to make another start attempt after certain time interval.
A bullet-proof solution would be to change the services definition and create again with dependency defined. Something like this:
sc delete "M.App Service" sc delete "M.App Tile Service" sc create "M.App Service" binpath="C:\Program Files\Hexagon\M.App Enterprise\Service\MApp.Service.exe" type=own start=auto depend="postgresql-x64-10" obj="<MappUser>" password="<password>" sc create "M.App Tile Service" binpath="C:\Program Files\Hexagon\M.App Enterprise Tile Service\MApp.TileService.exe" type=own start=auto depend="postgresql-x64-10" obj="<MappUser>" password="<password>"
On your own risk