Author Topic: Admin Console can't connect to DB  (Read 11397 times)

0 Members and 1 Guest are viewing this topic.

Jesse-L

  • Guest
Admin Console can't connect to DB
« on: July 24, 2012, 09:52:02 PM »
So my admin console won't load. I checked the C:\Documents and Settings\All Users\Application Data\AVAST Software\Administration Console\Logs\Avast.Sbc.Service_2216.log to find ERROR DatabaseFactory - Unexpected exception, unable to connect to database!

It was working fine a few days ago. I've tried rebooting but it didn't help. Running on Windows 2003 Standard
Does anyone have any suggestions I can try?

Here's the entire logfile:
Code: [Select]
[Header - Application started at 24-Jul-2012 19:41:18,279 local/19:41:18,279 UTC]
07-24 15:41:18,389 [1] INFO  Program - Initialization. Version: 1.0.888.19
07-24 15:41:18,451 [4] INFO  SbcCoreService - Service starting. Loading configuration
07-24 15:41:18,451 [4] INFO  ConnectionStringFactory - Connection string read from stream: Data Source=(local)\SQLEXPRESS;Initial Catalog=avast_sbc_db;Integrated Security=SSPI;
07-24 15:41:18,451 [4] INFO  DatabaseFactory - Performing initial connection to the database, connection string: Data Source=(local)\SQLEXPRESS;Initial Catalog=avast_sbc_db;Integrated Security=SSPI;
07-24 15:41:52,670 [4] WARN  SbcDataContext - Data context changes will be rolled back.
07-24 15:41:52,670 [4] WARN  SbcDatabase - Problem loading the database.
07-24 15:41:52,670 [4] ERROR DatabaseFactory - Unexpected exception, unable to connect to database!
System.Data.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   --- End of inner exception stack trace ---
   at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
   at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
   at Avast.Sbc.Service.Database.EventsDatabase.ReloadProviderStatusCache(IContextTransaction tx)
   at Avast.Sbc.Service.Database.EventsDatabase..ctor(String context)
   at Avast.Sbc.Service.Database.SbcDatabase.Connect(String connectionString)
   at Avast.Sbc.Service.Core.DatabaseFactory.ConnectDatabase()
07-24 15:41:52,670 [4] FATAL SbcCoreService - Service could not be started.
System.Data.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   --- End of inner exception stack trace ---
   at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
   at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
   at Avast.Sbc.Service.Database.EventsDatabase.ReloadProviderStatusCache(IContextTransaction tx)
   at Avast.Sbc.Service.Database.EventsDatabase..ctor(String context)
   at Avast.Sbc.Service.Database.SbcDatabase.Connect(String connectionString)
   at Avast.Sbc.Service.Core.DatabaseFactory.ConnectDatabase()
   at Avast.Sbc.Service.SbcCoreService.OnStart(String[] args)
[Footer]

nannunannu

  • Guest
Re: Admin Console can't connect to DB
« Reply #1 on: July 24, 2012, 10:37:12 PM »
Stupid question:  is "SQL Server (SQLEXPRESS)" showing "Started" in the status column for your system Services?

forgos

  • Guest
Re: Admin Console can't connect to DB
« Reply #2 on: July 25, 2012, 09:46:00 AM »
If you use SA account connect to DB, check password.

Jesse-L

  • Guest
Re: Admin Console can't connect to DB
« Reply #3 on: July 25, 2012, 01:57:45 PM »
SQL Services are running and SQL Server is using the built in NT account so no change in password should have occurred.

nannunannu

  • Guest
Re: Admin Console can't connect to DB
« Reply #4 on: July 25, 2012, 04:33:20 PM »
Check your event viewer for errors.  Verify that windows firewall (or other 3rd party firewall product?) isn't blocking ports...  etc.

Jesse-L

  • Guest
Re: Admin Console can't connect to DB
« Reply #5 on: July 25, 2012, 04:44:26 PM »
No it's the Console service not running. Hence the error log.
This is installed on a virtual server, so I cloned the server and starting trying things with the clone (original currently turned off)
I've tried repairing the Avast Console Setup installation to get the error "sql server 2008 express r2 x86 mandatory prerequisite was not correctly installed"
Then I downloaded and SQL Server 2008 Express and tried repairing just SQL Server Express, which completed but didn't fix the problem.
I then tried repairing the Avast Console Setup again but got the same error.
So I uninstalled Avast Console and am currently reinstalling it with a new database to see if that at least fixes the problem (maybe I can export my old database from the original virtual server, not sure)

Offline giogio

  • Avast Evangelist
  • Massive Poster
  • ***
  • Posts: 4113
