mssql-docker icon indicating copy to clipboard operation
mssql-docker copied to clipboard

Sql Server for Linux Docker Container stop frequently

Open fadykamil opened this issue 6 years ago • 9 comments

I don't found any logs that can demonstrate the issue.

I installed sqlserver container using the following command:

docker container run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=#####' -v path_to_data_dir:/var/opt/mssql --network nat -p 1401:1433 --name #### -d --restart always microsoft/mssql-server-linux:2017-latest

fadykamil avatar Jul 08 '18 09:07 fadykamil

Try use 'SA_PASSWORD' option instead of 'MSSQL_SA_PASSWORD' option and note The password must be at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols..

nhnam6 avatar Jul 09 '18 09:07 nhnam6

@nhnam6 I already set the password with this rules. My problem is the container is working for 2 or 3 weeks for example and suddenly it starts to crash without any error log. This problem can be eliminated if I make a reboot for the linux machine, however this is not an optimum solution in production environment.

fadykamil avatar Jul 09 '18 09:07 fadykamil

@fadykamil Im got the same problem. Try "docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=12345qwerASDF' -p 1433:1433 -it microsoft/mssql-server-linux:2017-latest". You can use -d option instead of -it option. It work for me

nhnam6 avatar Jul 09 '18 09:07 nhnam6

Thanks for your instant response. I will give it a try.

fadykamil avatar Jul 09 '18 09:07 fadykamil

docker logs "container_name" is helpful in this situation. SQL Server on Linux will write to stdout and perhaps will report your error. You can access this output with the docker logs command.

nocentino avatar Jul 25 '18 20:07 nocentino

@nocentino Unfortunately, when I exuecuted docker logs command, no errors are logged. So, I went to the trace files of the Sql Server container and opened it using sql server profiler and also no errors are logged.

Do you have any additional troubleshooting steps to fix this issue?

fadykamil avatar Jul 25 '18 22:07 fadykamil


2020-07-27 08:46:11.50 spid12s [3]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1.

2020-07-27 08:46:11.51 spid12s Starting up database 'model'.

2020-07-27 08:46:11.84 spid25s Parallel redo is started for database 'mydb' with worker pool size [3].

2020-07-27 08:46:11.90 spid29s Parallel redo is started for database 'asa' with worker pool size [3].

2020-07-27 08:46:11.92 spid12s Clearing tempdb database.

2020-07-27 08:46:12.03 spid27s Parallel redo is shutdown for database 'mydb' with worker pool size [3].

2020-07-27 08:46:12.06 spid29s Parallel redo is shutdown for database 'asa' with worker pool size [3].

2020-07-27 08:46:12.31 spid12s [2]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1.

2020-07-27 08:46:12.32 spid12s Starting up database 'tempdb'.

2020-07-27 08:46:13.27 spid12s The tempdb database has 6 data file(s).

2020-07-27 08:46:13.28 spid25s The Service Broker endpoint is in disabled or stopped state.

2020-07-27 08:46:13.29 spid25s The Database Mirroring endpoint is in disabled or stopped state.

2020-07-27 08:46:13.30 spid25s Service Broker manager has started.

2020-07-27 08:46:13.31 spid10s Recovery is complete. This is an informational message only. No user action is required.

2020-07-27 08:46:44.92 Logon Error: 18456, Severity: 14, State: 38.

2020-07-27 08:46:44.92 Logon Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'mydb'. [CLIENT: 172.18.0.1]

2020-07-27 08:46:47.21 Logon Error: 18456, Severity: 14, State: 38.

2020-07-27 08:46:47.21 Logon Login failed for user 'sa'. Reason: Failed to open the explicitly sp

azizkhani avatar Jul 27 '20 08:07 azizkhani

I am facing the same issue on my VPS Ubuntu 18.04 64bits ...

otaviosgoncalves avatar Dec 02 '20 23:12 otaviosgoncalves

I am facing the same situation, however just noticed something odd. I cannot find the image I used in docker hub. The image name is mcr.microsoft.com/mssql/server.

guimar86 avatar Mar 06 '22 22:03 guimar86