brsynth / RetroPathRL

Reinforcement Learning based bioretrosynthesis tool
MIT License
48 stars 17 forks source link

captain@admin? #6

Closed ae-iced closed 4 years ago

ae-iced commented 4 years ago

This looks like a cool and flexible package. Thank you. I can get it to run without the DB fine, but when I turn it on, I get an "authentication failed" error, and the MongoDB service is telling me that a user "captain@admin" is trying to connect. Does this ring any bells? Is it my problem or may be is there a hard-coded user/domain pair in the code?

tduigou commented 4 years ago

Hi @ae-iced , for reference and helping people that might fall into the same issue, could you please put back your message describing the issue? Or maybe your issue is solved? Thanks.

The issue sounds related to the cache database. You can find detailed instructions on how to set up it here: https://github.com/brsynth/rp3_dcache. Once set up, the database service should be run in the background before running RetroPath RL. Credentials are needed for communication between RetroPath RL and the cache database. Simplest it to let these credentials as they are (already defined in both sides).

+ Thomas

ae-iced commented 4 years ago

Hi Thomas. My issue is resolved. I put my comment back to help others in case they run into the same thing.

Here's an update: I had installed MongoDB and pymongo from Conda, independently. So when the python code was trying to connect, the connection was being refused due to lack of authentication. Removing authentication from MongoDB didn't solve the issue either.

That's when I realized I had forgotten about the docker installation of MongoDB (which the documents of rp3_dcache correctly point to). When I installed docker, docker-compose and the rest according to the guide the whole isse was ... not resolved :)

I was getting an error (which I obviously can't see now) containing the following: "Cannot start service mongo: driver failed programming external connectivity on endpoint ..."

Which was complaining that TCP port 8081 was already in use. The docker YAML file mongo.yml at rp3_dcache/service/run/mongo.yml had a reference to port 8081. The conflict was because a python3 process was listening on this port already. I have an installation of JupyerHub on this server I was running RetroPath RL on, which I think was the issue.

In any case, instead of changing the Jupyter config, I changed the YAML file to use port 8082 instead of 8081. An also, changed the mongodb directory to one in my home dir (I'm running docer as a normal user, not root, and didn't want any possible permission isssues, may be not important, I don't know) for good measure. Saved this new YAML file with a different name, and ran the server with "docker-compose -f service/run/.yml up -d".

This resolved the conflict.

tduigou commented 4 years ago

Hi @ae-iced, great to hear your issue is solved, thank you for your feedback.