medialab / hyphe

Websites crawler with built-in exploration and control web interface
http://hyphe.medialab.sciences-po.fr/demo/
GNU Affero General Public License v3.0
328 stars 59 forks source link

ERROR: Cannot connect to mongoDB, please check your server and the configuration in config/config.json #400

Closed Chatoranga closed 3 years ago

Chatoranga commented 3 years ago

docker hyphe Hello, I'm trying to install Hyphe. And this error message appears when I do the docker-compose up command. I read that the problem could be that I am doing this with windows. I tried to change the docker-compose file, with mongo:3.2 instead of mongo:3.0, but I still have the same error message : ERROR: Cannot connect to mongoDB, please check your server and the configuration in config/config.json

boogheta commented 3 years ago

Hi and thanks for the detailed log. It looks like MongoDB has issues with data from the previous version maybe, can you try to wipe out clean your install by removing existing containers, images and volumes related to your hyphe install? (you can find commands for this here https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes )

Chatoranga commented 3 years ago

Thank you for your answer ! I tried and it did not work.... docker hyphe 3

boogheta commented 3 years ago

I think it's still finding some mongo files in what he considers to be /data/db, which should be either in your hyphe directory under a mongo-data directory, either somewhere else if you set up the DATA_PATH variable in the .env file (in which case it should be under DATA_PATH/mongo-data). Can you check whether these exist and remove all files within before retrying to start Hyphe?

Chatoranga commented 3 years ago

I am not sure to understand what I am supposed to do. I'm not very familiar with Docker and all those things... What kind of files should I remove ? I don't have any file named "mongo-data" in my hyphe directory.

boogheta commented 3 years ago

And I am myself not very familiar with Windows unfortunately... For what I understand you need to remove the volume in which docker stored some mongo data already. You should be able to do so using things like this: docker volume ls This should list some volumes, including one or more named something like hyphe_mongo-data, note their exacts names, then run the following for each of them, by replacing NAME with the volume name: docker volume rm NAME

Chatoranga commented 3 years ago

Thank you so much ! I got to deal with another bug (the fronted port was already allocated), but it now seems to work !

boogheta commented 3 years ago

Great! I will close this issue then, but feel free to reopen if you encounter more issues!