MongoDB connection failure

Hi, I have installed the latest Metabase onto an Ubuntu server (version 16.04.1) using the docker instructions from Metabase: $ docker run -d -p 3000:3000 --name metabase metabase/metabase

It has installed fine, however, I cannot connect to the MongoDB (version 3.2.10) which is on the same server – I get a wordy error message which ends “Exception opening socket caused by Java.net.ConnectionException:connection refused”

I have checked the database credentials and they are fine as I can connect through SlamData and MongoChef.
Also, the firewall on the server is not active

Any advice would be much appreciated

Thanks

Marie

I have this exact same issue. Same OS, same Mongo version, installed Metabase via docker.

The exact message for me is:

com.mongodb.MongoTimeoutException:
 Timed out after 3000 ms while waiting for a server that matches 
ReadPreferenceServerSelector{readPreference=primary}. Client view of 
cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, 
type=UNKNOWN, state=CONNECTING, 
exception={com.mongodb.MongoSocketOpenException: Exception opening 
socket}, caused by {java.net.ConnectException: Connection refused}}]