51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

confluence日志大量Establishing SSL connection without ...

confluence日志中/opt/atlassian/confluence/logs/catalina.out存在大量的WARN

WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

这是由于连接MySQL没有定义SSL原因导致的警告

本文基于Confluence7.4版本验证通过。

解决办法:

1、关闭Confluence
/etc/init.d/confluence stop

|---|-----------------------------| | 1 | /etc/init.d/confluence stop |

2、查找文件confluence.cfg.xml

我这里的配置文件在/data/atlassian/application-data/confluence/confluence.cfg.xml

如果你不清楚自己的配置文件在哪里,可以进行全局查找
find / -name "confluence.cfg.xml"

|---|-----------------------------------| | 1 | find / -name "confluence.cfg.xml" |

附:Confluence数据存放目录设置见:https://blog.whsir.com/post-5869.html

3、编辑confluence.cfg.xml

查找以下内容,请注意,你的配置和我的可能不一样,建议搜索hibernate.connection.url字段
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/confluence</property>

|---|-------------------------------------------------------------------------------------------------| | 1 | <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/confluence</property> |

修改成(在后面新增?useSSL=false)
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/confluence?useSSL=false</property>

|---|--------------------------------------------------------------------------------------------------------------| | 1 | <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/confluence?useSSL=false</property> |

保存退出,重新启动confluence,问题解决
/etc/init.d/confluence restart

|---|--------------------------------| | 1 | /etc/init.d/confluence restart |

更多内容见官方文档:https://confluence.atlassian.com/confkb/getting-establishing-ssl-connection-without-server-s-identity-verification-is-not-recommended-warning-messages-in-the-logs-973502769.html

赞(2)
未经允许不得转载:工具盒子 » confluence日志大量Establishing SSL connection without ...