当我尝试运行sqoop命令导入
时sqoop import --connect jdbc:sqlserver://localhost/db_name--username
user--password user--table table_name.
我收到以下错误。
ERROR: The TCP/IP connection to the host 127.0.0.1, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
我的命名管道和TCP / IP都已启用并具有端口1433.SQL服务器TCP / IP协议也有端口1433.我已创建防火墙入站和出站规则以允许连接。我得到相同的错误。< / p>
答案 0 :(得分:0)
请尝试将 sqljdbc42.jar 添加到sqoop lib路径并添加
- 驱动程序com.microsoft.sqlserver.jdbc.SQLServerDriver
到您的sqoop导入命令。
还要确保db_name和--username之间应该有空格,用户名和--password之间应该有空格,命令末尾没有点。