Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ktor project localhost:8080 refuses to connect

I was working on a ktor project and everything was working fine. I started the server and it was working fine on port 8080 but now for some reason suddenly it stopped working. I killed the task and tried everything, I'm not sure what's wrong. I tried to reinstall IntelliJ Idea and I'm still facing the same issue. I tried using 127.0.0.1 , 0.0.0.0 , localhost but none of them work idk what to do. I've wasted like 2 hours on this thing. I've tried changing port, blocking firewall and antivirus.

like image 403
Zotako Avatar asked Nov 02 '25 11:11

Zotako


2 Answers

for Android Developers: if running the app on the android-studio-emulator, then replace http://localhost:8080/ with http://10.0.2.2:8080/

like image 59
Shanki Bansal Avatar answered Nov 04 '25 02:11

Shanki Bansal


change 127.0.0.1(localhost) to your private ip like 172.30.1.59 if you use wifi. if you use fixed ip then use it. i have same problem, but solve it with this. Nice! cmd -> ipconfig -> use ip address

like image 39
Lim혁 Avatar answered Nov 04 '25 01:11

Lim혁



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!