Hi,

This is one of the very frustrating errors I got about 10 months ago when I
set up swoop first.

Try just list databases, if this works, then everything will work.  I am
assuming that you could connect to the instance thru' your sqlserver
manager.  I would make sure of that first.

sqoop list-databases --connect
"jdbc:sqlserver://instance:port;username=userid;password=mypassword"

 Also port 1433, make sure it is open.  You will know that, by using the
following command,
nmap -p 1433 -sT localhost

Hope this helps,
Chalcy


On Tue, Jul 17, 2012 at 12:26 PM, prabhu k <[email protected]> wrote:

> Hi Users,
>
> When i am trying to import sqlserver database table to hive, getting
> following error.
>
> command:
> ==============
>
> $bin/sqoop import --driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
> --connect 'jdbc:sqlserver://localhost:1433;database=abc;username=sa'
> --hive-overwrite --direct --table slide4_test  --hive-import
> --create-hive-table --hive-table slide4_test --fields-terminated-by '\t'
> --lines-terminated-by '\n' --append
>
>
> Error:
> ======
>
> sqoop-1.4.1-incubating__hadoop-0.20# bin/sqoop import --driver
> 'com.microsoft.sqlserver.jdbc.SQLServerDriver' --connect
> 'jdbc:sqlserver://localhost:1433;database=abc;username=sa' --hive-overwrite
> --direct --table slide4_test  --hive-import --create-hive-table
> --hive-table slide4_test --fields-terminated-by '\t' --lines-terminated-by
> '\n' --append
>
> Warning: /usr/lib/hbase does not exist! HBase imports will fail.
>
> Please set $HBASE_HOME to the root of your HBase installation.
>
> Warning: $HADOOP_HOME is deprecated.
>
>
>
> 12/07/17 16:56:45 INFO manager.SqlManager: Using default fetchSize of 1000
>
> 12/07/17 16:56:45 INFO tool.CodeGenTool: Beginning code generation
>
> 12/07/17 16:56:59 ERROR manager.SqlManager: Error executing statement:
> com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to
> the host localhost, port 1433 has failed. Error: "Connection refused.
> 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.".
>
> com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to
> the host localhost, port 1433 has failed. Error: "Connection refused.
> 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.".
>
> Here, i have one question
>
> 1. How can i test sqlserver is up and running on sqoop import command
> executing machine.
>
> Please suggest and help me.
>
> Thanks,
> Prabhu.
>
>
>

Reply via email to