jira日志报警Establishing SSL connection without server's identity verification is not recommended
在/export/atlassian/jira/logs/catalina.out中,每5分钟就重复3条日志:
Thu Mar 01 13:54:54 CST 2018 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.
如log所述,这是因为MySQL增加了安全性检查。要避免被flood,要么配成https访问,要么显性地声明禁用SSL
配SSL的方法Atlassian官网上有。不过因为手头没有CA证书,所以这里采用第2种解决方法,先避免被flood。
方法:
1. 到$JIRA_DATA目录下,我的是/export/atlassian/application-data/jira,修改dbconfig.xml文件。修改之前注意备份。这个文件一旦损坏,jira重启读不到这个文件,会重新初始化。
# vi dbconfig.xml
找到jdbc的部分,把url加个后缀,即上述log中要求的useSSL=false,如下述红色部分:
<jdbc-datasource>
<url>jdbc:mysql://localhost:3306/jira?useUnicode=true&characterEncoding=UTF8&sessionVariables=default_storage_engine=InnoDB&useSSL=false</url>
前面字符集引擎等部分依各人具体情况会有不同,只是注意与其他部分要用符号&分开。但是因为这是传入的url,所以符号&要写作&
2. 重启jira后生效
评论
发表评论