Coder Social home page Coder Social logo

How to stop server? about jsonplaceholder HOT 7 CLOSED

typicode avatar typicode commented on May 16, 2024 1
How to stop server?

from jsonplaceholder.

Comments (7)

dmbdesignpdx avatar dmbdesignpdx commented on May 16, 2024 10

Not sure if this too late or if this is even the solution to the problem you are experiencing, but here it goes:

If this is the error you're getting or something similar:
Error: Address already in use - bind(2)

Type in the command line:
lsof -wni tcp:[port]
where [port] is the port number that's in conflict

If that port is in conflict, there should be list of one or more uses. To stop them, type
kill -9 [PID]
where [PID] is the process ID indicated by the column title "PID".

That should do it.

from jsonplaceholder.

typicode avatar typicode commented on May 16, 2024 1

Actually ctrl-C should be enough. But if it says Address in use, you already have a process listening on port 3000.

It may be another instance of jsonplaceholder or some other development server (since port 3000 is quite common).

You should try to find if there's already a running jsonplaceholder server and kill it. Or if you have a server listening on port 3000, start jsonplaceholder on another port.

from jsonplaceholder.

vko-online avatar vko-online commented on May 16, 2024 1

I attached it to gulp serve, gulp port 3000, json-server port 9000 but it doesnt increase port itself as gulp does, is there any command to shutdown server by script? So when i press Ctrl+C, json-server will shutdown with gulp serve

from jsonplaceholder.

gunjot-mansa avatar gunjot-mansa commented on May 16, 2024 1

Hi @vko-online ,

Did you get any answer for this?

from jsonplaceholder.

typicode avatar typicode commented on May 16, 2024

What's your OS?

from jsonplaceholder.

Ashish0019 avatar Ashish0019 commented on May 16, 2024

I faced the same issue i forgot toctrl+c, before closing the terminal, now it's giving EADDRINUSE for the same port.
how to stop this server manually
some alternative for ps aux | grep gulp in mac OS

Don't wanna change port or restart the system

from jsonplaceholder.

typicode avatar typicode commented on May 16, 2024

Thanks for the answers @Ashish0019 and @dmbdesignpdx, didn't know about lsof -wni tcp:[port] 👍 :)

from jsonplaceholder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.