Unable to connect to SQL server instance ubuntu 18.04

0

I am running SQL server on ubuntu 18.04 which I was able to connect to successfully via SSMS. But I am not able to connect anymore. My first instinct was to check if the SQL server was running by executing

sudo systemctl status mssql-server

lo and behold the SQL server instance was active so I rebooted the entire server and ran the above command again and saw the following:

mssql-server.service - Microsoft SQL Server Database Engine
Loaded: loaded (/lib/systemd/system/mssql-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2019-10-16 16:49:17 UTC; 1min 13s ago
Docs: https://docs.microsoft.com/en-us/sql/linux
Process: 1025 ExecStart=/opt/mssql/bin/sqlservr (code=exited, status=1/FAILURE)
Main PID: 1025 (code=exited, status=1/FAILURE)
Oct 16 16:49:17 lamp-xxxxx systemd[1]: mssql-server.service: Main process exited, code=exited, status=1/FAILURE
Oct 16 16:49:17 lamp-xxxxx systemd[1]: mssql-server.service: Failed with result 'exit-code'.
Oct 16 16:49:17 lamp-xxxxx systemd[1]: mssql-server.service: Service hold-off time over, scheduling restart. 
Oct 16 16:49:17 lamp-xxxxx systemd[1]: mssql-server.service: Scheduled restart job, restart counter is at 3.
Oct 16 16:49:17 lamp-xxxxx systemd[1]: Stopped Microsoft SQL Server Database Engine.
Oct 16 16:49:17 lamp-xxxxx systemd[1]: mssql-server.service: Start request repeated too quickly.
Oct 16 16:49:17 lamp-xxxxx systemd[1]: mssql-server.service: Failed with result 'exit-code'.
Oct 16 16:49:17 lamp-xxxxx systemd[1]: Failed to start Microsoft SQL Server Database Engine.

I checked the logs at /var/opt/mssql/log/errorlog and found this .

2019-10-14 13:52:56.16 spid51      CImageHelper::Init () Failed load of 
symbol file with path = /binn/;/BINN - Not enough storage is available to 
process this command.

2019-10-14 13:52:56.17 spid51      CImageHelper::Init () Failed load of 
symbol file with path = /binn/;/BINN - Not enough storage is available to process this command.

2019-10-14 13:52:56.19 spid51      Error: 19099, Severity: 16, State: 1.
2019-10-14 13:52:56.19 spid51      Trace ID '1' was stopped because of an error. Cause: 0x80070005(Access is denied.). Restart the trace after correcting the problem.
2019-10-14 13:52:56.20 spid51      Error: 17053, Severity: 16, State: 1.
2019-10-14 13:52:56.20 spid51      FCB::MakePreviousWritesDurable: Operating system error (null) encountered.
2019-10-14 13:52:56.21 spid51      Error: 9001, Severity: 21, State: 1.
2019-10-14 13:52:56.21 spid51      The log for database 'master' is not available. Check the operating system error log for related error messages. Resolve any errors and restart the database.
2019-10-14 13:52:56.24 spid51      Error: 9001, Severity: 21, State: 16.

I'm not an expert and don't know the next move to make.

sql-server
ubuntu-18.04
asked on Stack Overflow Oct 17, 2019 by swaggerjacker • edited Oct 17, 2019 by swaggerjacker

1 Answer

0

So the reason for this error was getting was because I messed up with the file ownership.. running the following command fixed it for me too bad I spend so much time on this:

cd /var/opt

sudo chown mssql:mssql -R mssql

time to take that dump :-D.

answered on Stack Overflow Oct 17, 2019 by swaggerjacker • edited Oct 17, 2019 by swaggerjacker

User contributions licensed under CC BY-SA 3.0