- Flexera Community
- :
- FlexNet Manager
- :
- FlexNet Manager Forum
- :
- Re: Beacon services log in Batch server throwing error System.Data.SqlClient.SqlException (0x8013190...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Beacon services log in Batch server throwing error System.Data.SqlClient.SqlException (0x80131904)
Hi Forum,
Beacon services log is throwing this error and the beacons are unable to download the inventory rules and settings.
throwing error
Beacon Policy Downloader failed to download policy with exception message: Could not download item from https://fnms.xyz.com/inventory-beacons/api/policy
on prem FNMS 2020R1, multi server setup
[ERROR 2020-10-05 06:21:01,091 1628160ms Controllers ] [End][DownloadController.ExecuteAsync]
System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting the varchar value 'Tenant has not been set' to data type smallint.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at ManageSoft.Database.DatabaseCommand.ExecuteNonQuery()
at ManageSoft.Database.Impl.DatabaseLayerBaseSql.Execute(CommandType p_CommandType, String p_CommandText, DatabaseParameter[] p_Parameters)
at Flexera.Beacon.Web.Server.Logic.ServerSAPService.GetAllActiveSAPSystemLandscapes()
at Flexera.Beacon.Web.Shared.Controllers.DownloadController.GetAllActiveSapLandscapesXml(String tenantUid)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)
at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)
ClientConnectionId:81091c9e-bcfd-4cd4-876a-761f1512b6cc
Error Number:245,State:1,Class:16
Any help and guidance on this thread would be appreciated.
Regards,
Winvarma
This thread has been automatically locked due to inactivity.
To continue the discussion, please start a new thread.
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @winvarma
Try to check below see if it's the cause
On the IIS on FNMS Batch server: the inventory-beacons service, "Anonymous" authentication is turned on or off? Try to disable it if it's on, if that's the case then the Beacon will work when it's off. OOTB we support only windows auth.
Cheers
Kevin
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Kevin_Hou's response is marked as the solution to this thread, so this comment may not be directly relevant. However for future reference:
The following message suggests that you are using a database with a multi-tenant schema, but the process reporting this error has connected to the database and is trying to run a query in single-tenant mode:
Conversion failed when converting the varchar value 'Tenant has not been set' to data type smallint.
It is strange that you're seeing this in a beacon services log. That suggests that despite the database being a multi-tenant database there is something in the system that makes the beacon service think it is working with a single-tenant database.
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ChrisG ,
Many thanks for you insights and in this scenario we are using a Multi tenant but the no. of tenants we have is only 1.
Not sure how we can overcome /resolve this error and by mistake its accepted as a solution, and any further suggestions on this will be very helpful for us.
Regards,
Winvarma.
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What do you see if you execute the following SQL statements against your compliance database?
SELECT * FROM DatabaseConfiguration WHERE Property = 'CMMultiTenancy'
EXEC sp_helptext 'TableFilter_MT'
On a single-tenant database this should give output like the following:
On a multi-tenant database output should look like:
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ChrisG ,
thanks for the inputs have run the query as suggested have executed the query and attaching the result. Got the output as Multitenant DB config result as per your snapshot.
Please check and suggest.
Regards,
Winvarma.
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So those screenshots definitely confirm that you are working with a multi-tenant database there. However the error appearing in the log from the beacon service suggests that it thinks the system is a single-tenant system and the service isn't connecting to the database in a multi-tenant mode. I'm not sure what information the beacon service uses to determine which mode to operate in though--maybe somebody else has some knowledge of that?
