In short: SSL Handshake failed with OpenSSL error
It roughly means that the connection to the server was successful, but an exception was reported during the handshake. There were words like openssl and ssl_error in it. After reviewing it,
The same deployment method does not have this problem in the centos 7 Alibaba Cloud server. It is speculated that there is no problem with the code and environment, and then I took a look.
I installed ubuntu 20.4, which is the latest version of Ubuntu, and has something to do with openssl. Then it’s not a problem with LTS, check it out
openssl version, OpenSSL 1.1.1f comes out, it was released in March 2020, then my sql version is several years ago, it must not be right
The problem is found, downgrade the openssl version.
Steps (note the use of root operation):
- Download package:
wget https://www.openssl.org/source/openssl-1.1.1.tar.gz
解压: tar -zxf openssl-1.1.1.tar.gz
cd openssl-1.1.1
- .
/config
. apt install make gcc
make
make test
Check if there are any problems- Back up the current openssl:
sudo mv /usr/bin/openssl ~/tmp
- Perform the installation:
sudo make install
. Create a soft connection: ln -s /usr/local/bin/openssl /usr/bin/openssl
- Run the command to
sudo ldconfig
update the soft connection and cache.
Then take a look:
openssl version
The following information is output to prove that the downgrade is successful
OpenSSL 1.1.1 11 Sep 2018