Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with rating-mongodb #114

Open
tombolala opened this issue Oct 23, 2018 · 2 comments
Open

Problem with rating-mongodb #114

tombolala opened this issue Oct 23, 2018 · 2 comments

Comments

@tombolala
Copy link

tombolala commented Oct 23, 2018

Hi,

my second mongodb service is not deploying. First one is running, but second aborts - this happens on OpenShift 3.7 cluster.

First service is catalog-mongodb
=> Waiting for MongoDB daemon up
=> MongoDB daemon is up

Second one fails (rating-mongodb)
2018-10-23T06:49:02.645+0000 I STORAGE [initandlisten] exception in initAndListen: 98 Unable to lock file: /var/lib/mongodb/data/mongod.lock errno:11 Resource temporarily unavailable. Is a mongod instance already running?, terminating

Ok, apparently there is already the catalog-mongodb running and both pods are on /var/lib/mongodb/data
This is, however, running fine on my Notebook with Minishift:

  1. notebook running msa-cicd-eap-min (provision-demo.sh, 1.2.x)
  2. OpenShift Cluster running msa-full (Ansible, 1.2.x) no additional settings, as described on the openshift-demos-ansible page

Thanx in advance,
Thomas

@tqvarnst
Copy link
Member

Hi Thomas,
This is probably because of a storage problem in your openshift cluster. The rating-mongodb service is using a persistant volume claim that is called rating-mongodb-pv (see https://github.com/jbossdemocentral/coolstore-microservice/blob/stable-ocp-3.10/openshift/templates/coolstore-deployments-template.yaml#L957)

You can investigate it a bit more by issuing oc get pvc rating-mongodb-pv

To verify you can override the storage claim of the mongodb using the following command:

oc volumes dc/rating-mongodb --name=mongodb-data --add -t emptyDir --overwrite -n <project-name>

and then delete the claim with the following command:

oc delete pvc rating-mongodb-pv -n <project-name>

After that the mongodb instance should start correctly (it will redeploy automatically)

Cheers
Thomas

@balajiraman
Copy link

Just change the replicas=1 in the deployment config, it will start up just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants