Upgrade mongodb to 4.0

May be sometime back I had installed earlier version on MongoDB (showing 3.4.10). Now when I try to connect to Atlas, I’m getting following error -

MongoDB shell version v3.4.10
connecting to: mongodb://sandbox-shard-00-00-d16az.mongodb.net:27017,sandbox-shard-00-01-d16az.mongodb.net:27017,sandbox-shard-00-02-d16az.mongodb.net:27017/test?replicaSet=Sandbox-shard-0
2019-02-27T17:39:29.798+0530 I NETWORK  [thread1] Starting new replica set monitor for Sandbox-shard-0/sandbox-shard-00-00-d16az.mongodb.net:27017,sandbox-shard-00-01-d16az.mongodb.net:27017,sandbox-shard-00-02-d16az.mongodb.net:27017
2019-02-27T17:39:29.993+0530 E NETWORK  [ReplicaSetMonitor-TaskExecutor-0] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:30.107+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:30.262+0530 E NETWORK  [ReplicaSetMonitor-TaskExecutor-0] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:30.262+0530 W NETWORK  [ReplicaSetMonitor-TaskExecutor-0] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:30.262+0530 I NETWORK  [ReplicaSetMonitor-TaskExecutor-0] All nodes for set Sandbox-shard-0 are down. This has happened for 1 checks in a row.
2019-02-27T17:39:30.983+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:31.153+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:31.304+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:31.304+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:31.304+0530 I NETWORK  [thread1] All nodes for set Sandbox-shard-0 are down. This has happened for 2 checks in a row.
2019-02-27T17:39:31.955+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:32.108+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:32.252+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:32.253+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:32.253+0530 I NETWORK  [thread1] All nodes for set Sandbox-shard-0 are down. This has happened for 3 checks in a row.
2019-02-27T17:39:32.976+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:33.199+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:33.370+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:33.370+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:33.370+0530 I NETWORK  [thread1] All nodes for set Sandbox-shard-0 are down. This has happened for 4 checks in a row.
2019-02-27T17:39:34.066+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:34.235+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:34.391+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:34.392+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:34.392+0530 I NETWORK  [thread1] All nodes for set Sandbox-shard-0 are down. This has happened for 5 checks in a row.
2019-02-27T17:39:35.060+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:35.213+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:35.361+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:35.361+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:35.361+0530 I NETWORK  [thread1] All nodes for set Sandbox-shard-0 are down. This has happened for 6 checks in a row.
2019-02-27T17:39:36.047+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:36.400+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:36.644+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:36.644+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:36.644+0530 I NETWORK  [thread1] All nodes for set Sandbox-shard-0 are down. This has happened for 7 checks in a row.
2019-02-27T17:39:37.516+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:37.803+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:37.957+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:37.958+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:37.958+0530 I NETWORK  [thread1] All nodes for set Sandbox-shard-0 are down. This has happened for 8 checks in a row.
2019-02-27T17:39:38.626+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:38.810+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:38.976+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:38.976+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:38.976+0530 I NETWORK  [thread1] All nodes for set Sandbox-shard-0 are down. This has happened for 9 checks in a row.
2019-02-27T17:39:39.622+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:39.768+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:39.912+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:39.912+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:39.912+0530 I NETWORK  [thread1] All nodes for set Sandbox-shard-0 are down. This has happened for 10 checks in a row.
2019-02-27T17:39:40.567+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:40.768+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:40.921+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:40.922+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:40.922+0530 I NETWORK  [thread1] All nodes for set Sandbox-shard-0 are down. This has happened for 11 checks in a row.
2019-02-27T17:39:41.577+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:41.727+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:41.878+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:41.878+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:42.550+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:42.726+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:42.884+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:42.884+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:43.540+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:43.692+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:43.850+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:43.850+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:44.517+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:44.666+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:44.806+0530 E NETWORK  [thread1] SSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
2019-02-27T17:39:44.806+0530 W NETWORK  [thread1] No primary detected for set Sandbox-shard-0
2019-02-27T17:39:44.817+0530 E QUERY    [thread1] Error: connect failed to replica set Sandbox-shard-0/sandbox-shard-00-00-d16az.mongodb.net:27017,sandbox-shard-00-01-d16az.mongodb.net:27017,sandbox-shard-00-02-d16az.mongodb.net:27017 :
connect@src/mongo/shell/mongo.js:237:13
@(connect):1:6
exception: connect failed

Is this because my Atlas is running v4? Tried upgrading my local MongoDB version without any luck.

Yes. Please install latest version of MongoDB.

Kanika

Tried it, but it’s still not working. Downloaded both v3.6.10 and 4. Updated bash file to point to right download and can’t do source ~/.bash_profile, gives me error as -

/Users/aniruddhabarapatre1/.bash_profile:162: command not found: bind
\[\e]2;\u@\h\a[\[\e[37;44;1m\]\t\[\e[0m\]]\[\033[0;31m\] \[\e[32m\]\W\[\e[0m\]\n\[\e[0;31m\]\ 
[\e[0;49;34m\]//\[\033[0;31m\] ♥ \[\e[0m\]