Commands from course not working

MongoDB Enterprise Cluster0-shard-0:PRIMARY> use video
switched to db video
MongoDB Enterprise Cluster0-shard-0:PRIMARY> db.movies.find().pretty()
2019-09-20T12:42:08.274+0300 I NETWORK [js] DBClientConnection failed to receive message from - NetworkTimeout: Socket operation timed out
Error: error doing query: failed: network error while attempting to run command ‘find’ on host ‘
2019-09-20T12:42:08.277+0300 I NETWORK [js] Marking host as failed :: caused by :: Location40657: Last known master host cannot be reached

Hi @Oleg_81749,

It seems that your connection timed out. It happens generally when you do not use the mongo shell for some time. I would recommend you to close the current connection and try to connect again and it should work fine.

If the issue persists please feel free to get back to us.

Happy Learning :slight_smile:

Shubham Ranjan
Curriculum Support Engineer

What I usually do that works for me when I have timed it is I just press :arrow_up: on my keyboard and then press enter to re-run the query. That seems to work for a time out! :stuck_out_tongue_closed_eyes:

Usually happens when I’ve taken too long to get coffee!