Port 1313 already in use (no its not)

Hello

I’m on a Windows 10 machine. I had my HUGO bind to 1313, then I restarted, poof, its gone. I can’t see it anymore.

If I run netstat -ano | findstr :1313 it doesn’t shows anything.

If I run netstat -ano alone, it doesn’t shows up.

The 192.168.1.26:1313 is not being used, apparently, but Hugo thinks it is.

I opened the Task Manager and it doesn’t shows Hugo is running.

Shut down the computer, restarted, did it all: still, it says the port is in use and what’s worse, I can’t bind HUGO to any other IP anymore because it keeps showing the same error, but with any other IP and port I enter.

It automatically tries to bind it

hugo server -D --bind 192.168.1.26 --baseURL http://192.168.1.26:1313
ERROR 2018/04/30 15:48:56 port 1313 already in use, attempting to use an available port

Builds the site, then shows this:

Web Server is available at http://192.168.1.26:54793/ (bind address 192.168.1.26)
Press Ctrl+C to stop
ERROR 2018/04/30 15:48:56 Error: listen tcp 192.168.1.26:54793: bind: The requested address is not valid in its context.

HELP

1 Like

I’ll provide an answer for my own question, for future reference and for the benefit of anyone else being haunted by this issue.

The problem seems to be that my VPN updated my connection, giving me a NEW IP address. A totally different IP address from the one I had when my Hugo Server was --bind

To solve the issue, simply check your CURRENT IP address (in my case, was 192.168.1.26 prior the VPN updating it to 192.168.1.30, so I was trying to bind Hugo to an IP address I no longer had).

I simply went from trying to --bind it to .26 to .30 and it worked ;-D

1 Like