I'm trying to run the following docker command (latest Win10 Fall 2018 update, latest docker version 2.0):
docker run -d -p 1433:1433 -e sa_password=Test_123 -e ACCEPT_EULA=Y microsoft/mssql-server-windows-developer
But it fails wit the following error:
Error response from daemon: failed to create endpoint unruffled_wozniak on network nat: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20).
I've tried the following:
docker system prune -a
Nothing worked. Any suggestions?
Not sure how wise this is, but I checked the port wasn't in use with another app and still got the error.
This has fixed the issue a couple of times for me. In an Administrative PowerShell console, run the following:
Stop-Service docker
Stop-service hns
Start-service hns
Start-Service docker
docker network prune
Partially sourced from this post.
I had the same issue while trying to get PostgreSQL running with Docker. The problem was that the port was already tied up! This was because I had already had PostgreSQL running as a normal database in my OS.
My fix was finding the postgresql-x64-10
service in the Task Manager (under Services) and stopping the service.
the solution probably sounds obvious but I thought I'd mention it anyway
I was running into the same error, but stopping the SQL Server service running on my local machine on port 1433 wasn't an option, so I simply mapped a different port to the container. I replaced the port mapping parameters with the following:
-p 1434:1433
This will map your local machine's port 1434 to the container's port 1433. If your local machine's port 1434 is also in use, you'll have to find a port that is available for you.
Once you have that in place, if you want to get in with SSMS, you'll just need to tell it to connect over port 1434 by using a comma:localhost,1434
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With