centos7.5报错Cannot create PoolableConnectionFactory (Io 异常: Connection reset)---已证实不可能是数据库连接配置问题

一、问题说明:centos7.5报错Cannot create PoolableConnectionFactory (Io 异常: Connection reset)---已证实不可能是数据库连接配置问题,详细信息如下:

Exception in thread "main" org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io 异常: Connection reset)
    at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:394)
    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:478)
    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:483)
    at com.interlib.opac.solr.dao.BibliosDAO.getBookrecnos(BibliosDAO.java:66)
    at com.interlib.opac.solr.IndexExecutor.index(IndexExecutor.java:56)
    at com.interlib.opac.solr.IndexExecutor.main(IndexExecutor.java:152)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io 异常: Connection reset)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
    at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
    ... 6 more
Caused by: java.sql.SQLRecoverableException: Io 异常: Connection reset
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:101)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:458)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:411)
    at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:490)
    at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:202)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:474)
    at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
    at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
    at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
    ... 9 more
二、解决过程

百度

三、解决办法

修改$JAVA_HOME/jre/lib/security路径下的java.security文件。将securerandom.source=file:/dev/random修改成securerandom.source=file:/dev/./urandom

你可能感兴趣的:(Linux,Interlib)