microsoft / sql-server-samples

Azure Data SQL Samples - Official Microsoft GitHub Repository containing code samples for SQL Server, Azure SQL, Azure Synapse, and Azure SQL Edge
Other
9.99k stars 8.86k forks source link

mssql-server-linux setup failed: error code 1 macOS (Docker) #166

Open geooot opened 7 years ago

geooot commented 7 years ago

When trying to startup sql-server I get this error. Is the log only contained in the docker container?

$ docker run -p 1433:1433 -t  -e SA_PASSWORD='<password>' -e ACCEPT_EULA=Y microsoft/mssql-server-linux
Configuring Microsoft(R) SQL Server(R)...
Microsoft(R) SQL Server(R) setup failed with error code 1. Please check the setup log in /var/opt/mssql/log for more information.

But while in the container... The mssql folder is not there!

root@bdd24ed25e8b:/var/opt# ls
root@bdd24ed25e8b:/var/opt# 
twright-msft commented 7 years ago

@geooot - It's most likely that your password is not complex enough. Can you please double check that?

mheath commented 7 years ago

Why does my password have to be complex if I'm just running a Docker image for dev? Is there a way to disable that?

twright-msft commented 7 years ago

@mheath Because security. :)

Is this still an issue for anybody or can we close this issue out?

sslgeorge commented 7 years ago

@twright-msft I still have same issue

twright-msft commented 7 years ago

@sslgeorge - Do you have the exact same symptoms as the original poster? i.e. you docker run the container with -t, see a single line of output (Configuring ...) and then get the same error message and if you look inside of the container you dont see a /var/opt/mssql directory? Or do you see something different?

iamthiago commented 7 years ago

I was testing with the following password:

sqlserver

After reading this thread and changing for:

sqlserver123! (feels more complex)

it worked like a charm :)

kwent commented 7 years ago

I'm still seeing same issue event with strong password as shown in the documentation (macOS)

docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d microsoft/mssql-server-linux
➔ docker events
2017-08-21T20:42:49.038000739-07:00 container create a5038b6051fbbc545ca41b906ee57212da5fafc9ece4512c55b12ad50ced8335 (com.microsoft.product=Microsoft SQL Server, com.microsoft.version=14.0.900.75, image=microsoft/mssql-server-linux, name=festive_benz, vendor=Microsoft)
2017-08-21T20:42:49.159034766-07:00 network connect 3d543d0faf75b167d62501d4af5e825ee89735c5f1cf586804cf3e4af7cefa7e (container=a5038b6051fbbc545ca41b906ee57212da5fafc9ece4512c55b12ad50ced8335, name=bridge, type=bridge)
2017-08-21T20:42:49.561509762-07:00 container start a5038b6051fbbc545ca41b906ee57212da5fafc9ece4512c55b12ad50ced8335 (com.microsoft.product=Microsoft SQL Server, com.microsoft.version=14.0.900.75, image=microsoft/mssql-server-linux, name=festive_benz, vendor=Microsoft)
2017-08-21T20:42:49.762181604-07:00 container die a5038b6051fbbc545ca41b906ee57212da5fafc9ece4512c55b12ad50ced8335 (com.microsoft.product=Microsoft SQL Server, com.microsoft.version=14.0.900.75, exitCode=1, image=microsoft/mssql-server-linux, name=festive_benz, vendor=Microsoft)
2017-08-21T20:42:50.017016736-07:00 network disconnect 3d543d0faf75b167d62501d4af5e825ee89735c5f1cf586804cf3e4af7cefa7e (container=a5038b6051fbbc545ca41b906ee57212da5fafc9ece4512c55b12ad50ced8335, name=bridge, type=bridge)

Edit

In my case the issue was cause i was not allocating enough memory as the doc mentioned:

At least 3.25 GB of RAM. Make sure to assign enough memory to the Docker VM if you're running on Docker for Mac or Windows.

Setting the memory to 4 Gb fixed it.

screen shot 2017-08-21 at 8 46 48 pm