Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

error while running simple sqoop command

avatar
Expert Contributor

sqoop-error.txt

Hi all,

i am getting this connection reset everytime i run any simple select sqoop command also.

kindly find attached file to look int the error.

plz do the needful if possible.

@Jay SenSharma

1 ACCEPTED SOLUTION

avatar
Master Mentor

@hardik desai

It's basically a "connection reset" error.

17/08/05 19:02:46 ERROR manager.SqlManager: Error reading database metadata: java.sql.SQLRecoverableException: IO Error: Connection reset
java.sql.SQLRecoverableException: IO Error: Connection reset


- This either indicates a N/W issue or Oracle Terminating the connection.

- Is it happening for every connection request, or if you are throttling the connection requests to a couple per second, does it work better?

- Sometimes the DBMS can't handle lots of near-simultaneous connection requests. But If it happens with each request, every time, then it might be a DB a n/w issue.

- Another possible reason could be that for some reason the software cannot read from "dev/random" In such cases you should try with the "java.security.egd" property as following, Because sometimes due to the lack of a fast random number generation device on the host where the map tasks execute.

export HADOOP_OPTS=-Djava.security.egd=file:/dev/../dev/urandom
sqoop import -Dmapred.child.java.opts="-Djava.security.egd=file:/dev/../dev/urandom"


https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_oracle_connection_reset_errors

.

View solution in original post

5 REPLIES 5

avatar
Master Mentor

@hardik desai

It's basically a "connection reset" error.

17/08/05 19:02:46 ERROR manager.SqlManager: Error reading database metadata: java.sql.SQLRecoverableException: IO Error: Connection reset
java.sql.SQLRecoverableException: IO Error: Connection reset


- This either indicates a N/W issue or Oracle Terminating the connection.

- Is it happening for every connection request, or if you are throttling the connection requests to a couple per second, does it work better?

- Sometimes the DBMS can't handle lots of near-simultaneous connection requests. But If it happens with each request, every time, then it might be a DB a n/w issue.

- Another possible reason could be that for some reason the software cannot read from "dev/random" In such cases you should try with the "java.security.egd" property as following, Because sometimes due to the lack of a fast random number generation device on the host where the map tasks execute.

export HADOOP_OPTS=-Djava.security.egd=file:/dev/../dev/urandom
sqoop import -Dmapred.child.java.opts="-Djava.security.egd=file:/dev/../dev/urandom"


https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_oracle_connection_reset_errors

.

avatar
Master Mentor

@hardik desai

Please try once:

# rm /dev/random
# ln -s /dev/urandom /dev/random

.

avatar
Master Mentor

@hardik desai

Good to know that you are able to run the command properly now. It would be great if you can mark the correct answer as "Accepted" (answered) that way it will help other HCC users to quickly navigate the answer.

avatar
Expert Contributor

@Jay SenSharma thank you for your reply...

To let you know that it happened with each request every time. I have checked from network end also by using telnet and tcpdump but still not sure about the cause of the error.

avatar
Expert Contributor

@Jay SenSharma i have tried with these commands and executed it 3 times. It worked everytime now. I suppose it is due to that bug only which you have shared.