Sitecore/xDB/MongoDB arbiter instance receiving application account connection attempts -


i have sitecore 8 test environment 3 mongo 2.6.5 instances xdb. these configured replication set using keyfile 2 servers 'mongotest1' & 'mongotest2' , 1 arbiter 'mongotest3'. non-admin account has been createdin mongo web application, stored in admin database readwrite permissions in 5 xdb databases. sitecore connection strings in format:

connectionstring="mongodb://webapp:password@mongotest1:27018,mongotest2.local:27019/sc8-tracking-history?replicaset=repset1&authsource=admin 

note arbiter not specified in connection string, normal.

rs.status() gives following, looks correct:

"date" : isodate("2015-07-23t16:47:08z"), "mystate" : 2, "syncingto" : "mongotest1.local:27018", "members" : [         {                 "_id" : 0,                 "name" : "mongotest1.local:27018",                 "health" : 1,                 "state" : 1,                 "statestr" : "primary",                 "uptime" : 93,                 "optime" : timestamp(1437668096, 1),                 "optimedate" : isodate("2015-07-23t16:14:56z"),                 "lastheartbeat" : isodate("2015-07-23t16:47:07z"),                 "lastheartbeatrecv" : isodate("2015-07-23t16:47:08z"),                 "pingms" : 0,                 "electiontime" : timestamp(1437669503, 1),                 "electiondate" : isodate("2015-07-23t16:38:23z")         },         {                 "_id" : 1,                 "name" : "mongotest2.local:27019",                 "health" : 1,                 "state" : 2,                 "statestr" : "secondary",                 "uptime" : 93,                 "optime" : timestamp(1437668096, 1),                 "optimedate" : isodate("2015-07-23t16:14:56z"),                 "infomessage" : "syncing to: mongotest1.local:27018",                 "self" : true         },         {                 "_id" : 2,                 "name" : "mongotest3.local:27020",                 "health" : 1,                 "state" : 7,                 "statestr" : "arbiter",                 "uptime" : 91,                 "lastheartbeat" : isodate("2015-07-23t16:47:07z"),                 "lastheartbeatrecv" : isodate("2015-07-23t16:47:07z"),                 "pingms" : 0         } ], "ok" : 1 

when 3 mongo instances started, normal log output observed. however, after sitecore web application connects mongo see connection attempts using 'webapp' account arbiter service fail because arbiter not hold admin database user accounts defined. frequency of increases if shutdown mongotest1 , mongotest2 instances. if shutdown sitecore, connection attempts stop.

2015-07-23t18:02:42.741+0100 [conn699] end connection 127.0.0.1:62206 (2 connections open) 2015-07-23t18:02:43.610+0100 [conn689] end connection 127.0.0.1:62193 (1 connection open) 2015-07-23t18:02:43.611+0100 [initandlisten] connection accepted 127.0.0.1:62207 #700 (3 connections open) 2015-07-23t18:02:43.613+0100 [conn700]  authenticate db: local { authenticate: 1, nonce: "xxx", user: "__system", key: "xxx" } 2015-07-23t18:02:43.890+0100 [initandlisten] connection accepted 127.0.0.1:62208 #701 (3 connections open) 2015-07-23t18:02:43.891+0100 [conn701]  authenticate db: admin { authenticate: 1, user: "webapp", nonce: "xxx", key: "xxx" } 2015-07-23t18:02:43.891+0100 [conn701] failed authenticate webapp@admin mechanism mongodb-cr: authenticationfailed usernotfound not find  user webapp@admin 

why happening? arbiter shouldn't receiving connection attempts clients. if replica set sharing arbiter connection web application invokes connection attempts.

this known c-sharp driver issue, see https://jira.mongodb.org/browse/csharp-851

some aspects of situation sitecore release specific - bundled driver (v1.8.3.9) seems predate driver released v2.6.5, meant predated fix.

sitecore 8 update 5 updates mongo , includes fix. alternatively minimal fix can achieved upgrading bundled mongodb.driver.dll v1.9 , adding assembly redirect web.config.

i blogged more verbose version of answer @ http://blog.paulgeorge.co.uk/2016/01/26/sitecore-mongo-arbiter-shows-failed-authentication-attempts/


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -