[RUBY] Remedy for "A server is already running." Error when running rails s

When I try to start rails s, I get an error like this ...

$ rails s -b 0.0.0.0
=> Booting Puma
=> Rails 5.2.4.2 application starting in development 
=> Run `rails server -h` for more startup options
A server is already running. Check /Directory path/tmp/pids/server.pid.
Exiting

This is an error that occurs because the server is already running.

Kill the PID of server.pid

Execute the following command.

$ lsof -i:3000
COMMAND  PID    USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
ruby2.5 3033 vagrant   16u  IPv4  27499      0t0  TCP *:3000 (LISTEN)

Delete the above PID value with the following value.

$ kill -9 3033

This will solve it.

Recommended Posts

Remedy for "A server is already running." Error when running rails s
Quickly solve A server is already running (rails s process does not break)
A server is already running. Check / [WORKDIR] /tmp/pids/server.pid. Solution
Error in bundle install when running rails new
Remedy for command not found in rails s
What to do about "A server is already running ..." that happened without turning off the rails server in the terminal
Rails uninitialized constant A simple checklist for error resolution
[Ruby on Rails] I get a warning when running RSpec because gem'chromedriver-helper' is deprecated.
What to do when Address already in use is displayed after executing rails s
When the server does not start with rails s
Resolve CreateProcess error = 206 when running Java in a Windows environment
[Rails DM] Let's create a notification function when DM is sent!
An error occurs when codedeploy-agent is installed in Ubuntu Server 20.04
Show detailed error in Logger when running Java on server
Remedy for Selenium InvalidSelectorException error
Error when using rails capybara
I get a Ruby version error when I try to start Rails.
Investigation method when the CPU of the server running java is heavy
[Beginner] When rails s doesn't work
Create a fluentd server for testing
When you want Rails to disable a session for a specific controller only