[Bug 227716] databases/mongodb36: createUser fails
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Apr 23 12:47:27 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227716
Bug ID: 227716
Summary: databases/mongodb36: createUser fails
Product: Ports & Packages
Version: Latest
Hardware: amd64
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: ports-bugs at FreeBSD.org
Reporter: vermaden at interia.pl
CC: dev at dudu.ro
Flags: maintainer-feedback?(dev at dudu.ro)
CC: dev at dudu.ro
Created attachment 192746
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=192746&action=edit
truss output
Hi,
I am trying to create 5 node replica set (4 data nodes + 1 arbiter).
FreeBSD 11.1-RELEASE.
Nodes have connectivity, I am able to form the cluster but it fails when I want
to add user.
Truss output attached.
root at mongo0:~ # mongo
MongoDB shell version v3.6.3
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.6.3
Server has startup warnings:
2018-04-23T16:06:53.312+0200 I CONTROL [initandlisten]
2018-04-23T16:06:53.312+0200 I CONTROL [initandlisten] ** WARNING: Access
control is not enabled for the database.
2018-04-23T16:06:53.312+0200 I CONTROL [initandlisten] ** Read and
write access to data and configuration is unrestricted.
2018-04-23T16:06:53.312+0200 I CONTROL [initandlisten]
> use admin
switched to db admin
> rs.initiate(
... {
... _id : "replica0",
... members: [
... { _id: 0, host: "mongo0:27017" },
... { _id: 1, host: "mongo1:27017" },
... { _id: 2, host: "mongo2:27017" },
... { _id: 3, host: "mongo3:27017" }
... ]
... }
... )
{
"ok" : 1,
"operationTime" : Timestamp(1524492742, 1),
"$clusterTime" : {
"clusterTime" : Timestamp(1524492742, 1),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
}
}
replica0:SECONDARY>
replica0:SECONDARY>
replica0:SECONDARY>
replica0:SECONDARY>
replica0:SECONDARY>
replica0:SECONDARY>
replica0:SECONDARY>
replica0:SECONDARY>
replica0:PRIMARY>
replica0:PRIMARY>
replica0:PRIMARY>
replica0:PRIMARY>
replica0:PRIMARY> db.createUser(
... {
... user: "admin",
... pwd: "ADMIN-PASSWORD",
... roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
... }
... )
2018-04-23T16:12:56.169+0200 E QUERY [thread1] Error: error doing query:
failed: network error while attempting to run command 'createUser' on host
'127.0.0.1:27017' :
DB.prototype.runCommand at src/mongo/shell/db.js:168:1
DB.prototype.createUser at src/mongo/shell/db.js:1420:19
@(shell):1:1
2018-04-23T16:12:56.177+0200 I NETWORK [thread1] trying reconnect to
127.0.0.1:27017 (127.0.0.1) failed
2018-04-23T16:12:56.178+0200 W NETWORK [thread1] Failed to connect to
127.0.0.1:27017, in(connect), reason: Connection refused
2018-04-23T16:12:56.178+0200 I NETWORK [thread1] reconnect 127.0.0.1:27017
(127.0.0.1) failed failed
> use admin
switched to db admin
> db.createUser(
... {
... user: "admin",
... pwd: "ADMIN-PASSWORD",
... roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
... }
... )
2018-04-23T16:13:23.675+0200 I NETWORK [thread1] trying reconnect to
127.0.0.1:27017 (127.0.0.1) failed
2018-04-23T16:13:23.676+0200 W NETWORK [thread1] Failed to connect to
127.0.0.1:27017, in(connect), reason: Connection refused
2018-04-23T16:13:23.676+0200 I NETWORK [thread1] reconnect 127.0.0.1:27017
(127.0.0.1) failed failed
2018-04-23T16:13:23.677+0200 E QUERY [thread1] Error: socket exception
[CONNECT_ERROR] for couldn't connect to server 127.0.0.1:27017, connection
attempt failed :
runClientFunctionWithRetries at src/mongo/shell/session.js:346:31
runCommand at src/mongo/shell/session.js:412:25
DB.prototype._runCommandImpl at src/mongo/shell/db.js:145:16
DB.prototype.runCommand at src/mongo/shell/db.js:161:20
DB.prototype.createUser at src/mongo/shell/db.js:1420:19
@(shell):1:1
>
>
bye
root at mongo0:~ # mongo
MongoDB shell version v3.6.3
connecting to: mongodb://127.0.0.1:27017
2018-04-23T16:13:27.198+0200 W NETWORK [thread1] Failed to connect to
127.0.0.1:27017, in(connect), reason: Connection refused
2018-04-23T16:13:27.201+0200 E QUERY [thread1] Error: couldn't connect to
server 127.0.0.1:27017, connection attempt failed :
connect at src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed
root at mongo0:~ # serv
root at mongo0:~ # tail /var/log/messages
Apr 23 16:00:00 mongo0 newsyslog[64007]: logfile turned over due to size>100K
Apr 23 16:12:56 mongo0 kernel: pid 84290 (mongod), uid 922: exited on signal 6
root at mongo0:~ # mongo --host 10.0.10.13
MongoDB shell version v3.6.3
connecting to: mongodb://10.0.10.13:27017/
MongoDB server version: 3.6.3
Server has startup warnings:
2018-04-23T14:34:46.957+0200 I CONTROL [initandlisten]
2018-04-23T14:34:46.957+0200 I CONTROL [initandlisten] ** WARNING: Access
control is not enabled for the database.
2018-04-23T14:34:46.957+0200 I CONTROL [initandlisten] ** Read and
write access to data and configuration is unrestricted.
2018-04-23T14:34:46.958+0200 I CONTROL [initandlisten]
> use admin
switched to db admin
> rs.initiate(
... {
... _id : "replica0",
... version: 1,
... members: [
... { _id: 0, host: "mongo0:27017" },
... { _id: 1, host: "mongo1:27017" },
... { _id: 2, host: "mongo2:27017" },
... { _id: 3, host: "mongo3:27017" }
... ]
... }
... )
{
"ok" : 1,
"operationTime" : Timestamp(1524487027, 1),
"$clusterTime" : {
"clusterTime" : Timestamp(1524487027, 1),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
}
}
replica0:SECONDARY>
replica0:SECONDARY>
replica0:SECONDARY>
replica0:SECONDARY>
replica0:SECONDARY>
replica0:SECONDARY>
replica0:PRIMARY>
replica0:PRIMARY>
replica0:PRIMARY>
replica0:PRIMARY>
replica0:PRIMARY>
replica0:PRIMARY>
replica0:PRIMARY>
replica0:PRIMARY>
replica0:PRIMARY>
replica0:PRIMARY> use admin
switched to db admin
replica0:PRIMARY> db.createUser(
... {
... user: "admin",
... pwd: "ADMIN-PASSWORD",
... roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
... }
... )
2018-04-23T14:37:54.460+0200 E QUERY [thread1] Error: error doing query:
failed: network error while attempting to run command 'createUser' on host
'10.0.10.13:27017' :
DB.prototype.runCommand at src/mongo/shell/db.js:168:1
DB.prototype.createUser at src/mongo/shell/db.js:1420:19
@(shell):1:1
2018-04-23T14:37:54.528+0200 I NETWORK [thread1] trying reconnect to
10.0.10.13:27017 (10.0.10.13) failed
2018-04-23T14:37:54.528+0200 W NETWORK [thread1] Failed to connect to
10.0.10.13:27017, in(connect), reason: Connection refused
2018-04-23T14:37:54.528+0200 I NETWORK [thread1] reconnect 10.0.10.13:27017
(10.0.10.13) failed failed
2018-04-23T14:37:54.538+0200 I NETWORK [thread1] trying reconnect to
10.0.10.13:27017 (10.0.10.13) failed
2018-04-23T14:37:54.539+0200 W NETWORK [thread1] Failed to connect to
10.0.10.13:27017, in(checking socket for error after poll), reason: Connection
refused
2018-04-23T14:37:54.539+0200 I NETWORK [thread1] reconnect 10.0.10.13:27017
(10.0.10.13) failed failed
Regards.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list