Am seeing the below error while trying to connect to Oracle 11g on Red Hat Linux, 64-bit using thin jdbc drivers. Would highly appreciate if anyone can throw more light on h
Since the stack does not indicate any ORAs, you have underlying network problems.
I faced similar issue with Sqoop Oracle import and I have implemented the fix suggested by this link
This setting helped to resolve issue:
-Dmapred.child.java.opts="-Djava.security.egd=file:///dev/urandom"
and I've changed mapred-site.xml configuration property name value as:
mapreduce.admin.map.child.java.opts -Djava.security.egd=file:///dev/urandom
This is a bit sqoop specific, but I think setting JVM option
-Djava.security.egd=file:///dev/urandom"
will help you to resolve issue.
Other thing that was causing me this problem was having the HOSTNAME settings wrong. My connection attempt was hanged at:
"main" prio=10 tid=0x00007f7cc8009000 nid=0x2f3a runnable [0x00007f7cce69e000]
java.lang.Thread.State: RUNNABLE
at java.net.Inet4AddressImpl.getLocalHostName(Native Method)
at java.net.InetAddress.getLocalHost(InetAddress.java:1444)
at sun.security.provider.SeedGenerator$1.run(SeedGenerator.java:176)
at sun.security.provider.SeedGenerator$1.run(SeedGenerator.java:162)
at java.security.AccessController.doPrivileged(Native Method)
So make sure you have an entry for your hostname in /etc/hosts/
.
If you issue a hostname
command like this:
$ hostname
my.server.com
You need a line in your /etc/hosts
:
127.0.0.1 my my.server.com
You didn't include any details of the problem like what changed? Is this a new configuration for you or did it suddenly stop working? Do you know if you have enough connections available? Does this happen to every connection or is it intermittent?
Considering the error is occurring during the logon process, a few possibilities are:
Check the following stackoverflow thread about how to check the number of active connections and the max. I would expect an "ORA-00018: maximum number of sessions exceeded" error if that were the problem, so it may not be. But it's worth checking.
How to check the maximum number of allowed connections to an Oracle database?
We've had something very similar, moved a program from 32-bit to 64bit OS & a number of concurrent processes would throw the IO Error: Connection Reset.
Stumbled across this which fixed it:
https://community.oracle.com/message/3701989
Basically add the -Djava.security.egd=file:/dev/./urandom parameter and it's good to go :)