Kaseya Community

KAV - Deployment to endpoints fails with SQL error

This question is answered
KAV install error.JPG

Hi There,

 I have logged a support request for this, but would like to put it out there in an attempt to get the issue resolved sooner. Roll Eyes

 I have installed KAV this morning. The package installed without any errors.

 When I try to install KAV on  an endpoint (any one) I get a SQL error just after (approx. 20 seconds) the installation scheduler starts up.  You cannot continue with the installation after you close the error message.

 

-- Text log of the error

Incorrect syntax near '@p1'.

System.Data.SqlClient.SqlException

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(TdsParserStateObject stateObj) 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.System.Data.IDbCommand.ExecuteReader() at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)

 

could not execute query [ if(@p0 = 1 ) SELECT tempValue FROM tempData WHERE tempName = 'zzvals58' ELSE SELECT ISNULL((SELECT ISNULL(maxCount, 0) FROM partnerLicense WHERE licenseType = 8 AND partitionId = @p1 ] Name:partitionId - Value:1 [SQL: if(@p0 = 1 ) SELECT tempValue FROM tempData WHERE tempName = 'zzvals58' ELSE SELECT ISNULL((SELECT ISNULL(maxCount, 0) FROM partnerLicense WHERE licenseType = 8 AND partitionId = @p1]

NHibernate.ADOException

at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) at NHibernate.Loader.Custom.CustomLoader.List(ISessionImplementor session, QueryParameters queryParameters) at NHibernate.Impl.SessionImpl.ListCustomQuery(ICustomQuery customQuery, QueryParameters queryParameters, IList results) at NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters, IList results) at NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters) at NHibernate.Impl.SqlQueryImpl.List() at NHibernate.Impl.AbstractQueryImpl.UniqueResult() at Kaseya.KAV.Core.Repositories.KAVLicenseRepository.PurchasedLicenseCount(Decimal partitionId) in c:\Hudson\jobs\KAV Installer Prep\workspace\KAV\Kaseya.KAV.Core\Repositories\KAVLicenseRepository.cs:line 123 at Kaseya.KAV.Core.LicenseService.AvailaleLicenses(Decimal partitionId) in c:\Hudson\jobs\KAV Installer Prep\workspace\KAV\Kaseya.KAV.Core\LicenseService.cs:line 24 at Kaseya.KAV.Web.Controllers.KESController.GetProfileDialogDTO(IList`1 targetIds) in c:\Hudson\jobs\KAV Installer Prep\workspace\KAV\Kaseya.KAV.Web\Controllers\KESController.cs:line 378

 

Exception has been thrown by the target of an invocation.

System.Reflection.TargetInvocationException

at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Castle.MonoRail.Framework.SmartDispatcherController.InvokeMethod(MethodInfo method, IRequest request, IDictionary`2 extraArgs) in e:\trunks\castlesvn\MonoRail\Castle.MonoRail.Framework\SmartDispatcherController.cs:line 80 at Castle.MonoRail.Framework.ActionMethodExecutorCompatible.Execute(IEngineContext engineContext, IController controller, IControllerContext context) in e:\trunks\castlesvn\MonoRail\Castle.MonoRail.Framework\ActionMethodExecutor.cs:line 86 at Castle.MonoRail.Framework.Controller.RunActionAndRenderView() in e:\trunks\castlesvn\MonoRail\Castle.MonoRail.Framework\Controller.cs:line 1681 at Castle.MonoRail.Framework.Controller.Process(IEngineContext engineContext, IControllerContext context) in e:\trunks\castlesvn\MonoRail\Castle.MonoRail.Framework\Controller.cs:line 103 at Castle.MonoRail.Framework.BaseHttpHandler.Process(HttpContext context) in e:\trunks\castlesvn\MonoRail\Castle.MonoRail.Framework\BaseHttpHandler.cs:line 94

 

Error processing MonoRail request. Action GetProfileDialogDTO on controller KES

Castle.MonoRail.Framework.MonoRailException

at Castle.MonoRail.Framework.BaseHttpHandler.Process(HttpContext context) in e:\trunks\castlesvn\MonoRail\Castle.MonoRail.Framework\BaseHttpHandler.cs:line 111 at Castle.MonoRail.Framework.BaseHttpHandler.ProcessRequest(HttpContext context) in e:\trunks\castlesvn\MonoRail\Castle.MonoRail.Framework\BaseHttpHandler.cs:line 66 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--

 I have done the usual stuff to see if I can rectify the problem, applied all latest HotFixes, Updated the Schema and even restated the KServer. We have purchased a valid 100 user license and the license is displayed in the license manager.

 Has anyone else experienced this? Any ideas or suggestions will be appreciated.

 

Herman

Verified Answer
  • I have the same problem. I also witness this error with the Network Discovery Module...

    I have no idea how to solve this and also have made a support ticket :)

All Replies
  • I have the same problem. I also witness this error with the Network Discovery Module...

    I have no idea how to solve this and also have made a support ticket :)

  • We also have the Network discovery module, but that works with no error.

  • Just received an update on my support ticket..

    --

    Hi there

    there is currently a known issue with KAV install and we have notify our developer team and there will be a hotfix to fix this issue shortly. in the mean time i'll forward your ticket to our specialist, if you could make sure  your vsa is up to date with the hotfixes we will be in touch with you as soon as we have any update

    Thanks

    Kaseya Support

  • Hi Herman,

    I managed to fix your KAV module on your Kaseya Server. I have also deployed your KAV agent to the machine as requested. The SQL error you were receiving is no longer a problem. It was a simple KAV reinstall that fixed the issue on the Kaseya Server

    Thanks

    Jacques

  • I had this error as well and opened a ticket.  After reading the post from jacques about reinstalling, I decided to try it.  It got part way through the installation and then gave an IIS error.  I restarted my K2 machine, and before attempting the KAV reinstall again, I tried rolling it out to a test machine.  This time, I did NOT receive the SQL error, and KAV is now installed successfully and updating it's databases.  Hope this helps.

    RS

  • Fix coming shortly...sorry about that.  This affects new installs only on a subset of VSA servers.  I'm hoping to get this hotfix out today.

    Jeff

  • 123.jpg

    I get live connect error on AV tab. Also, I get multiple copies of same machine show up per AV install??

  • Log a ticket for that one...is an isolated issue.

    The hotfix for the sql error has been posted....anyone affected should be updated overnight.

  • hotfix did fix the issue last night, but came in this morning and the error is back.