SQLRecoverableException: I/O Exception: Connection reset

后端 未结 8 1323
太阳男子
太阳男子 2020-12-07 19:06

Yesterday evening I left the office with a running Java program written by me. It should insert a lot of records into our company database (Oracle) using a JDBC connection.

8条回答
  •  天命终不由人
    2020-12-07 19:38

    We experienced these errors intermittently after upgraded from 11g to 12c and our java was on 1.6.

    The fix for us was to upgrade java and jdbc from 6 to 7

    export JAVA_HOME='/usr/java1.7'
    
    export CLASSPATH=/u01/app/oracle/product/12.1.0/dbhome_1/jdbc/libojdbc7.jar:$CLASSPATH 
    

    Several days later, still intermittent connection resets.

    We ended up removing all the java 7 above. Java 6 was fine. The problem was fixed by adding this to our user bash_profile.

    Our groovy scripts that were experiencing the error were using /dev/random on our batch VM server. Below forced java and groovy to use /dev/urandom.

    export JAVA_OPTS=" $JAVA_OPTS -Djava.security.egd=file:///dev/urandom "

提交回复
热议问题