Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
5
-
Not Needed
Description
Some connection failures or authentication issues will break compass UI.
There are exceptions that are shown after the connection screen and causes the user to be stuck on a blank screen (disconnect won't work either).
To reproduce:
Add this line to /etc/hosts
127.0.0.1 mongodb-rs-1 mongodb-rs-2 mongodb-rs-3 |
Start this docker-compose configuration:
version: '2'
|
|
|
services:
|
"mongodb-rs-1":
|
image: "docker.io/bitnami/mongodb:4.4-debian-10"
|
environment:
|
MONGODB_ADVERTISED_HOSTNAME: "mongodb-rs-1"
|
MONGODB_REPLICA_SET_MODE: "primary"
|
MONGODB_ROOT_PASSWORD: "password123"
|
MONGODB_REPLICA_SET_KEY: "replicasetkey123"
|
MONGODB_PORT_NUMBER: "27001"
|
ports:
|
- "27001:27001"
|
|
|
"mongodb-rs-2":
|
image: "docker.io/bitnami/mongodb:4.4-debian-10"
|
environment:
|
MONGODB_ADVERTISED_HOSTNAME: "mongodb-rs-2"
|
MONGODB_REPLICA_SET_MODE: "secondary"
|
MONGODB_REPLICA_SET_KEY: "replicasetkey123"
|
MONGODB_PORT_NUMBER: "27002"
|
MONGODB_INITIAL_PRIMARY_HOST: "mongodb-rs-1"
|
MONGODB_INITIAL_PRIMARY_PORT_NUMBER: "27002"
|
MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD: "password123"
|
ports:
|
- "27002:27002"
|
|
|
"mongodb-rs-3":
|
image: "docker.io/bitnami/mongodb:4.4-debian-10"
|
environment:
|
MONGODB_ADVERTISED_HOSTNAME: "mongodb-rs-3"
|
MONGODB_REPLICA_SET_MODE: "secondary"
|
MONGODB_REPLICA_SET_KEY: "replicasetkey123"
|
MONGODB_PORT_NUMBER: "27003"
|
MONGODB_INITIAL_PRIMARY_HOST: "mongodb-rs-1"
|
MONGODB_INITIAL_PRIMARY_PORT_NUMBER: "27003"
|
MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD: "password123"
|
ports:
|
- "27003:27003"
|
Try to connect to:
mongodb://mongodb-rs-1:27001,mongodb-rs-1:27002,mongodb-rs-1:27003/db1?replicaSet=replicaset |
Since we are not passing credentials it will be able to connect but cause an issue immediately.
Like this it connects:
mongodb://root:password123@mongodb-rs-1:27001,mongodb-rs-2:27002,mongodb-rs-3:27003/db1?authSource=admin&replicaSet=replicaset&readPreference=primary&appname=MongoDB%20Compass&ssl=false |
Attachments
Issue Links
- related to
-
COMPASS-4608 Ensure we can load instance details before leaving the connect process
-
- Closed
-
-
COMPASS-5075 Add react error boundaries to `connect`
-
- Closed
-