Forum Discussion
On-Premises data gateway - the remote certificate is invalid according to the validation procedure
Lydia (@v-yuezhe-msft),
Thanks for your reply. I've ensured that I have the latest versions of Power BI Gateway. As I said in my original post, the 556KB installer didn't even install the gateway, so I had to find the 30MB 'offline' download.
The required ports and IP addresses were configured on our firewall by our networking team according to the article you reference.
I've installed and uninstalled the gateway, with reboots inbetweem several times.
I've found the trace log files from;
C:\Users\[USERNAME]\AppData\Local\Microsoft\On-premises data gateway\
...and the contents are as follows;
Starting trace on 14/03/2017 11:39:31 UTC
Version: 13.0.1700.1099
EnterpriseGatewayConfigurator.exe Information: 0 : Initialize MainViewModel
EnterpriseGatewayConfigurator.exe Information: 0 : GetConfiguratorStateAsync
EnterpriseGatewayConfigurator.exe Information: 0 : Configuration client returned null
EnterpriseGatewayConfigurator.exe Information: 0 : Sign In
EnterpriseGatewayConfigurator.exe Error: 0 : Exception: Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.EmailDiscoveryServiceException: Network request returned unexpected error. ---> System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.ConfiguratorClientExtensions.<DiscoverEmailProperties>d__19.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.WizardSignInViewModel.DiscoverCloudServiceDetails(HttpClient httpClient, String emailAddress)
--- End of inner exception stack trace ---
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.WizardSignInViewModel.DiscoverCloudServiceDetails(HttpClient httpClient, String emailAddress)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.WizardSignInViewModel.DoNext(Object param)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.WizardViewModelBase.DoNextWorker(Object param)
at Microsoft.PowerBI.DataMovement.GatewayUXCommon.RelayCommand.<>c__DisplayClass6.<Execute>b__4()
- Anonymous9 years agoNot applicable
Hi ChrisOnesBroken,
The issue is related to certificate. You can use Fiddler to capture request URL during the installation process, then check the certificate of the URL in IE, for more details, you can following the instructions in this similar blog.
Thanks,
Lydia Zhang- ChrisOnesBroken9 years agoHelper I
I ran the On-Premises data gateway, and when I entered my email address for the PowerBI account I've been using, I got the following;
A SSLv3-compatible ClientHello handshake was found. Fiddler extracted the parameters below.
Version: 3.1 (TLS/1.0)
Random: 58 C9 20 55 4F F0 6E 6F B3 53 FD 1E E5 AA 79 8D 57 E3 EE A1 53 AC 4A 2E 7F 20 C1 C6 22 B1 DC 85
"Time": 05/04/2015 06:34:16
SessionID: empty
Extensions:
renegotiation_info 00
server_name api.powerbi.com
elliptic_curves secp256r1 [0x17], secp384r1 [0x18]
ec_point_formats uncompressed [0x0]
SessionTicket empty
Ciphers:
[C014] TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA
[C013] TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA
[0035] TLS_RSA_AES_256_SHA
[002F] TLS_RSA_AES_128_SHA
[C00A] TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
[C009] TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
[0038] TLS_DHE_DSS_WITH_AES_256_SHA
[0032] TLS_DHE_DSS_WITH_AES_128_SHA
[000A] SSL_RSA_WITH_3DES_EDE_SHA
[0013] SSL_DHE_DSS_WITH_3DES_EDE_SHA
[0005] SSL_RSA_WITH_RC4_128_SHA
[0004] SSL_RSA_WITH_RC4_128_MD5
Compression:
[00] NO_COMPRESSION
I've browsed to https://api.powerbi.com/ in IE, and as expected, I received the error 'There is a problem with this website's security certificate'.
I proceeded to 'trust' the certificate in IE. I clicked 'Sign in' again on the On-Premises data gateway, and was presented with subsequent error messages;
Ensure network access is functioning correctly. Firewall and proxy configurations may need to be changed.
and
Gateway service health check failed. Common issues can be found at https://go.microsoft.com/fwlink/?linkid=838272
Below is the stack trace:
Health check failed becuase it cannot finish in 2000ms.
- ChrisOnesBroken9 years agoHelper I
I've run fiddler, and the URL it seems to want to connect to is;
api.powerbi.com
In the on-premises data gateway, it presents the following error;
So are you saying I need to get the certificate for api.powerbi.com and add it as a trusted certificate on the server?
The log file is as follows;
EnterpriseGatewayConfigurator.exe Information: 0 : Initialize MainViewModel
EnterpriseGatewayConfigurator.exe Information: 0 : GetConfiguratorStateAsync
EnterpriseGatewayConfigurator.exe Information: 0 : Configuration client returned null
EnterpriseGatewayConfigurator.exe Information: 0 : Sign In
EnterpriseGatewayConfigurator.exe Error: 0 : Exception: Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.EmailDiscoveryServiceException: Network request returned unexpected error. ---> System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.ConfiguratorClientExtensions.<DiscoverEmailProperties>d__19.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.WizardSignInViewModel.DiscoverCloudServiceDetails(HttpClient httpClient, String emailAddress)
--- End of inner exception stack trace ---
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.WizardSignInViewModel.DiscoverCloudServiceDetails(HttpClient httpClient, String emailAddress)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.WizardSignInViewModel.DoNext(Object param)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.WizardViewModelBase.DoNextWorker(Object param)
at Microsoft.PowerBI.DataMovement.GatewayUXCommon.RelayCommand.<>c__DisplayClass6.<Execute>b__4()
EnterpriseGatewayConfigurator.exe Information: 0 : Sign In
EnterpriseGatewayConfigurator.exe Error: 0 : Exception: Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.EmailDiscoveryServiceException: Network request returned unexpected error. ---> System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8888
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.ConfiguratorClientExtensions.<DiscoverEmailProperties>d__19.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.WizardSignInViewModel.DiscoverCloudServiceDetails(HttpClient httpClient, String emailAddress)
--- End of inner exception stack trace ---
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.WizardSignInViewModel.DiscoverCloudServiceDetails(HttpClient httpClient, String emailAddress)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.WizardSignInViewModel.DoNext(Object param)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.WizardViewModelBase.DoNextWorker(Object param)
at Microsoft.PowerBI.DataMovement.GatewayUXCommon.RelayCommand.<>c__DisplayClass6.<Execute>b__4()
EnterpriseGatewayConfigurator.exe Information: 0 : Update checks
EnterpriseGatewayConfigurator.exe Error: 0 : Failed to resolve DNS host for dns.msftncsi.com
EnterpriseGatewayConfigurator.exe Error: 0 : System.Net.Sockets.SocketException (0x80004005): This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server
at System.Net.Dns.GetAddrInfo(String name)
at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.Checks.NetworkCheck.CheckDNSQuery()
EnterpriseGatewayConfigurator.exe Information: 0 : Create webrequest for Uri: http://www.msftncsi.com/ncsi.txt
EnterpriseGatewayConfigurator.exe Information: 0 : Checking for On-premises data gateway service
EnterpriseGatewayConfigurator.exe Information: 0 : Fetch state for On-premises data gateway service
EnterpriseGatewayConfigurator.exe Information: 0 : Service state: Running
EnterpriseGatewayConfigurator.exe Error: 0 : System.AggregateException: One or more errors occurred. ---> System.TimeoutException: The operation has timed out.
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.Checks.CheckManager.<RunChecks>d__0.MoveNext()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.TimeoutException: The operation has timed out.
at Microsoft.PowerBI.DataMovement.EnterpriseGatewayConfigurator.Checks.CheckManager.<RunChecks>d__0.MoveNext()<---EnterpriseGatewayConfigurator.exe Error: 0 : Gateway service health check Timeout failed with error : Health check failed because it cannot finish in 2000 ms.
EnterpriseGatewayConfigurator.exe Information: 0 : Create httpclient request for Uri: http://www.msftncsi.com/ncsi.txt- Anonymous9 years agoNot applicable
Hi ChrisOnesBroken,
Do you use Proxy in your scenario? If so, have you followed the instructions in the articles below to configure proxy setting?
https://powerbi.microsoft.com/en-us/documentation/powerbi-gateway-proxy/
https://powerbi.microsoft.com/en-us/documentation/powerbi-gateway-onprem-tshoot/#firewall-or-proxy
Thanks,
Lydia Zhang