Answers for "Address already in use - bind(2) for "127.0.0.1" port 3000 (Errno::EADDRINUSE)"

7

Address already in use - bind(2) for "127.0.0.1" port 3000 (Errno::EADDRINUSE)

lsof -wni tcp:3000 
kill -9 PID_number
Posted by: Guest on March-20-2020
0

address already in use ruby

#get list of process running on tcp:3000
lsof -wni tcp:3000

#you will get something like this
COMMAND  PID  USER    FD   TYPE DEVICE SIZE/OFF NODE NAME
ruby    2401 ubuntu   10u  IPv4 805038      0t0  TCP 127.0.0.1:3000 (LISTEN)
ruby    2401 ubuntu   15u  IPv6 805039      0t0  TCP [::1]:3000 (LISTEN)

#now kill process.
#by running this command ->$ kill -9 <PID>

kill -9 2401

#now try to start your server again.
Posted by: Guest on November-30-2020
0

Address already in use - bind(2) for "127.0.0.1" port 3000 (Errno::EADDRINUSE)

sudo fuser -k -n tcp port
Posted by: Guest on July-02-2021

Code answers related to "Address already in use - bind(2) for "127.0.0.1" port 3000 (Errno::EADDRINUSE)"

Browse Popular Code Answers by Language