ysl208 / iRoPro

iRoPro on Baxter
MIT License
3 stars 0 forks source link

Could not connect to mongo server localhost:27017 #50

Closed ysl208 closed 3 years ago

ysl208 commented 3 years ago

When running editor.launch I got the following error:

[ INFO] [1606131900.664385299]: Waiting For connections on 0.0.0.0:9998
[ERROR] [1606131930.927740, 2812.475000]: Could not connect to mongo server localhost:27017
[ERROR] [1606131930.930572, 2812.478000]: Make sure mongod is launched on your specified host/port                                                                                      
Traceback (most recent call last):                                                          
  File "/opt/ros/melodic/lib/mongodb_store/message_store_node.py", line 316, in <module>
    store = MessageStore()
  File "/opt/ros/melodic/lib/mongodb_store/message_store_node.py", line 48, in __init__
    raise Exception("No Daemon?")
Exception: No Daemon?
================================================================================REQUIRED process [message_store-1] has died!                                                            
process has died [pid 10478, exit code 1, cmd /opt/ros/melodic/lib/mongodb_store/message_store_node.py __name:=message_store __log:=/home/lab_cheem/.ros/log/cdf98b54-2d7a-11eb-bc53-7085c2f2f536/message_store-1.log].                                                             
log file: /home/lab_cheem/.ros/log/cdf98b54-2d7a-11eb-bc53-7085c2f2f536/message_store-1*.log
Initiating shutdown!                                                                        
================================================================================            
[rapid_pbd_video_server-3] killing on exit
[rapid_pbd/editor_node-2] killing on exit
[message_store-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
ysl208 commented 3 years ago

This means that mongoDB was not running. Make sure to follow the development setup instructions to install mongodb. To start the service run

sudo service mongodb start

To check if mongodb is running: lsof -i:27017

If mongodb error shows up (when msg types have changed), might need to clear the database:

$ mongo
show dbs
use rapid_pbd
show collections
db.programs.remove({}) or db.programs.drop()
quit() or exit