Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http://0.0.0.0:8080 is already in use. Trying another port. #332

Open
ghost opened this issue Dec 5, 2019 · 2 comments
Open

http://0.0.0.0:8080 is already in use. Trying another port. #332

ghost opened this issue Dec 5, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 5, 2019

Before submitting an issue, please, see https://github.com/tapio/live-server#troubleshooting

Issue description

When starting the server, it complains that http://0.0.0.0:8080 is already in use. As far as I can tell, this isn't true.

If I change the host to 127.0.0.1, the server starts correctly.

Here's how I'm calling live-server.

    import liveServer from 'live-server';
    
    const params = {
        port: 8080, // Set the server port. Defaults to 8080.
        host: '0.0.0.0', // Set the address to bind to. Defaults to 0.0.0.0 or process.env.IP.
        root: './fixtures/site', // Set root directory that's being served. Defaults to cwd.
        open: false, // When false, it won't load your browser by default.
        logLevel: 0, // 0 = errors only, 1 = some, 2 = lots
    };
    liveServer.start(params);

Software details

  • Command line used for launching live-server: cmder (conemu)
  • OS: Windows 10 Enterprise
  • Browser (if browser related): N/A
  • Node.js version: v8.11.4
  • live-server version: 1.2.1
@ghost
Copy link
Author

ghost commented Dec 5, 2019

Turns out there was a process using that port. I killed it and now it works fine.

First I used netstat to find the PID

netstat -ano | findstr :8080
TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       14320

Then I killed that process

taskkill /f /im 14320
SUCCESS: The process with PID 14320 has been terminated.

I'm not sure if this issue would be present for any Windows user or I have something specific to my setup going on...

@varvens
Copy link

varvens commented Jul 31, 2022

``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant