CartoDBRestart - UCL-ShippingGroup/shipviz GitHub Wiki
If the server connection is reset for whatever reason and CartoDB needs to be re-run, the best solution is to run the following:
#Start CartoDB SQL API
cd ~/CartoDB-SQL-API/
node app.js development &
#Start tiling API
cd ~/Windshaft-cartodb/
node app.js development &
#Start redis server that allows connection to CartoDB SQL API and Windshaft
sudo service redis-server start
#or, if already started:
sudo service redis-server restart
#Go to CartoDB repo folder because the following commands need to be run from the same place where the Gemfile is
cd ~/cartodb
#Start rails server - This is the HTTP server that serves the CartoDB website pages
RAILS_ENV=development bundle exec rails server
#Start resque - This is the task importer to load data, etc.
RAILS_ENV=development bundle exec ./script/resque
#Wait until everything is running (just a few seconds normally) and run
firefox http://development.localhost.lan:3000/login &
It might be helpful also to restart postgresql at some point. For that:
sudo service postgresql restart
To check if a service is running, you can do:
ps aux | grep <name_of_service>
This will display a list of services with that name and a PID number (normally second column of results). You can force kill the process (last alternative if things like sudo service <name_of_service> restart
or sudo service <name_of_service> stop
don't work) with:
sudo kill -9 <PID number>