[js_test:addshard1] uncaught exception: Error: command failed: {
[js_test:addshard1] "ok" : 0,
[js_test:addshard1] "errmsg" : "Can't use localhost as a shard since all shards need to communicate. Either use all shards and configdbs in localhost or all in actual IPs. host: localhost:20022 isLocalHost:1",
[js_test:addshard1] "code" : 72,
[js_test:addshard1] "codeName" : "InvalidOptions",
[js_test:addshard1] "$clusterTime" : {
[js_test:addshard1] "clusterTime" : Timestamp(1655995058, 41),
[js_test:addshard1] "signature" : {
[js_test:addshard1] "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
[js_test:addshard1] "keyId" : NumberLong(0)
[js_test:addshard1] }
[js_test:addshard1] },
[js_test:addshard1] "operationTime" : Timestamp(1655995058, 41)
[js_test:addshard1] } with original command request: {
[js_test:addshard1] "addShard" : "addshard1-1/localhost:20022",
[js_test:addshard1] "name" : "myShard",
[js_test:addshard1] "maxSize" : 1024,
[js_test:addshard1] "lsid" : {
[js_test:addshard1] "id" : UUID("ae16c8a6-40e6-43e4-923f-690b30f274e7")
[js_test:addshard1] },
[js_test:addshard1] "$clusterTime" : {
[js_test:addshard1] "clusterTime" : Timestamp(1655995058, 41),
[js_test:addshard1] "signature" : {
[js_test:addshard1] "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
[js_test:addshard1] "keyId" : NumberLong(0)
[js_test:addshard1] }
[js_test:addshard1] }
[js_test:addshard1] } on connection: connection to ip-10-122-2-167:20021 :
[js_test:addshard1] _getErrorWithCode@src/mongo/shell/utils.js:24:13
[js_test:addshard1] doassert@src/mongo/shell/assert.js:18:14
[js_test:addshard1] _assertCommandWorked@src/mongo/shell/assert.js:760:25
[js_test:addshard1] assert.commandWorked@src/mongo/shell/assert.js:852:16
[js_test:addshard1] @jstests/sharding/addshard1.js:25:8
[js_test:addshard1] @jstests/sharding/addshard1.js:84:3
[js_test:addshard1] failed to load: jstests/sharding/addshard1.js