The Flexera Community is currently in maintenance mode to prepare for the upcoming launch of the new community. Click here for more information.
Hi All,
We are on a multitenant, on one specific tenant all the incoming ndi files are getting moved to invalid format folder. Ndi file has the tenant information on the filename. tried importing manually but still no luck. Below is the error received. Could someone please assist us on this.
C:\Program Files (x86)\Flexera Software\FlexNet Manager Platform\Importers\bin>mgsimport.exe -t inventories -d C:\Support\tempfolder -e
Starting Importer...
Processing 1 files
Processing file C:\Support\tempfolder\[ABCDEFGHQ3JJQ6]_system on abcd at 20220513T151903 (Full).ndi.gz:
EXCEPTION:
--------------------
System.NullReferenceException: Object reference not set to an instance of an object.
at ManageSoft.Directory.Impl.DirectoryBinder.BindToComputerAndUser(IManageSoftDatabaseLayer databaseLayer, String computerName, String computerDomain, String computerFlatDomain, String computerUID, DirectoryEntry computerObject, String userName, String userDomain, String userUID, Boolean useUniqueNames, Int32& computerID, Int32& computerOUID, Int32& userID, Int32& userOUID, String agentID, String agentVersion)
at ManageSoft.Inventory.Importer.DatabaseImport.Begin(InventoryImportSession session)
at ManageSoft.Inventory.Importer.Implementation.RootNodeProcessor.HandleElement()
at ManageSoft.Inventory.Importer.Implementation.BaseElementNodeProcessor.Process(InventoryImportSession session)
at ManageSoft.Inventory.Importer.InventoryImporter.Import(String importType, Stream inputStream, Boolean isGzipped, String sourceIdentifier, String targetFilename, MGSLicenseTermCheckResult licenseCheckResult, ImportProcessingStats& stats, IDispatcherPreferences preferences)
----
Type: 'System.NullReferenceException'
Message: 'Object reference not set to an instance of an object.'
Source: 'ManageSoft.Directory.Logic'
--StackTrace:--
at ManageSoft.Directory.Impl.DirectoryBinder.BindToComputerAndUser(IManageSoftDatabaseLayer databaseLayer, String computerName, String computerDomain, String computerFlatDomain, String computerUID, DirectoryEntry computerObject, String userName, String userDomain, String userUID, Boolean useUniqueNames, Int32& computerID, Int32& computerOUID, Int32& userID, Int32& userOUID, String agentID, String agentVersion)
at ManageSoft.Inventory.Importer.DatabaseImport.Begin(InventoryImportSession session)
at ManageSoft.Inventory.Importer.Implementation.RootNodeProcessor.HandleElement()
at ManageSoft.Inventory.Importer.Implementation.BaseElementNodeProcessor.Process(InventoryImportSession session)
at ManageSoft.Inventory.Importer.InventoryImporter.Import(String importType, Stream inputStream, Boolean isGzipped, String sourceIdentifier, String targetFilename, MGSLicenseTermCheckResult licenseCheckResult, ImportProcessingStats& stats, IDispatcherPreferences preferences)
--------------------
File C:\Support\tempfolder\[ABCDEFGHQ3JJQ6]_system on abcd at 20220513T151903 (Full).ndi.gz:
: File content was in invalid format
File saved to C:\Support\tempfolder\BadLogs\invalidformat
All tasks are complete
Finished importing 1 files in 2.1s
---------------------------------------------------------------------------------------
May 13, 2022 08:03 AM
An error message like this has been observed several times in the past on systems where the "SYSTEM" user record does not exist in the User view in the inventory database for the tenant in question. For example, this could occur if somebody mistakenly deleted user records directly in the database.
To check this, execute SQL statements like the following against the inventory database (ensuring the appropriate tenant UID is specified on the first line). The SELECT statement should return exactly 1 record in a correctly configured database.
EXEC dbo.SetTenantUID 'ABCDEFGHQ3JJQ6'
SELECT * FROM dbo.User WHERE UserCN = 'SYSTEM'
Try SQL statements like the following to add the missing SYSTEM user record if it isn't there:
EXEC dbo.SetTenantID NULL
DECLARE @TenantID SMALLINT
SELECT @TenantID = t.TenantID
FROM dbo.Tenant t
WHERE t.TenantUID = 'ABCDEFGHQ3JJQ6'
EXEC dbo.PopulateInitialDataForTenant @TenantID
May 16, 2022 09:03 PM
An error message like this has been observed several times in the past on systems where the "SYSTEM" user record does not exist in the User view in the inventory database for the tenant in question. For example, this could occur if somebody mistakenly deleted user records directly in the database.
To check this, execute SQL statements like the following against the inventory database (ensuring the appropriate tenant UID is specified on the first line). The SELECT statement should return exactly 1 record in a correctly configured database.
EXEC dbo.SetTenantUID 'ABCDEFGHQ3JJQ6'
SELECT * FROM dbo.User WHERE UserCN = 'SYSTEM'
Try SQL statements like the following to add the missing SYSTEM user record if it isn't there:
EXEC dbo.SetTenantID NULL
DECLARE @TenantID SMALLINT
SELECT @TenantID = t.TenantID
FROM dbo.Tenant t
WHERE t.TenantUID = 'ABCDEFGHQ3JJQ6'
EXEC dbo.PopulateInitialDataForTenant @TenantID
May 16, 2022 09:03 PM
Hi @ChrisG ,
Thank you for your answer! We have followed the steps mentioned which you have provided & it worked as usual 😊
We have recently cleaned up some staled user records from user db, seems like we have deleted the system record aswell. After restoring the system record the files are getting processed now.
Thank you so much once again for taking your time and answer my query which helped to fix the issue.🤝
Regards
Sasi
May 17, 2022 01:55 AM