In initial testing it was found that cURL requests to the container from my computer would respond with the below:
> curl -X POST http://localhost:5000/chat -H "Content-Type: application/json" -d '{"prompt": "Tell me a joke."}'
> curl: (52) Empty reply from server
Nothing was logged within the container.
The same cURL request would work after connecting to the container with docker exec
Navigating to http://localhost:5000/chat in a browser would show:
Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
This is a Flask message meaning that some connectivity was possible.
Resolution
This issue was caused by a configuration change that I had made to WSL a few days prior.
This required a change to the C:\Users\<USER>\.wslconfig file, by adding:
Description
In initial testing it was found that cURL requests to the container from my computer would respond with the below:
Nothing was logged within the container.
The same cURL request would work after connecting to the container with
docker exec
Navigating to
http://localhost:5000/chat
in a browser would show:This is a Flask message meaning that some connectivity was possible.
Resolution
This issue was caused by a configuration change that I had made to WSL a few days prior. This required a change to the
C:\Users\<USER>\.wslconfig
file, by adding:Returning this setting to the below resolved this issue:
The original issue that required this change initially is no longer occurring - so is ok to close.
Links
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/E_ACCESSDENIED [WSL Networking Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0x80070424 [closed]](https://stackoverflow.com/questions/77498634/wsl-networking-error-code-wsl-service-createinstance-createvm-configurenetworki)