MongoDB installation issues.

I do have some issues with the setup and configuration of MongoDB. The initial XMPP setup on Ubuntu server 17.10 and MySQL was good (so I think) but I kept getting error “Failed to connect to 192.168.168.31:8082, in(checking socket for error after poll), reason: Connection refused” when we run the command mongo --host 127.0.0.1:27017. I would also appreciate if can suggest ways that I can reliably test the setup once I’m done.