Forum Discussion
On-Premises data gateway - the remote certificate is invalid according to the validation procedure
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
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- ChrisOnesBroken9 years ago
Helper I
Thanks Anonymous,
I've run the powershell in the first link, and it times out;
PS H:\> Test-NetConnection -ComputerName watchdog.servicebus.windows.net -Port 9350
WARNING: Ping to watchdog.servicebus.windows.net failed -- Status: TimedOut
ComputerName : watchdog.servicebus.windows.net
RemoteAddress : 70.37.104.240
RemotePort : 9350
InterfaceAlias : Team1
SourceAddress : [Redacted]
PingSucceeded : False
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded : TrueHowever the firewall is off on the server, and server has been configured on the corporate firewall to access "any destination on TCP 443 , 5671, 5672 and 9350-9354"
I'm logged on as myself and have full access to do anything needed, and I've tried setting the 'On-Premises data gateway services' service to run as an AD account (pbi_DataGatewaySA) which has access to the internet etc.
EDIT: Further to the above, I've spoken to our networking team and they're surprised that I've been asked to ping the address becuase the documentation doesn't call for it (https://powerbi.microsoft.com/en-us/documentation/powerbi-gateway-onprem/#ports). They've added ping/icmp to the policy, but it still doesn't respond using the powershell.
- Anonymous9 years agoNot applicable
Hi ChrisOnesBroken,
The Test-NetConnection may not work if your server don’t have direct Internet connections and all connections must go through your proxy server.
Modify the Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config file by changing the value from AutoDetect to Https. Also configure Proxy following the guide in this article and check if the issue still occurs.
Thanks,
Lydia Zhang