lmath56 / S3P

Semester 3 Personal Project
GNU General Public License v3.0
0 stars 0 forks source link

No response to cURL requests #2

Closed lmath56 closed 1 week ago

lmath56 commented 1 week ago

Description

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:

[wsl2]  
networkingMode=bridged
vmSwitch="External Network"

Returning this setting to the below resolved this issue:

[wsl2]
networkingMode=nat

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)