You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a local area network, a self-signed CA certificate is usually used. At this time, I want to skip the certification. Usually, TLS.Insecure and TLS.InsecureSkipVerify are set, but this seems to have no effect, and an x509-related error is still prompted when connecting to the vcenter.
When I was troubleshooting the problem, I found that in gommomi.NewClient, when parameter TLS.Insecure is true, a TLSConfig will be automatically generated to vm.client. While in the LoadTLSConfig method, when the CA certificate path is nil, the mothod return TLSConfig is nil, overrides the default generated TLSConfig in Line#68, resulting in TLS.InsecureSkipVerify not taking effect.
2022/10/27 10:01:33 error scraperhelper/scrapercontroller.go:197 Error scraping metrics {"error": "Post \"https://*.*.*.*:443/sdk\": x509: cannot validate certificate for *.*.*.* because it doesn't contain any IP SANs ...
Additional context
No response
The text was updated successfully, but these errors were encountered:
wzy531a
changed the title
Vcenterreceiver collects metric and still prompts x509 error when TLS.Insecure and TLS.InsecureSkipVerify is set
[vcenterreceiver]collects metric and still prompts x509 error when TLS.Insecure and TLS.InsecureSkipVerify is set
Oct 28, 2022
What happened?
Description
In a local area network, a self-signed CA certificate is usually used. At this time, I want to skip the certification. Usually, TLS.Insecure and TLS.InsecureSkipVerify are set, but this seems to have no effect, and an x509-related error is still prompted when connecting to the vcenter.
When I was troubleshooting the problem, I found that in gommomi.NewClient, when parameter TLS.Insecure is true, a TLSConfig will be automatically generated to vm.client. While in the LoadTLSConfig method, when the CA certificate path is nil, the mothod return TLSConfig is nil, overrides the default generated TLSConfig in Line#68, resulting in TLS.InsecureSkipVerify not taking effect.
Collector version
v0.63.0
Environment information
Environment
OS: centos 7
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: