Hi there,
I'm currently facing the following issue after I implemented the Azure Connector based on the documentation. I'm running 2021R1 and I have all hotfixes installed. I already installed the Azure.Core version 1.14 package manually, but it didn't solve the problem. I already tested the PS commands manually and I can connect to Azure to fetch the data needed.
2021-10-12 20:00:26,608 [INFO ] Running Compliance import with "-us false -processremotepackages true -importtype Readers -s AzureVMsWSATenant" parameters
2021-10-12 20:00:30,608 [INFO ] Reading 'ActiveDirectory' data from 'Azure Virtual Machines WSA Tenant' (ver 1.0) data source
2021-10-12 20:00:30,608 [INFO ] Reading data for 'ActiveDirectory' successfully processed in 0 seconds.
2021-10-12 20:00:30,686 [INFO ] Released application lock Reader_fe56bd38-9de7-4510-9977-611d0fe31890_ActiveDirectory_ALL
2021-10-12 20:00:30,686 [INFO ] Reading 'Computer' data from 'Azure Virtual Machines WSA Tenant' (ver 1.0) data source
2021-10-12 20:00:30,686 [INFO ] Reading data for 'Computer' successfully processed in 0 seconds.
2021-10-12 20:00:30,686 [INFO ] Released application lock Reader_fe56bd38-9de7-4510-9977-611d0fe31890_Computer_ALL
2021-10-12 20:00:30,686 [INFO ] Reading 'VirtualMachine' data from 'Azure Virtual Machines WSA Tenant' (ver 1.0) data source
2021-10-12 20:00:30,686 [INFO ] Get Azure VM Instances (Transfer data from source 'Azure Virtual Machines WSA Tenant' to FNMP)
2021-10-12 20:00:30,920 [INFO ] #ObjectModel_CloudServiceInstance_GetAzureVMInstances
2021-10-12 20:00:30,951 [WARN ] Warning! The maximum key length is 900 bytes. The index 'CK_#ObjectModel_CloudServiceInstance_GetAzureVMInstances' has maximum length of 1824 bytes. For some combination of large values, the insert/update operation will fail.
2021-10-12 20:00:47,092 [INFO ] Failed to execute Reader 'Get Azure VM Instances' from file C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Reader\microsoft azure\Instance.xml, at step line 1
Error: Please review the error message and correct the issue, then try again:
Could not load file or assembly 'Azure.Core, Version=1.14.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'Azure.Core, Version=1.14.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
2021-10-12 20:00:47,092 [INFO ] All retries have been attempted for Reader 'Get Azure VM Instances'
2021-10-12 20:00:47,092 [INFO ] Completed with error in 16 seconds.
2021-10-12 20:00:47,092 [INFO ] Released application lock Reader_fe56bd38-9de7-4510-9977-611d0fe31890_VirtualMachine_ALL
2021-10-12 20:00:47,092 [ERROR] System.Management.Automation.RuntimeException: Please review the error message and correct the issue, then try again:
Could not load file or assembly 'Azure.Core, Version=1.14.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'Azure.Core, Version=1.14.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
---> System.Management.Automation.RuntimeException: Please review the error message and correct the issue, then try again:
Could not load file or assembly 'Azure.Core, Version=1.14.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'Azure.Core, Version=1.14.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
--- End of inner exception stack trace ---
at ManageSoft.Compliance.Importer.Logic.PowerShellDataReader.Read()
at System.Data.SqlClient.SqlBulkCopy.ReadFromRowSourceAsync(CancellationToken cts)
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.PublicObjectModel.SourceToImportedTableObject.ExecuteReader(IValidatingDataReader reader, SourceToObject STOObject)
at ManageSoft.Compliance.Importer.Logic.PublicObjectModel.SourceToObjectImplementation.ExecuteImplementationSQL(IExecutionContext context, SourceToObject sourceToObject)
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)
During my Google research I found a couple of articles stating that I might have to add the following line to a .NET config file, but I couldn't find that file:
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
Does anyone got this error as well and found a solution?
Thx
Jules
Oct 13, 2021 02:16 AM
Hi
Is your beacon services are running as Local system or using some service account.
Oct 13, 2021 02:22 AM
Hi, It's using a service account that has admin permissions on the server.
Just tested with local system, but I get the same error
Oct 13, 2021 02:48 AM - edited Oct 13, 2021 02:51 AM
Hi
Can you confirm below
Oct 13, 2021 03:13 AM
It seems, During installation of Azure connector, there are some files are missing , due to this , we are getting this error. Are you doing manually installation of module or its getting direct required file from internet. Can you remove everything & try to reinstall & monitor no error during installation.
Oct 13, 2021 06:06 AM
I installed the modules via the install-module command. I'll uninstall all az & az.* modules again, reinstall it and let you know the result
Oct 13, 2021 07:50 AM
I removed all the modules from x64 and x86 bit PS.
This time, I downloaded the Az nuget package version 6.4.0, extracted it to the modules directory and installed the az.resourcegraph module.
Unfortuntely I receive exactly the same error.
I will now test it with the AzureRM modules instead of the new Az ones
Oct 13, 2021 08:36 AM
It does work with AzureRM. However, I don't get VMs or SQL VMs inventoried even though my registered application has VM and SQL read access at the root management group level and can list all subscriptions, but that's another story.
EDIT: looks like I was wrong. Even though the task shows "Devices read from source: 0" in the staging part, it does show 164 devices in the mport inventory devices part
Oct 13, 2021 10:05 AM - edited Oct 13, 2021 10:07 AM
That's great. At least one issue got solve & we know the reason.
Oct 13, 2021 10:23 AM
Unfortuntenaly it looks like that there is still an issue even though the import was successful in the task overveiew.
I don't get any Azure Hybrid Information imported, which is the most relevant information I need. Is there maybe any guide how to troubleshoot this easily. I already started using the commands from PS script of the Azure VM reader, but it still puzzles me which function to execute in which order 🙂
Oct 14, 2021 02:32 AM
Oct 14, 2021 02:44 AM
agree, but what I need is whether or not AHB is used on a (SQL) VM or not.
According to Azure inventory connector will not support Microsoft PowerShell AzureRM module from 2021 R2 release ... - Community (flexera.com) the AzureRM module does not support gathering this information, but Az does.
So I will uninstall AzureRM again and reinstall Az. Most likely I will be back to where I was in my first post in this thread. I will keep you guys updated.
Oct 14, 2021 02:52 AM
Now, the initial problem is back:
Import failed. Error: Please review the error message and correct the issue, then try again:
Could not load file or assembly 'Azure.Core, Version=1.14.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'Azure.Core, Version=1.14.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
Anything else I can do to solve this problem? I'd highly appreciate any help, cause I need this data quite urgently for the upcoming TrueUp.
I tried to bulk override the cloud license model, but this does not work either 😞
Oct 14, 2021 04:40 AM
Hi
Can you raise a support case with Flexera. It seems some issue with new module & need to check by them.
Oct 14, 2021 04:57 AM
will do, thank you all for your support!
Oct 14, 2021 05:10 AM
Always welcome.
Do share once received solution & root cause.
Oct 14, 2021 05:19 AM
I have the same issue, raised a case but there was no conclusion and could not be reproduced.
I've tried reinstalling all AZ components. It seems the issue does not happen on remote beacons when running Azure connector, but only appears on Flexera app server if Beacon is deployed there and connector is run. Both remote beacon and app server are running exactly same PS version and same Az components & prereqs, yet only the app server connector fails with the same error every time.
Let us know if you have any progress in the case!
Nov 04, 2021 03:56 AM - edited Nov 04, 2021 03:57 AM
Flexera does not recommend to use beacon in application server.
Nov 04, 2021 04:03 AM
Good to know that you have the same problem like we have. I meanwhile installed the connector on our test system and I get the same error. I have installed all components on one server since it is supported.
I'm a bit frustrated with Flexera support meanwhile. Support is even worse than free Microsoft online support these days. Even I classified my problem as high because I needed a solution for the upcoming MS TrueUp, I did not receive a second reply for more than 2 weeks.
Nov 04, 2021 04:19 AM
Hi @JulesB did you have any conclusion to the case? I've tried everything from editing the web.config files and installing all prereqs all over again. Still it refuses to work on all app servers where beacon is installed, only on remote beacon it works.
BR, Antti
Jan 04, 2022 11:21 AM