3

I try to run a microsoft/mssql-server-windows-express container ->

docker run -d -p 1433:1433 -e sa_password=password -e ACCEPT_EULA=Y microsoft/mssql-server-windows-express

And I get next error ->

docker: Error response from daemon: failed to create endpoint hopeful_kowalevski on network nat: HNS failed with error : The process cannot access the file because it is being used by another process.

I think it is because sql server on my environment listens to 1433 port. Then I try to run container with other port eg 5000:1433 and container is run well.

Then I try to connect to db from container by sql management studio using "ip-address",5000. But I get Microsoft SQL Server, Error: 258.

enter image description here

7
  • are you sure there is no firewall stopping you from using port 1433 (or 5000) Commented Feb 15, 2019 at 13:38
  • Yeah, there is no firewall stopping. I also added a new firewall rule for 5000 port. But it didn't help( Commented Feb 15, 2019 at 14:07
  • You have to add that rule at both ends. Just checking to be sure Commented Feb 15, 2019 at 14:12
  • What do you mean about both ends? Should I add the rule at the host and the rule in the container? Commented Feb 18, 2019 at 9:00
  • The firewall on the machine that is running this docker must allow that port, and also the firewall on the machine where you are trying to connect with the database must allow this port Commented Feb 18, 2019 at 9:12

1 Answer 1

4

As far as I understood, the issue was with an incorrect password to DB. The password didn't match to database rules. The correct password should contain

at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols -> https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-2017&pivots=cs1-bash#pullandrun2017

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.