question

EricY-9468 avatar image
0 Votes"
EricY-9468 asked viknesh-2998 published

Azure SQL Edge on Mac M1 using Docker

I tried to run Azure SQL Edge using Docker on M1 Mac, but it keeps on saying "Failed to load /var/opt/mssql/mssql.conf ini file with error open /var/opt/mssql/mssql.conf: no such file or directory" and "Failed to connect to SQL because: dial tcp 127.0.0.1:1431"

I've manually created the folder path and mssql.conf file based on Microsoft's tech doc, but that error still shows up and cannot load Sql Edge. Any suggestion on how I can fix these issues? Thanks

azure-sqldatabase-edge
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @EricY-9468 Thank you for posting your question on Microsoft Q&A.
Could you please share the below details?

Docker logs

The exact error message, when trying to connect

What are you using to connect?

(Note: Please remove sensitive information before sharing the above information on public forums)

Regards,
Oury

0 Votes 0 ·

Here is what I tried to run thru the Terminal:

docker run --cap-add SYS_PTRACE -e ‘ACCEPT_EULA=1’ -e ‘MSSQL_SA_PASSWORD=SomePassword@01’ -p 1433:1431 --name azuresqledge -d mcr.microsoft.com/azure-sql-edge

And below is the log for the container. I created the mssql.conf within /var/opt/mssql/, but still the same error. Using Big Sur virtualization.framework instead hypervisor doesn't help either. My Docker Desktop is version 4.3.0 (71786) ARM version. And I'm on Mac M1 Max.

Thanks



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.

2021/12/11 05:29:53 [launchpadd] INFO: Extensibility Log Header: <timestamp> <process> <sandboxId> <sessionId> <message>

2021/12/11 05:29:53 [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

2021/12/11 05:29:53 [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


continue to next message...

0 Votes 0 ·

Continue from previous message.....


2021/12/11 05:29:53 Drop permitted effective capabilities.

2021/12/11 05:29:53 [launchpadd] INFO: Polybase remote hadoop bridge disabled

2021/12/11 05:29:53 [launchpadd] INFO: Launchpadd is connecting to mssql on localhost:1431

2021/12/11 05:29:53 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection.

2021/12/11 05:29:54 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection.

2021/12/11 05:29:55 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection.

2021/12/11 05:29:56 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection.

2021/12/11 05:29:57 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection.

0 Votes 0 ·

Hi, @EricY-9468 Thanks for providing the logs.
I noticed that you have mentioned the wrong port 1431 it should be 1433 can you retry with 1433 I have tried from my end with the below steps and it worked fine.

Step1: Copy and paste the below command. Here is the link
docker pull mcr.microsoft.com/azure-sql-edge in terminal on mac
156926-image.png
Step2: Go to Docker settings and increase the memory to 4GB.
Step3: Run the below command in terminal on mac
docker run -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=bigStrongPwd' -p 1433:1433 --name sqledge -d mcr.microsoft.com/azure-sql-edge
157024-image.png

you can also check the SQL image running in docker
156879-image.png
Please let us know if you find any issues or need more information.

Regards
Geetha



0 Votes 0 ·
image.png (207.6 KiB)
image.png (110.4 KiB)
image.png (133.2 KiB)
Show more comments
GeethaThatipatri-MSFT avatar image
0 Votes"
GeethaThatipatri-MSFT answered GeethaThatipatri-MSFT commented

Hi @ EricY-9468 Can you try with the command I provided
docker run -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=bigStrongPwd' -p 1433:1433 --name sqledge -d mcr.microsoft.com/azure-sql-edge
,
Regards
Geetha

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @GeethaThatipatri-MSFT ,

Initially when I tried to use your command, it didn't work. Then a Docker update prompt popped up for Log4j security issue. After the update, everything is working now! Although based on the log it still failed to connect to port 1431 at the beginning, it continues the container initialization and bring Azure SQL Edge up and running. Thanks so much for the helps.

Regards
Eric

157254-docker-issue-03.png


0 Votes 0 ·

@EricY-9468 Thanks for sharing the information, Good to hear it worked for you, please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

Regards
Geetha

0 Votes 0 ·

@EricY-9468 Thank you for visiting Microsoft QA forums! Have a great day!

Regards
Geetha

0 Votes 0 ·
aynurh-1580 avatar image
1 Vote"
aynurh-1580 answered viknesh-2998 published

To me, the issue was the typo of apostrophe.

your command:

 docker run --cap-add SYS_PTRACE -e ‘ACCEPT_EULA=1’ -e ‘MSSQL_SA_PASSWORD=SomePassword@01’ -p 1433:1431 --name azuresqledge -d mcr.microsoft.com/azure-sql-edge

try this:

 docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=SomePassword@01' -p 1433:1431 --name azuresqledge -d mcr.microsoft.com/azure-sql-edge

they look like same but the apostrophes are different.

Regards,

Aynur

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Great, This resolved my issue. It is just an issue with the quotes. I deleted the container & ran with corrected quotes it connected like charm.

0 Votes 0 ·