Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after running ./up.ps1 - Traefik - hnsCall failed in Win32 #143

Open
sc-pkamburov opened this issue Sep 27, 2023 · 0 comments
Open

Comments

@sc-pkamburov
Copy link

Getting the following error when running ./up.ps1:

✔ Container sxastarter-traefik-1     Created                                                                      0.7s
Error response from daemon: failed to create endpoint sxastarter-traefik-1 on network sxastarter_default: failed during hnsCallRawResponse: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20)

Root cause
There is a port conflict but docker incorrectly reports it as "the process cannot access the file ... " Docker issue

Explanation
Docker compose configuration uses ports 443 (SSL), 1433 (SQL) and 8983 (Solr) and any existing processes listening on those ports could cause the issue.  

How to check if port is in use (IIS Example): (PS) Get-Process -Id (Get-NetTCPConnection -LocalPort 443).OwningProcess
If command returns an error, then port is available; otherwise, it will return the processes which already uses the specified port.

Resolution
Due to the misleading message, investigating the issue can be time consuming. One of the easiest ways to prevent this is to include "Troubleshooting" section in main README and explain potential error and resolution (ensure that ports are not already in use). An even better solution is to add port checking in Up.ps1 and immediately detect potential issue and suggest resolutions.

IIS Stop example: (CMD) iisreset /stop
SOLR Service example (if installed as service): (CMD) sc stop [solr-service-name]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant