Dfx Deploy Not Working


I created a project with 4 canisters and updated the dfx.json file. However, when I try to deploy I get this error message:

“The replica returned an HTTP Error: Http Error: status 400 Bad Request, content type “text/plain; charset=utf-8”, content: Failed to connect to host: Connection refused (os error 111)”

Here are the steps that I have taken:
open a terminal: wsl, cd into project directory, npm install, dfx deploy (after start)
second terminal: wsl, cd into project directory, dfx start

I have updated to wsl 2 and have the correct version of everything. I even tried creating an entirely new project without changing anything about the canisters (just kept it to test and test_assets) but dfx deploy didn’t work in that case either.

Please let me know if there is anything I should change! Thank you so much.

Does your project live on the windows or linux file system?

I think it has to be on the linux file system for dfx and the replica to work properly.

1 Like