Starting m103-repl replica set

Hi there,

I have had some issues starting these config files. At the moment this is what I have running -

vagrant@m103:~$ ps -ef | grep [m]ongo
vagrant 27713 1 1 11:00 ? 00:00:56 mongod -config /shared/mongod-csrs-1.cfg
vagrant 27797 1 1 11:00 ? 00:00:56 mongod -config /shared/mongod-csrs-2.cfg
vagrant 27883 1 1 11:00 ? 00:00:56 mongod -config /shared/mongod-csrs-3.cfg
vagrant 28277 1 0 11:29 ? 00:00:04 mongos -config /shared/mongos.cfg

I have made the changes to the replica config files to include the following in each of the three files -

sharding:
clusterRole: shardsvr
storage:
wiredTiger:
engineConfig:
cacheSizeGB: .1

When I attempt to start any of the replica config files I am met with the following -

vagrant@m103:~$ mongod -config /shared/mongod-repl-1.cfg
Aborted (core dumped)

These are the last few lines from the log -

2020-01-10T11:53:52.965+0000 I ASIO [NetworkInterfaceASIO-ShardRegistry-0] Connecting to 192.168.103.100:26001
2020-01-10T11:53:52.973+0000 I ASIO [NetworkInterfaceASIO-ShardRegistry-0] Successfully connected to 192.168.103.100:26001, took 8ms (2 connections now open to 192.168.103.100:26001)
2020-01-10T11:54:32.926+0000 I ASIO [NetworkInterfaceASIO-ShardRegistry-0] Ending idle connection to host 192.168.103.100:26003 because the pool meets constraints; 1 connections to that host remain open
2020-01-10T11:54:40.554+0000 I SH_REFR [ConfigServerCatalogCacheLoader-4] Refresh for collection config.system.sessions took 2 ms and found the collection is not sharded
2020-01-10T11:54:40.554+0000 I CONTROL [LogicalSessionCacheRefresh] Sessions collection is not set up; waiting until next sessions refresh interval: Collection config.system.sessions is not sharded.
2020-01-10T11:54:42.938+0000 I ASIO [NetworkInterfaceASIO-ShardRegistry-0] Ending idle connection to host 192.168.103.100:26002 because the pool meets constraints; 1 connections to that host remain open
2020-01-10T11:54:43.059+0000 I ASIO [NetworkInterfaceASIO-ShardRegistry-0] Connecting to 192.168.103.100:26003
2020-01-10T11:54:43.064+0000 I ASIO [NetworkInterfaceASIO-ShardRegistry-0] Successfully connected to 192.168.103.100:26003, took 5ms (2 connections now open to 192.168.103.100:26003)
2020-01-10T11:54:52.974+0000 I ASIO [NetworkInterfaceASIO-ShardRegistry-0] Ending idle connection to host 192.168.103.100:26001 because the pool meets constraints; 1 connections to that host remain open

I have re-watched the video and read through the lecture notes and I am not clear if these replica files should be started at this point however when I follow the process from the video this also fails -

vagrant@m103:~$ mongo --port 27003 -u “m103-admin” -p “m103-pass” --authenticationDatabase “admin”
MongoDB shell version v3.6.16
connecting to: mongodb://127.0.0.1:27003/?authSource=admin&gssapiServiceName=mongodb
2020-01-10T11:54:25.905+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:27003, in(checking socket for error after poll), reason: Connection refused
2020-01-10T11:54:25.906+0000 E QUERY [thread1] Error: couldn’t connect to server 127.0.0.1:27003, connection attempt failed :
connect@src/mongo/shell/mongo.js:263:13
@(connect):1:6
exception: connect failed

Is anyone able to offer any advice?

Many thanks,
Nicole

I have reverted the replica set files back to the original and removed the following and this has allowed me to start the files -

sharding:
clusterRole: shardsvr
storage:
wiredTiger:
engineConfig:
cacheSizeGB: .1

I am trying to follow the steps from the lab and have added the three nodes and confirmed with the following -

image

I have attempted to connnect to one but I get a connection error -

vagrant@m103:~$ mongo --port 27003 -u “m103-admin” -p “m103-pass” --authenticationDatabase “admin”
MongoDB shell version v3.6.16
connecting to: mongodb://127.0.0.1:27003/?authSource=admin&gssapiServiceName=mongodb
2020-01-10T14:08:50.144+0000 E QUERY [thread1] Error: Authentication failed. :
connect@src/mongo/shell/mongo.js:263:13
@(connect):1:6
exception: connect failed

On checking the log I see that the use doesn’t exist - UserNotFound: Could not find user m103-admin@admin.

I am not sure how I have got this far as I haven’t had the problem before now with the user not existing. Can anyone point me in right direction please?

Many thanks,
Nicole

Please double check your replica config files
Maybe same dbpath used?
Please investigate why it is core dumping

“Failed to connect to 127.0.0.1:27003”
You cannot connect if mongod is not up

Thank you, I had an issue where the storage was listed more than once. I have since amended this. From what I can see mongod is up -

Best Regards,
Nicole

Have you created superuser on CSRS?

Yes, I thought I had done this but double checked and I am getting an error when trying to add indicating the user already exists -

2020-01-10T14:24:43.898+0000 E QUERY [thread1] Error: couldn’t add user: User “m103-admin@admin” already exists :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DB.prototype.createUser@src/mongo/shell/db.js:1437:15
@(shell):1:1

I have connected -

image

image

Best Regards,
Nicole

Hi,

I have since resolved the issue. There seemed to be an issue with the replica set. I went back and resolved this issue and ensured the secondary nodes were added and I was able to proceed from there.

Regards,
Nicole

Closing this thread as the issue has been resolved. Please feel free to create another thread or request the admin for opening this thread if you have similar issue.