ECONNREFUSED issue in Local Development

Hi, I’m frequently encountering the error “connect ECONNREFUSED 127.0.0.1:3000” in my local development environment. The setup was working fine yesterday, but when I start the server today using npm start, the issue arises. Interestingly, if I revert all the changes I’ve made, the server sometimes starts working again. Can someone assist me in resolving this? This is impacting my local development progress.


Thank you,
Bharathan.

Hi there, are you working on a github codespace machine ?

Hi Abdul, I have forked and cloned the GitHub repository to my local machine, and I’m working on it locally. The issue occurs when I start the server using npm start. I’m not using a GitHub Codespace or any cloud-based development environment; this is purely a local setup.

usually when that error occurs you have something listenting to port 3000 that’s why, maybe it is a previous run of Activepieces, if you are on linux, you can list the process on port 3000 and kill it.

I ran the command on Linux to check the availability of port 3000, and it is confirmed that port 3000 is free. However, despite the port being available, we are still encountering the error.

Check Port 3000 is in USE

If you restart your machine, does it work ? or do you still see that error ?
Also are you working on Windows and use WSL or plain Linux ?

Previously, I worked on a Linux VM and faced the same issue, so I switched to Windows and started using WSL. However, the issue persists on both setups. I’ve tried restarting the machine and running npm install followed by npm start, but the problem still persists.

Can you try serving any node project on port 3000 ? like just a simple http server, just to see if the issue still presists.

I created a simple HTTP server, and the connection refused issue did not occur for this.


Screenshot of port 3000 is running

Hi Abdul, just to update you, after creating the simple HTTP server, I terminated its process using the command kill ProcessId. The main server is now up and running without the ECONNREFUSED issue.

1 Like

I will keep this in mind, it is annoying in deed, it is just different from every machine to the other and I can’t really pinpoint the cause.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.