Closed vanloswang closed 6 years ago
@vanloswang Hi, I'm sorry that I didn't see this until now. Have you managed to get it running since you had this issue? If not, I'll try to help you as best I can here. Also, feel free to join the #feedhenry IRC channel on FreeNode. I'm grdryn there. :)
Here are a couple of things that you could try when troubleshooting:
If you oc rsh
into the mongodb container (or connect to the terminal in the OpenShift web console), can you get a mongo shell?
You can rsh into the container like this (your Pod name will have a different suffix):
$ oc rsh mongodb-1-1-nt026
sh-4.2$
Once you are inside the pod, you can open an MongoDB connection as the admin user as follows:
sh-4.2$ mongo admin -u admin -p ${MONGODB_ADMIN_PASSWORD}
MongoDB shell version: 3.2.6
connecting to: admin
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2017-02-07T14:56:57.262+0000 I CONTROL [initandlisten]
2017-02-07T14:56:57.262+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2017-02-07T14:56:57.262+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2017-02-07T14:56:57.262+0000 I CONTROL [initandlisten]
2017-02-07T14:56:57.262+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2017-02-07T14:56:57.262+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2017-02-07T14:56:57.262+0000 I CONTROL [initandlisten]
>
If that works, then at least the admin user was created successfully. While this connection is open, you can see if the databases got created correctly:
> show databases
admin 0.000GB
fh-mbaas 0.000GB
fh-reporting 0.000GB
local 0.000GB
>
The fh-mbaas
and fh-reporting
databases should be created there (the fh-reporting
database is used by both fh-messaging
and fh-metrics
, and fh-statsd
doesn't have a database).
If those databases are there, you can exit
the mongo connection and try to connect to each of those as their respective user:
mongo ${MONGODB_FHMBAAS_DATABASE} -u ${MONGODB_FHMBAAS_USER} -p ${MONGODB_FHMBAAS_PASSWORD}
MongoDB shell version: 3.2.6
connecting to: fh-mbaas
>
@vanloswang looking at the output from your services again, it looks like there might be a networking issue in your OpenShift setup, as they can't seem to find mongodb-1:27017
. Either that, or the MongoDB container crashed (with the 1node template that you're using, if MongoDB crashes, you may need to start again, as it doesn't persist the DB info -- consider using the fh-mbaas-template-1node-persistent.json template instead, but note that you'll need a PV for MongoDB, and one for Nagios with that template).
I deployed by using fh-mbaas-template-1node.json on origin 1.4 alpha.1.
Steps:
The logs of the mongodb pod is as following:
the logs of the fh-mbass pod is as following:
the logs of the metrics pod is as following:
the logs of messagings pod is as following:
all of them failed with communication with the mongodb, so how to deploy an all in one environment?