feiyechen
feiyechen

Reputation: 111

Cannot run Azure SQL Edge using Docker in M1 Macbook

I use this command to run:

docker run -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=password' -p 1433:1433 --name sqledge -d mcr.microsoft.com/azure-sql-edge

The logs is below:

Azure SQL Edge will run as non-root by default.
This container is running as user mssql.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2140520.
2022/07/21 18:47:55 [launchpadd] INFO: Extensibility Log Header: <timestamp> <process> <sandboxId> <sessionId> <message>
2022/07/21 18:47:55 [launchpadd] WARNING: Failed to load /var/opt/mssql/mssql.conf ini file with error open /var/opt/mssql/mssql.conf: no such file or directory
2022/07/21 18:47:55 [launchpadd] INFO: DataDirectories =  /bin:/etc:/lib:/lib32:/lib64:/sbin:/usr/bin:/usr/include:/usr/lib:/usr/lib32:/usr/lib64:/usr/libexec/gcc:/usr/sbin:/usr/share:/var/lib:/opt/microsoft:/opt/mssql-extensibility:/opt/mssql/mlservices:/opt/mssql/lib/zulu-jre-11:/opt/mssql-tools
2022/07/21 18:47:55 Drop permitted effective capabilities.
2022/07/21 18:47:55 [launchpadd] INFO: Polybase remote hadoop bridge disabled
2022/07/21 18:47:55 [launchpadd] INFO: Launchpadd is connecting to mssql on localhost:1431
2022/07/21 18:47:55 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection.
2022/07/21 18:47:56 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection.
2022/07/21 18:47:57 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection.
The SQL Server End-User License Agreement (EULA) must be accepted before SQL
Server can start. The license terms for this product can be downloaded from
https://go.microsoft.com/fwlink/?linkid=2139274.

You can accept the EULA by specifying the --accept-eula command line option,
setting the ACCEPT_EULA environment variable, or using the mssql-conf tool.

I specified port 1433 but it runs on 1431?

Upvotes: 2

Views: 4643

Answers (1)

ErrySreez
ErrySreez

Reputation: 21

Does your log provide more information ?

I tried your command and couldn't run the container also.

It said:

ERROR: Unable to set system administrator password: Password validation failed. The password does not meet SQL Server password policy requirements because it is not complex enough. 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..

After changing de password to something more complex, it run successfully

Try something like this :

docker run -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=74euW1Njse3T0-a' -p 1433:1433 --name sqledge -d mcr.microsoft.com/azure-sql-edge

Docker container run successfully

Docker desktop error

I still got the port connection problem on 1431 but it doesn't affect the container itself

I use docker desktop on Windows 10

I also saw a couple of links which may be helpful : https://learn.microsoft.com/en-us/azure/azure-sql-edge/disconnected-deployment https://solveforum.com/forums/threads/solved-sql-server-on-m1-base-mac-using-docker.49833/

Upvotes: 2

Related Questions