TCPServer Error: Address already in use - bind(2)
Type this in your terminal to find out the PID of the process that's using the 3000 port:
$ lsof -wni tcp:3000
Then, use the number in the PID column to kill the process:
$ kill -9 PID
Rails: Address already in use - bind(2) (Errno::EADDRINUSE)
You need to use kill -9 59780
with 59780
replaced with found PID number (use lsof -wni tcp:3000
to see which process used 3000
port and get the process PID).
Or you can just modify your puma config change the tcp port tcp://127.0.0.1:3000
from 3000
to 9292
or other port that not been used.
Or you can start your rails app by using:
bundle exec puma -C config/puma.rb -b tcp://127.0.0.1:3001
jekyll 2.2.0 | Error: Address already in use - bind(2)
Try to see which process is using that port, kill it and run again or try running jekyll on different port.
Address already in use - bind(2) when starting server in Cloud9 IDE
You're killing it with the wrong way.
You need to use:
kill -9 18415
9 - signal 'kill'
18415 - process id
Also you can kill all ruby processes like this:
killall -9 ruby
But use it only when you know what you're doing.
Bind failed: Address already in use
The error usually means that the port you are trying to open is being already used by another application. Try using netstat to see which ports are open and then use an available port.
Also check if you are binding to the right ip address (I am assuming it would be localhost)
Related Topics
How to Get the Current Time as 13-Digit Integer in Ruby
How Does Shovel (<<) Operator Work in Ruby Hashes
Why Does My Ruby 'Ri' Tool Not Return Results in Command Prompt
What Does 'Def Self.Function' Name Mean
How to Configure Capistrano to Use My Rvm Version of Ruby
Rails 3. How to Display Two Decimal Places in Edit Form
Activerecord - Querying Polymorphic Associations
Differencebetween 'After_Create' and 'After_Save' and When to Use Which
Gem.Source_Index Is Deprecated, Use Specification. Should I Re-Install Gem or Rails
Get the Value of an Instance Variable Given Its Name
How to Make Instance Variables Private in Ruby
How to Print Out the Contents of an Object in Rails for Easy Debugging
Using Instance Variables in Class Methods - Ruby
Dividing Elements of a Ruby Array into an Exact Number of (Nearly) Equal-Sized Sub-Arrays