java.sql.SQLRecoverableException: IO Error: Connection reset by peer
Caused by: java.io.IOException: Connection reset by peer
org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 17002, SQLState: 08006
javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not extract ResultSet
javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not extract ResultSet
原来的Dockerfile:
CMD [ "/usr/bin/java","-jar", "/app.jar", "--spring.config.location=/conf/application.yml"]
修改后的Dockerfile(加上"-Djava.security.egd=file:/dev/./urandom")
CMD [ "/usr/bin/java","-Djava.security.egd=file:/dev/./urandom" ,"-jar", "/app.jar", "--spring.config.location=/conf/application.yml"]
参考文章:https://community.oracle.com/message/3701989https://community.oracle.com/message/3701989