-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nutanix report errors with word or html #12
Comments
To Reproduce Expected behavior I changed the info level to the following infolevel settings and still got the exact error! |
@aalexanian can you disable all InfoLevel sections and tell me if the report generates? This will help me diagnose where the problem might be. |
After disabling all InfoLevel sections, the report was generated. The first
time I ran the report, the AsBuiltReport.Nutanix.PrismElement.json was
generated. I then modified the InfoLevel sections and ran it again but
without overriding the json file.
Regards
Andre Alexanian
***@***.***
…On Thu, Sep 16, 2021 at 8:32 PM Tim Carman ***@***.***> wrote:
@aalexanian <https://github.com/aalexanian> can you disable all InfoLevel
sections and tell me if the report generates? This will help me diagnose
where the problem might be.
Also, did you modify the default report JSON file or generate one? If you
have generated one, you with need to specify the ReportConfigFilePath
parameter
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHUEGEWTPHZ3RSQB3TO7LA3UCKZDLANCNFSM5EGBNKAA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I'm also having this issue, but even after disabling all info levels, I still get the same error as OP. The only difference is we're using AOS. 5.15.7 LTS and not 5.15.6 |
Which hypervisor are you both running? |
Mix of ESXi and AHV (Storage only Nodes) |
Leave it with me. I'll see if I can get a lab spun up next week to do some further testing. |
Thank you |
Hi @tpcarman, just checking in to see if you'd had a chance to look at this any yet. Thanks |
@pettcomputers unfortunately I cannot get access to a mixed ESXi & AHV environment like yours, however if you're willing to try and run some code we might be able to identify the issue. Modify the first line of the code below and replace $ntnxpe = <cluster IP> # Replace with your Prism / Cluster IP
$credential = get-credential # When prompted, enter Prism credentials function Get-NtnxApi {
[CmdletBinding()]
param (
[Parameter(
Mandatory = $true
)]
[ValidateNotNullOrEmpty()]
[Int] $Version,
[Parameter(
Mandatory = $true
)]
[ValidateNotNullOrEmpty()]
[String] $Uri
)
Begin {
#region Workaround for SelfSigned Cert an force TLS 1.2
if (-not ([System.Management.Automation.PSTypeName]'ServerCertificateValidationCallback').Type) {
$certCallback = @"
using System;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
public class ServerCertificateValidationCallback
{
public static void Ignore()
{
if(ServicePointManager.ServerCertificateValidationCallback ==null)
{
ServicePointManager.ServerCertificateValidationCallback +=
delegate
(
Object obj,
X509Certificate certificate,
X509Chain chain,
SslPolicyErrors errors
)
{
return true;
};
}
}
}
"@
Add-Type $certCallback
}
[ServerCertificateValidationCallback]::Ignore()
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
#endregion Workaround for SelfSigned Cert an force TLS 1.2
$username = $Credential.UserName
$password = $Credential.GetNetworkCredential().Password
$auth = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($username + ":" + $password ))
$api_v1 = "https://" + $NtnxPE + ":9440/PrismGateway/services/rest/v1"
$api_v2 = "https://" + $NtnxPE + ":9440/PrismGateway/services/rest/v2.0"
$headers = @{
'Accept' = 'application/json'
'Authorization' = "Basic $auth"
'Content-Type' = 'application/json'
}
}
Process {
Try {
Write-PScriboMessage -Message "Performing API reference call to $(($URI).TrimStart('/')) [$NtnxPE]"
# Check PowerShell version
if ($PSVersionTable.PSVersion.Major -eq "7") {
Switch ($Version) {
'1' { Invoke-RestMethod -Method Get -Uri ($api_v1 + $uri) -Headers $headers -SkipCertificateCheck }
'2' { Invoke-RestMethod -Method Get -Uri ($api_v2 + $uri) -Headers $headers -SkipCertificateCheck }
}
} elseif ($PSVersionTable.PSVersion.Major -eq "5") {
Switch ($Version) {
'1' { Invoke-RestMethod -Method Get -Uri ($api_v1 + $uri) -Headers $headers }
'2' { Invoke-RestMethod -Method Get -Uri ($api_v2 + $uri) -Headers $headers }
}
} else {
Throw
}
} Catch {
Write-Verbose -Message "Error with API reference call to $(($URI).TrimStart('/')) [$NtnxPE]"
Write-Verbose -Message $_
}
}
End {}
} $NtnxCluster = Get-NtnxApi -Version 2 -Uri '/cluster'
$NtnxCluster | Select-Object -ExpandProperty Name |
I am still having this issue above. Have narrowed it down to System InfoLevel. It successfully runs with all InfoLevels set to 0. Then changing them 1 at a time & errors when system is changed from 0. OS: Windows 10 |
Still seeing this issue. Running with multiple versions of AOS 5.4.x & 6.5.x. Pure ESXi environment. |
@TMW999 have you tried running the code from my comments above? |
@tpcarman I am having the same issue as @aalexanian .. I am an all Nutanix environment.. yes I have ran the above test you provided and I return no results.. |
Describe the bug
I ran the Nutanix as build report for the first time on two different clusters and got the exact error.
New-AsBuiltReport : Cannot bind argument to parameter 'Name' because it is an empty string.
At line:1 char:1
Screenshot
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: