I have been running SQL Server on Ubuntu for a while and everything has been working fine but I rebooted the server and now all connections to SQL Server fail with the error:
A connection was successfully established with the server, but then an error occurred during the login process.
(provider: SSL Provider, error: 0 -
An existing connection was forcibly closed by the remote host.)
(Microsoft SQL Server, Error: 10054)
I have tried uninstalling and reinstalling SQL Server, setting various mssql-conf values (since removed again) etc. but nothing I do makes any difference.
Articles relating to Windows seem to point to it being SSL-related but SSL was not enabled. I did try to enable it and set a certificate but then even though I made permissions to the certificate and private key 777 and chowned to the mssql user/group it just told me it couldn't read it and then SQL Server failed to start up so I removed again.
Can anyone suggest anything I can do to get it working again please as I am out of ideas?
Thanks
Robin
Best Answer
MSSQL expects OpenSSL v1.0 while Ubuntu 18+ uses OpenSSL 1.1, resulting in a OpenSSL version mismatch. The solution is to symlink ssl v1.0 as below:
Stop SQL Server
Open the editor for the service configuration
In the editor, add the following lines to the file and save it:
Create symbolic links to OpenSSL 1.0 for SQL Server to use
Start SQL Server