Skip to content
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

My bug report - The ServicePointManager does not support proxies with the https scheme. #677

Open
CoffinDocSavage opened this issue Aug 21, 2024 · 3 comments

Comments

@CoffinDocSavage
Copy link

CoffinDocSavage commented Aug 21, 2024

Expected Behavior

Connect to HPEOneView

Actual Behavior

VERBOSE: [CONNECT-OVMGMT] Exception caught when checking X-API version.
Connect-OVMgmt: Exception calling "RestClient" with "3" argument(s): "The ServicePointManager does not support proxies with the https scheme."

Steps to reproduce

Connect-OVMgmt -Hostname -Credential $Credz -Verbose -AuthLoginDomain

Version Information

HPE OneView PowerShell Library Version (Get-OVVersion or $PSLibraryVersion): 8.50.3667.2043
HPE OneView Appliance Version (Get-OVVersion -ApplianceVer): N/A
Output from $PSVersionTable on your Windows Host:

Name                           Value
----                           -----
PSVersion                      7.4.2
PSEdition                      Core
GitCommitId                    7.4.2
OS                             Microsoft Windows 10.0.20348
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
@ChrisLynchHPE
Copy link
Member

Does your environment require HTTPS for Proxy? Is there a reason why the proxy isn't being bypassed for local networks? Can you provide the generated file from Get-OVCommandTrace -ScriptBlock { Connect-OVMgmt -Hostname $Appliance -Credential $Credz }?

BTW, you do not need to include the -AuthLoginDomain unless you omit the domain name from the Credentials object.

@CoffinDocSavage
Copy link
Author

CoffinDocSavage commented Oct 9, 2024

Hi Chris,

Thank you for the response.
No, it does not require a HTTPS proxy, it should bypass the proxy like I use to connect to vCenter for example.
I've tried to play around with my PowerShell profile but this didn't work out.

LibraryVersion Path

8.50.3667.2043 Documents\PowerShell\Modules\HPEOneView.850\8.50.3667.2043

VERBOSE: [CONNECT-OVMGMT] Bound PS Parameters:
Name                           Value

Credential                     System.Management.Automation.PSCredential
Hostname                       <name>

VERBOSE: [CONNECT-OVMGMT] Creating Session Container
VERBOSE: [CONNECT-OVMGMT] Caller did not provide -AuthLoginDomain parameter.  Checking for Domain Name or UPN formatted Username value.
VERBOSE: [CONNECT-OVMGMT] Found UPN-style domain name in the username field, 
VERBOSE: [CONNECT-OVMGMT] Checking X-API Version.
VERBOSE: [SEND-OVREQUEST] BEGIN
VERBOSE: [SEND-OVREQUEST] Called from: Connect-OVMgmt
VERBOSE: [SEND-OVREQUEST] Bound PS Parameters:
Key      Value

uri      /rest/version
Hostname <hostname>

VERBOSE: [SEND-OVREQUEST] Process
VERBOSE: [SEND-OVREQUEST] Hostname value: <hostname>
VERBOSE: [SEND-OVREQUEST] Filtering for Connection Object via String: <hostname>
VERBOSE: [SEND-OVREQUEST] Processing '<hostname>' appliance connection request. 1 of 1
VERBOSE: [SEND-OVREQUEST] Requested URI '/rest/version' to '<hostname>
VERBOSE: [SEND-OVREQUEST] We have reached the URI Whitelist condition block. Unauth request allowed for '/rest/version'.VERBOSE: [HPEOneView.Utilities.Net.RestClient] URI: <hostname>rest/version
VERBOSE: [HPEOneView.Utilities.Net.RestClient] Method: GET
VERBOSE: [HPEOneView.Utilities.Net.RestClient] XApiVersion: 5600
VERBOSE: [[HPEOneView.PKI.SslValidator]::SslValidation()] Enforcing TLS1.2 only for [System.Net.ServicePointManager.SecurityProtocol].
VERBOSE: [CONNECT-OVMGMT] Exception caught when checking X-API version.
VERBOSE: [[HPEOneView.Library.ConnectedSessionsList]::RemoveConnection()] Removing host <hostname>from collection.
VERBOSE: [[HPEOneView.Library.ConnectedSessionsList]::RemoveConnection()] Calling to remove host <hostname> from TrustedHost collection.
VERBOSE: [[HPEOneView.PKI.SslValidator]::RemoveTrustedHost()] Host <hostname>does not exist in TrustedHosts collection.
Connect-OVMgmt:
Line |
   2 |   Connect-OVMgmt -Hostname <hostname>-Credential $ …
     |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "RestClient" with "3" argument(s): "The ServicePointManager does not support proxies with the https scheme."
VERBOSE: --------------------------------------------------------------------------------```

@TarXII
Copy link

TarXII commented Oct 16, 2024

I have the same issue. Was intermittent for me so I tried to find what would trigger it for me.

Connect-OVMgmt works fine (for me) until one of these modules ...

VMware.Vim                      8.3.0.24145081
VMware.VimAutomation.Cis.Core   13.3.0.24145081
VMware.VimAutomation.Common     13.3.0.24145081
VMware.VimAutomation.Core       13.3.0.24145081
VMware.VimAutomation.Sdk        13.3.0.24145081

... gets loaded. From then, even if i remove the modules, either with or without the HPEOneView module, the problem persists.

I also get issues with HPEiLOCmdlet in the same fashion, works when those modules havent been loaded but not after that.

(HPEiLOCmdlet complains about log4net.dll missing and when that occurs I can no longer access collections in that runspace)

What do you need from me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants