I was playing with strapi. Everything was working fine. Then Power cut, I hibernated my system then tried to load strapi again. Getting connection refused error in Edge and Firefox. I restarted system and same error. I installed a fresh new strapi and got same error. Tried to change the post from 1337 to 1338 and same error. Other nodejs apps are worknig fine with other ports. But strapi refusing connection.
curl -v http://localhost:1337 and 1338 giving proper result of strapi site. And it seems everything is okay.
But browser telling connection refused. Strange.
Tried 2-3 times with fresh strapi installs and different ports but same error.
Please help.
No. I am not getting any access. No admin, no root url access. Same error. Its strange and should not come because I was working on it before hibernation. I restarted the computer and tried with 2-3 new projects but same error. Where other apps working fine. Like DirectUs is working fine. So its not Nodejs install error I guess. But I am unable to identify the problem.
Just curious why is it port 1338 did you change it because default is 1337.
Also if you are using WSL then I’m going to guess that there lies the issue. It doesn’t proxy the ports it was a known issue in WSL earlier days (atleast when I used it few years ago).
So I would say if you are using WSL, I think you need to use the 0.0.0.0 as the IP in the project, not localhost. This is about a year old btw
I tried with different ports for cross check.
I don;t know how but the problem gone and Strapi working normally like nothing happened. Its very strange because I did nothing to fix the issue.
BTW, thank you for your time and quick help. I will check the links to understand the problem and solution for future encounter.
Most welcome.
I had experience with WSL first myself and the issues you been facing so that’s normally a issue to test.
But glad you got forward, normally a restart even works fine with WSL.