microsoft / mssql-docker

Official Microsoft repository for SQL Server in Docker resources
MIT License
1.72k stars 759 forks source link

sql server container exits immediately in windows #451

Open Vinodh247 opened 5 years ago

Vinodh247 commented 5 years ago

I am trying to run SQL Server in windows 2016 server (OS Version: 10.0.14393 N/A Build 14393), i have tried multiple ways but the container jus exits after 5 seconds with error code (1). The logs are not clear and truncated, so i could not find anything. The worst part is i have been following up with MS support for almost a month but they say dont have the expertise to fix as this is a new technology, infact they referred this page to me to raise the issue and see if i am getting any help.

----The docker command i use docker run --name sqldkr1 -it -d -p 14112:1433 -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=' -e ExitOnError=N microsoft/mssql-server-windows-developer

I have used the "-e ExitOnError=N" switch as well but no use!

---The error logs VERBOSE: Starting SQL Server start-service : Service 'SQL Server (MSSQLSERVER) (MSSQLSERVER)' cannot be  started due to the following error: Cannot start service MSSQLSERVER on  computer '.'. At C:\start.ps1:27 char:1 + start-service MSSQLSERVER + ~~~~~  + CategoryInfo : OpenError: (System.ServiceProcess.ServiceControl   ler:ServiceController) [Start-Service], ServiceCommandException  + FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Comman   ds.StartServiceCommand  

rustedwizard commented 5 years ago

Having exact same issue here, the container stayed up for about 4 seconds then it exit!

forkazmoden commented 5 years ago

Hi,

I can run your docker command without error. Which version of docker are you using? Is that any particular reason to use windows containers?

rustedwizard commented 5 years ago

Hi,

I can run your docker command without error. Which version of docker are you using? Is that any particular reason to use windows containers?

I tried following command: docker run -d -p 1433:1433 -e sa_password= -e ACCEPT_EULA=Y microsoft/mssql-server-windows-developer above command runs without problem, container stays up without problem. However, when I change the image to microsoft/mssql-server-windows-developer:2017-latest, the container exit right after startup.

Vinodh247 commented 5 years ago

VERBOSE: Starting SQL Server start-service : Service 'SQL Server (MSSQLSERVER) (MSSQLSERVER)' cannot be started due to the following error: Cannot start service MSSQLSERVER on computer '.'. At C:\start.ps1:27 char:1

  • start-service MSSQLSERVER
  • 
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceControl
    ler:ServiceController) [Start-Service], ServiceCommandException
    + FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Comman
    ds.StartServiceCommand

It looks like it is trying to start the sql server services but getting stopped with error. The error logs are of not much use since they're truncated in the end. Does anyone have an idea how to view the error log without getting truncated? Only then we can come to conclusion as to which is hindering the sql service from starting.

Jdipietro3 commented 4 days ago

I am currently having this issue with SQL2019 development edition. Anyone figured out a way around this?