Re: Admin Console can't connect to DB
« Reply #6 on: July 25, 2012, 06:52:51 PM »
Hi,
from the log I see you're still using a very old Avast Console
Quote
07-24 15:41:18,389 [1] INFO  Program - Initialization. Version: 1.0.888.19
So please first update your console to the new one SOA 1.2.2.28 or to AEA 7.0.223.292 (the new ADMN version)
http://forum.avast.com/index.php?topic=101245.0
For the new SOA version SQL is not required.

After the update remember to deploy the program update, using and unattended job, to the clients
« Last Edit: July 25, 2012, 06:55:24 PM by giogio »
Prima di scrivere sul forum per favore leggi le istruzioni qui https://forum.avast.com/index.php?topic=144453.0
Non inviatemi MP per supporto,grazie-No support PM please
Home: E8400-4GB RAM-500GB HDD-Win10.0.15063x64-Avast! Free 17.3.2291-CryptoPrevent-MBAM 2.2free-Chrome 57(uBlock origin)-TB52
Work: i5-2400-4GB RAM-500GB HDD-Win 7sp1x64-Avast!Business Security 12.3.2515,     
Cloud Console 2.18
-FF52-TB52

nannunannu

  • Guest
Re: Admin Console can't connect to DB
« Reply #7 on: July 25, 2012, 09:47:56 PM »
No it's the Console service not running. Hence the error log.

Looks to me like it's not running because it can't connect to the database.

Quote
07-24 15:41:18,389 [1] INFO  Program - Initialization. Version: 1.0.888.19
07-24 15:41:18,451 [4] INFO  SbcCoreService - Service starting. Loading configuration
07-24 15:41:18,451 [4] INFO  ConnectionStringFactory - Connection string read from stream: Data Source=(local)\SQLEXPRESS;Initial Catalog=avast_sbc_db;Integrated Security=SSPI;
07-24 15:41:18,451 [4] INFO  DatabaseFactory - Performing initial connection to the database, connection string: Data Source=(local)\SQLEXPRESS;Initial Catalog=avast_sbc_db;Integrated Security=SSPI;
07-24 15:41:52,670 [4] WARN  SbcDataContext - Data context changes will be rolled back.
07-24 15:41:52,670 [4] WARN  SbcDatabase - Problem loading the database.
07-24 15:41:52,670 [4] ERROR DatabaseFactory - Unexpected exception, unable to connect to database!

Jesse-L

  • Guest
Re: Admin Console can't connect to DB
« Reply #8 on: July 25, 2012, 10:35:21 PM »
After the update remember to deploy the program update, using and unattended job, to the clients

Which unattended job would that be exactly?

Offline giogio

  • Avast Evangelist
  • Massive Poster
  • ***
  • Posts: 4113
Re: Admin Console can't connect to DB
« Reply #9 on: July 26, 2012, 08:27:18 AM »
Go to the console->JOBS->SCHEDULER->in the botton right click on CREATE NEW JOB->in NAME give your preferred name, in DETAILS choose DEPLOYMENT and UNATTENDED DEPLOYMENT, the you must insert administrator user and password.
In SCHEDULE you can choose when the job will start, and in TARGET you can choose the client.
Prima di scrivere sul forum per favore leggi le istruzioni qui https://forum.avast.com/index.php?topic=144453.0
Non inviatemi MP per supporto,grazie-No support PM please
Home: E8400-4GB RAM-500GB HDD-Win10.0.15063x64-Avast! Free 17.3.2291-CryptoPrevent-MBAM 2.2free-Chrome 57(uBlock origin)-TB52
Work: i5-2400-4GB RAM-500GB HDD-Win 7sp1x64-Avast!Business Security 12.3.2515,     
Cloud Console 2.18
-FF52-TB52

Battleship

  • Guest
Re: Admin Console can't connect to DB
« Reply #10 on: August 07, 2012, 04:45:45 PM »
Hi,
from the log I see you're still using a very old Avast Console
Quote
07-24 15:41:18,389 [1] INFO  Program - Initialization. Version: 1.0.888.19
So please first update your console to the new one SOA 1.2.2.28 or to AEA 7.0.223.292 (the new ADMN version)
http://forum.avast.com/index.php?topic=101245.0
For the new SOA version SQL is not required.

After the update remember to deploy the program update, using and unattended job, to the clients

I have this same issue, and looking in my log, I'm on 1.0.888.14.
I have a local install SQLExpress Database.  How do I upgrade to a new avast (not sure if should use SOA or AEA) and have it reconnect to this DB?  In the past I've always downloaded setup_console_bp.exe if that helps.  I assume I need the AEA now? 

nannunannu

  • Guest
Re: Admin Console can't connect to DB
« Reply #11 on: August 07, 2012, 06:46:45 PM »
In the past I've always downloaded setup_console_bp.exe if that helps.

I upgraded from BP SBC to EPS SOA...  http://forum.avast.com/index.php?topic=101987.msg816033#msg816033

v6 for us was installed using setup_console_bp.exe
v7 for us was installed using setup_console_eps.exe