I have two computers: Ubuntu1 and Ubuntu2. Ubuntu1 runs MongoDB with database Sacred3. I want to run connect from U2 to U1 via ssh and store there my experiment results.
What I tried and failed:
1. I installed mongo DB, created sacred3, I have ssh key to it.
# network interfaces
Then I enabled port forwarding with
ssh -fN -i ~/.ssh/sacred_key-pair.pem -L 6666:localhost:27017 firstname.lastname@example.org // (with proper ip)
so, as I undertstand, if I connect to my localhost:6666 it will be forwarded to 106.969.696.969:27017
So after that, I'm runnig an experiment with Sacred framework:
python exp1.py -m localhost:6666:sacred3
and this should write experiment to remote DB, HOWEVER i I get:
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused
which is driving me mad. please help!