[LINUX] · Address already in use solution


When I started the server while learning PHP ... Since it came out as follows, I will summarize the remedy It may be difficult to write and read for the first time, but I hope it helps someone.

[[email protected]]$ php -S
Failed to listen on (reason: Address already in use)


I closed the putty terminal to turn off the PHP server, The server is in use and has an error at startup

Even after solving it, if you do this, it will be quite troublesome to type commands, so We strongly recommend that you turn off the server before closing it.


#Log in as root user to check the process
//If you have trouble logging in as root, please add sudo when you type the command.
[[email protected] ~]$ ps -a

#If you know the port, check below
[[email protected] ~]$ lsof -i:8000

#If you can't lsof, install below
[[email protected] ~]$ yum -y install lsof

#When you type the above command, the running server information including PID will be displayed as shown below.
php      10721  vagrant  3u   IPv4  20710     0t0    TCP (LISTEN)

#kill (PID number)Enter to end the process
[[email protected] ~]$ kill 10721

#It will start when you type the command again
[[email protected] ~]$ php -S 
PHP 5.6.40 Development Server started at Mon Jan  6 12:21:24 2020 Listening on

#If killing does not help, kill-9 (PID number)Please forcibly terminate with
[[email protected] ~]$ kill -9 10721 

in conclusion

This time I wrote about the kill </ font> command, but if you want to know more Click on the kill letter for more information If you have any suggestions, I would appreciate it if you could comment! !! Thank you for reading to the end

Recommended Posts

· Address already in use solution
Resolve the Address already in use error
Date of Address already in use error in Flask
Error in Flask OSError: [Errno 98] Address already in use
Use config.ini in Python
Use DataFrame in Java
Use Mean in DataFrame
Use Valgrind in Python
Use ujson in requests
Use profiler in Python
The day you killed the process (flask gave an error saying Address already in use)
Let's use def in python
Use "$ in" operator with mongo-go-driver
Use let expression in Python
Use Measurement Protocol in Python
Use callback function in Python
Use parameter store in Python
Use HTTP cache in Python
Use regular expressions in C
Use list-keyed dict in Python
[Python] Insert ":" in MAC address
Use regular expressions in Python
Use Spyder in Python IDE
Use Juman ++ in server mode
Use jinja2 template in excel file
Use optinal type-like in Go language
How to use classes in Theano
Mock in python-how to use mox
Use watchdog (watchmedo) in test-driven development
How to use SQLite in Python
Solution for ValueError in Keras imdb.load_data
How to use Mysql in python
Use Python in pyenv with NeoVim
How to use ChemSpider in Python
Hash method (open address method) in Python
How to use PubChem in Python
Use django-debug-toolbar in VirtualBox / Vagrant environment
Use OpenCV with Python 3 in Window