[Moving conversation to sqoop-user@incubator.apache.org. Please subscribe there.]
It appears that the map task run by Sqoop cannot establish a JDBC connection with the database. Check to make sure that your connect string is correct and that there is no firewall blocking access to the database machine. It may be worth while to write a short JDBC program and run it from one of the node machines to make sure that you can connect correctly. Thanks, Arvind On Thu, Sep 1, 2011 at 10:39 PM, amit kumar <amitkr.cst...@gmail.com> wrote: > while running an import , i m not able to get connected to mysql > database. Communication link failure is shooted . > I m able to connect to mysql via a java program . Problem > description : > > Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: > Communications link failure > The last packet sent successfully to the server was 0 milliseconds > ago. The driver has not received any packets from the server. > at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: > 39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java: > 27) > at java.lang.reflect.Constructor.newInstance(Constructor.java: > 513) > ............ > Caused by: java.net.ConnectException: Connection refused > at java.net.PlainSocketImpl.socketConnect(Native Method) > at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java: > 351) > at > java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) > ........... > 11/09/02 12:08:38 INFO mapred.JobClient: Job complete: > job_201108301643_0036 > 11/09/02 12:08:38 INFO mapred.JobClient: Counters: 6 > 11/09/02 12:08:38 INFO mapred.JobClient: Job Counters > 11/09/02 12:08:38 INFO mapred.JobClient: SLOTS_MILLIS_MAPS=23440 > 11/09/02 12:08:38 INFO mapred.JobClient: Total time spent by all > reduces waiting after reserving slots (ms)=0 > 11/09/02 12:08:38 INFO mapred.JobClient: Total time spent by all > maps waiting after reserving slots (ms)=0 > 11/09/02 12:08:38 INFO mapred.JobClient: Launched map tasks=4 > 11/09/02 12:08:38 INFO mapred.JobClient: SLOTS_MILLIS_REDUCES=0 > 11/09/02 12:08:38 INFO mapred.JobClient: Failed map tasks=1 > 11/09/02 12:08:38 INFO mapreduce.ImportJobBase: Transferred 0 bytes in > 34.6672 seconds (0 bytes/sec) > 11/09/02 12:08:38 INFO mapreduce.ImportJobBase: Retrieved 0 records. > 11/09/02 12:08:38 ERROR tool.ImportTool: Error during import: Import > job failed > > > > > > -- > NOTE: The mailing list sqoop-u...@cloudera.org is deprecated in favor of > Apache Sqoop mailing list sqoop-user@incubator.apache.org. Please subscribe > to it by sending an email to incubator-sqoop-user-subscr...@apache.org. >