现象
CM启动完后,过一会就挂掉了,查看配置什么的都没有问题,查看异常日志发现是mysql连接问题
SCM错误信息
Mon May 17 17:24:02 CST 2021 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日志信息
2021-05-17T09:18:49.649968Z 102 [Note] Bad handshake
原因
#查看mysql版本
mysql Ver 14.14 Distrib 5.7.34, for Linux (x86_64) using EditLine wrapper
查找文档发现mysql从5.7.28之后默认开了SSL连接,可以看到工作目录下面多了如下文件:
然而我们的连接默认是未使用SSL的,修改配置即可
解决方案
修改my.cnf配置,关掉ssl连接,添加如下:
[mysqld]
skip_ssl
重启mysql后,CM server也启动正常
评论区