Single Node MBaaS is not working correctly after host/node reboot
Issue
- Single Node MBaaS is not working correctly after
host/node
reboot - We have a single master/node OpenShift setup running RHMAP. After rebooting the server, the
fh-messaging-service
andfh-metrics-service
fail with a warning.
Log messages on fh-messaging:
{"name":"messaging","hostname":"fh-messaging-1-ly4oo","pid":1,"level":50,"msg":"Can not connect to mongodb.Can not connect to MongoDB after 10 attempts.","time":"2017-01-17T15:29:21.567Z","v":0}
{"name":"messaging","hostname":"fh-messaging-1-ly4oo","pid":1,"level":30,"msg":"Stopping fh-messaging...","time":"2017-01-17T15:29:21.567Z","v":0}
Log messages on fh-metrics:
{"name":"metrics","hostname":"fh-metrics-1-kk8oi","pid":1,"level":50,"msg":"Database connection error: Can not connect to MongoDB after 30 attempts.","time":"2017-01-17T15:25:30.312Z","v":0}
{"name":"metrics","hostname":"fh-metrics-1-kk8oi","pid":1,"level":30,"msg":"Stopping fh-messaging...","time":"2017-01-17T15:25:30.312Z","v":0}
In mongodb I see multiple log lines like this:
[conn7982] SCRAM-SHA-1 authentication failed for u-reporting on fh-reporting from client 192.168.1.2 ; UserNotFound: Could not find user u-reporting@fh-reporting
NOTES:
- The fh-mbaas-template-1node-non-persistent.json will cause this issue and the template fh-mbaas-template-1node.json will solve it but it is require fill changes as decribed in this solution.
- Into 3.16.0 and 4.3.0 is not more required follow this steps because the MongoDB can work without replica set
Environment
- Red Hat Mobile Application Platform ( RHMAP ) - 4.2
- OpenShift ( OSCP ) - 3.2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.