SQL Server AAG: failed to obtain cluster information. either the specified instance of SQL Server is not running on a windows server failover cluster (WSFC) node, or the user lacks sysadmin permissions on the SQL Server instance to obtain the cluster information.

You get the following error when trying to add a node to an AlwaysOn Availability Group.

failed to obtain cluster information. either the specified instance of SQL Server is not running on a windows server failover cluster (WSFC) node, or the user lacks sysadmin permissions on the SQL Server instance to obtain the cluster information.

The first things to check are the following;

1) check always-on is enabled in SQL configuration manager or run SELECT SERVERPROPERTY (‘IsHadrEnabled’);
2) check you are local admin on all nodes 
3) check cluster permission by right click on properties of the  windows cluster in fail-over cluster  manager

There is also a qwerk with SQL Server, where if you Enable the AlwaysOn Availability Group setting before the node is added to the cluster then you get this error when trying to add the node to the AAG. You need to Add the node to the WSFC THEN Enable this option. If you’re in doubt then this option can be unchecked then checked again, how ever this will need a SQL Server Service restart.

LogShipping Error: Unhandled Exception: System.IO.FileLoadException: Mixed mode assembly is built against version ‘v2.0.50727’ of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information

You will see the following error in the SQL Agent job history for the LogShipping Job;

Unhandled Exception: System.IO.FileLoadException: Mixed mode assembly is built against version ‘v2.0.50727’ of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information

This is because SQLLogshipping is trying to use mixed-mode assemblies for .netframework, To use mixed-mode assemblies in .NET Framework 4.0, it must be configured in the configuration file for that application.

SQLServer.exe and SQLAgent. exe applications are in the C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn Directory, here you have the corresponding .config files. However, log shipping is in C:\Program Files\Microsoft SQL Server\130\Tools\Binn which has its own separate application there for its own .config file.

The sqllogship.exe.config file needs to be added to allow legacy v2 runtime, as the following MS Article describes; https://docs.microsoft.com/en-us/troubleshoot/dotnet/framework/sgen-mixed-mode-assembly-built-v2-0-50727

sqllogship.exe.config should look something like this, once modified.

SQL Server & SQL Agent DOES NOT require a reboot for this change to work. just execute the log shipping job again and it should read the new config file (and hopefully work for you.)