cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error when recon runs

Hi All

We experiencing an issue when our recon runs. We get the below error. Can anyone suggest a fix. We have re-run the recon with the same error.

2024-01-30 21:48:16,217 [INFO ] ImportIntoFileSoftwareFileAttributeValue (Transfer data from source 'FlexNet Manager Suite' to FNMP) (VersionFrom: 18.2)
2024-01-30 21:48:16,701 [INFO ] Failed to execute Reader 'ImportIntoFileSoftwareFileAttributeValue' from file C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\\Reader\managesoft\FileEvidence.xml, at step line 1
Error: The given value of type String from the data source cannot be converted to type nvarchar of the specified target column.
2024-01-30 21:48:16,701 [INFO ] All retries have been attempted for Reader 'ImportIntoFileSoftwareFileAttributeValue'
2024-01-30 21:48:16,701 [INFO ] Completed with error in 0 seconds.
2024-01-30 21:48:16,701 [INFO ] Released application lock Reader_e5f91ef9-7f47-4ea6-886d-b94aea1b087e_Evidence_ALL
2024-01-30 21:48:16,717 [ERROR] System.InvalidOperationException: The given value of type String from the data source cannot be converted to type nvarchar of the specified target column. ---> System.InvalidOperationException: String or binary data would be truncated.
at System.Data.SqlClient.SqlBulkCopy.ConvertValue(Object value, _SqlMetaData metadata, Boolean isNull, Boolean& isSqlType, Boolean& coercedToDataFeed)
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlBulkCopy.ConvertValue(Object value, _SqlMetaData metadata, Boolean isNull, Boolean& isSqlType, Boolean& coercedToDataFeed)
at System.Data.SqlClient.SqlBulkCopy.ReadWriteColumnValueAsync(Int32 col)
at System.Data.SqlClient.SqlBulkCopy.CopyColumnsAsync(Int32 col, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.CopyRowsAsync(Int32 rowsSoFar, Int32 totalRows, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.CopyBatchesAsyncContinued(BulkCopySimpleResultSet internalResults, String updateBulkCommandText, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.CopyBatchesAsync(BulkCopySimpleResultSet internalResults, String updateBulkCommandText, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestContinuedAsync(BulkCopySimpleResultSet internalResults, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestAsync(CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalAsync(CancellationToken ctoken)
at System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServerAsync(Int32 columnCount, CancellationToken ctoken)
at System.Data.SqlClient.SqlBulkCopy.WriteToServer(IDataReader reader)
at ManageSoft.Compliance.Importer.Logic.DatabaseConnection.LoadData(IDataReader p_DataReader, String p_TableName, Int32 p_BatchSize, Boolean p_ExplicitColumns)
at ManageSoft.Compliance.Importer.Logic.XML.SourceToTarget.ExecuteReader(IExecutionContext context, ISourceConnection sourceConn, IDataReader reader)
at ManageSoft.Compliance.Importer.Logic.XML.SourceToTarget.ProcessStep(IExecutionContext context)
at ManageSoft.Compliance.Importer.Logic.XML.Reader.Execute(IExecutionContext context)
at ManageSoft.Compliance.Importer.Logic.ActionExecuter.ReaderExecuter.ExecuteSingleReader(Reader reader, Int32 procedureOrder, Version sourceDatabaseVersion)
at ManageSoft.Compliance.Importer.Logic.ActionExecuter.ReaderExecuter.Execute()
at ManageSoft.Compliance.Importer.Logic.ComplianceImporter.ProcessExecution(ComplianceReader p_ComplianceReader, Tenant p_Tenant, IExecutionContext p_Context)
2024-01-30 21:48:17,145 [INFO ] Released application lock ManageSoftComplianceImporter_Exclusive
2024-01-30 21:48:17,145 [INFO ] Time: Tuesday, 30 January 2024 9:48:17 PM
2024-01-30 21:48:17,149 [INFO ] Total import time: 13 minutes, 8 seconds
2024-01-30 21:48:17,149 [INFO ] 6 source data warnings
2024-01-30 21:48:17,149 [INFO ] 1 errors, 0 warnings

(1) Solution

This latest error suggests that the changes noted in the diff in my earlier post have not been made correctly. Be sure to remove and add the 3 lines indicated in the diff exactly as shown.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

View solution in original post

(6) Replies
ChrisG
By Community Manager Community Manager
Community Manager

If you are using a version of FlexNet Manager Suite older than the 2023 R1 release, this error is likely related to the following known issue:

ImportIntoFileSoftwareFileAttributeValue ManageSoft inventory reader step may fail with error: "The given value of type String from the data source cannot be converted to type nvarchar of the specified target column." (IOK-1011043)

The changes shown in the following unified diff were made in the ImportProcedures\Reader\ManageSoft\FileEvidence.xml file in the 2023 R1 release to address this issue:

--- a/ImportProcedures/Reader/ManageSoft/FileEvidence.xml
+++ b/ImportProcedures/Reader/ManageSoft/FileEvidence.xml
@@ -2438,9 +2438,9 @@ OR NOT EXISTS (SELECT * FROM #ComplianceTenantSetting cts WHERE cts.SettingNameI

                                SELECT DISTINCT sf.ComputerID, sf.SoftwareID,
                                        SUBSTRING(RTRIM(LTRIM(ISNULL(sfp.Path + sfn.[Name], ''))), 1, 256) AS FileName,
-                                       sf.FileVersion,
-                                       sf.CompanyName,
-                                       sf.FileDescription,
+                                       LEFT(sf.FileVersion, 100),
+                                       LEFT(sf.CompanyName, 100),
+                                       LEFT(sf.FileDescription, 200),
                                        sf.Size,
                                        aso.AttributeID,
                                        sfv.Value

If you are comfortable modifying the import configuration files, you could try applying these changes yourself and see if that enables the import go through successfully. The default location of the file to be modified is here on the batch application server: C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Reader\ManageSoft\FileEvidence.xml

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

Hi Chris

Thanks for this. We changed the FileEvidence.xml and have re-run the recon. We awaiting to see if there is an error. 

Why would this error occur?

This error can occur if file details included in inventory contain unusually long values in FileVersion, CompanyName or FileDescription details. Without the fix for this problem, long values are not truncated appropriately to fit within database field length limits.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

We only experienced this today. We are on FNMS 2022 R2. Yesterdays recon ran fine with no issues.

Hi Chris

It gives us this error now.

2024-01-31 11:42:27,605 [INFO ] Failed to execute Reader 'ImportIntoFileSoftwareFileAttributeValue' from file C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\\Reader\managesoft\FileEvidence.xml, at step line 1
Error: The given ColumnMapping does not match up with any column in the source or destination.
2024-01-31 11:42:27,605 [INFO ] All retries have been attempted for Reader 'ImportIntoFileSoftwareFileAttributeValue'
2024-01-31 11:42:27,605 [INFO ] Completed with error in 0 seconds.
2024-01-31 11:42:27,605 [INFO ] Released application lock Reader_e5f91ef9-7f47-4ea6-886d-b94aea1b087e_Evidence_ALL
2024-01-31 11:42:27,605 [ERROR] System.InvalidOperationException: The given ColumnMapping does not match up with any column in the source or destination.
at System.Data.SqlClient.SqlBulkCopy.AnalyzeTargetAndCreateUpdateBulkCommand(BulkCopySimpleResultSet internalResults)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestContinuedAsync(BulkCopySimpleResultSet internalResults, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestAsync(CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalAsync(CancellationToken ctoken)
at System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServerAsync(Int32 columnCount, CancellationToken ctoken)
at System.Data.SqlClient.SqlBulkCopy.WriteToServer(IDataReader reader)
at ManageSoft.Compliance.Importer.Logic.DatabaseConnection.LoadData(IDataReader p_DataReader, String p_TableName, Int32 p_BatchSize, Boolean p_ExplicitColumns)
at ManageSoft.Compliance.Importer.Logic.XML.SourceToTarget.ExecuteReader(IExecutionContext context, ISourceConnection sourceConn, IDataReader reader)
at ManageSoft.Compliance.Importer.Logic.XML.SourceToTarget.ProcessStep(IExecutionContext context)
at ManageSoft.Compliance.Importer.Logic.XML.Reader.Execute(IExecutionContext context)
at ManageSoft.Compliance.Importer.Logic.ActionExecuter.ReaderExecuter.ExecuteSingleReader(Reader reader, Int32 procedureOrder, Version sourceDatabaseVersion)
at ManageSoft.Compliance.Importer.Logic.ActionExecuter.ReaderExecuter.Execute()
at ManageSoft.Compliance.Importer.Logic.ComplianceImporter.ProcessExecution(ComplianceReader p_ComplianceReader, Tenant p_Tenant, IExecutionContext p_Context)
2024-01-31 11:42:28,153 [INFO ] Released application lock ManageSoftComplianceImporter_Exclusive

This latest error suggests that the changes noted in the diff in my earlier post have not been made correctly. Be sure to remove and add the 3 lines indicated in the diff exactly as shown.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)