Friday, July 1, 2016

PolyBase - "Login timeout expired" when creating External Data Source

You are trying to create a new external data source with PolyBase setup in SQL Server 2016.

       
 CREATE EXTERNAL DATA SOURCE DS_hdp23 with (
    TYPE = HADOOP,
           -- Hortonworks 2.0, 2.1, 2.2, or Cloudera 5.1:  = 
           --   LOCATION = 'hdfs://NameNode_IP:8020'
    LOCATION ='hdfs://192.168.1.120:8020',
           -- Hortonworks HDP 2.0, 2.1, 2.2 on Linux: 
           -- RESOURCE_MANAGER_LOCATION = 'NameNode_IP:8050'
    RESOURCE_MANAGER_LOCATION='192.168.1.120:8050');
       
 

 and you get the following error:

       
OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "Login timeout expired".
OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "A network-related or 
instance-specific error has occurred while establishing a connection to SQL Server. Server is 
not found or not accessible. Check if instance name is correct and if SQL Server is configured 
to allow remote connections. For more information see SQL Server Books Online.".
Msg 10061, Level 16, State 1, Line 9
TCP Provider: No connection could be made because the target machine actively refused it.       
 

....because the target machine actively refused it.

We'll, our first instinct is to look at the Hadoop cluster. Perhaps security?  Could be, but the first place to check is with SQL Server. Using the SQL Server Configuration Manager, verify that the TCP/IP protocol for SQL Server has been enabled. There is a good chance it has not been enabled.


Enable the protocol and restart the services.  Once enabled, the create external data source should succeed.


No comments: