Inconsistent Grain table error while doing a vagrant up

install
Tags: #<Tag:0x00007efd1a0c6368>

(sudhir jha) #1

Bahmni: Version Number: *Question:

When I am running vagrant up system shows error “I got an error of inconsistency between grain table and backup grain table”


(Gurpreet Luthra) #2

I googled your error message. Seems like the VM image got corrupted during download. You should ensure you have the latest VirtualBox, and then re-download the image. You can delete the current image from (on Windows) C:/Users/USERNAME/.vagrant.d/boxes. After deleting the image, again execute “vagrant up” so that it re-downloads the box.


(sudhir jha) #3

Thanks for your Advice, You want me to completely delete the files under boxes ?

C:\Users\Sudhir Jha.vagrant.d\boxes\bahmni-team-VAGRANTSLASH-bahmni

There are metadata and other files, Kindly confirm


(Gurpreet Luthra) #4

Yes, everything under boxes can be deleted.


(sudhir jha) #5

Same error is being encountered


(sudhir jha) #6

Command: [“startvm”, “573b2ade-bd31-44b6-967b-9953cce3f76f”, “–type”, “headless”] Stderr: VBoxManage.exe: error: Could not open the medium ‘C:\Users\Sudhir Jha\VirtualBox VMs\Bahmni-RPM\packer-virtualbox-iso-1459089960-disk1.vmdk’. VBoxManage.exe: error: VMDK: inconsistency between grain table and backup grain table in ‘C:\Users\Sudhir Jha\VirtualBox VMs\Bahmni-RPM\packer-virtualbox-iso-1459089960-disk1.vmdk’ (VERR_VD_VMDK_INVALID_HEADER). VBoxManage.exe: error: VD: error VERR_VD_VMDK_INVALID_HEADER opening image file ‘C:\Users\Sudhir Jha\VirtualBox VMs\Bahmni-RPM\packer-virtualbox-iso-1459089960-disk1.vmdk’ (VERR_VD_VMDK_INVALID_HEADER) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MediumWrap, interface IMedium


(Gurpreet Luthra) #7

Please also delete the “Bahmni-RPM” folder under “C:\Users\Sudhir Jha\VirtualBox VMs”.


(sudhir jha) #8

Now I am getting the mentioned error

" your vm has become inaccessible, Unfortunately this is a critical error with vagrant box that vagrant cannot cleanly recover from, Please open your virtual box and clear out your inaccessible virtual machines or find out a way to fix them."

I have also looked for fixing the header by downloading the vddk but didnot worked, can you suggest my friend and thanks for your dedicated help


(Gurpreet Luthra) #9

Start the “Virtual Box” application from GUI, and see if it shows you any VMs there. If it does, just delete them from the UI, so that any left over VMs on your machine are also deleted. The idea is to delete all downloaded VMs, and then download fresh ones again. This stackoverflow discussion link should also help you: http://stackoverflow.com/questions/30662746/vm-has-become-inaccessible-vagrant-no-longer-working


(sudhir jha) #10

Hi Gurpreet,

I have re-installed every piece and now my virtual box is up and running but after few seconds my system freezes automatically and then I have to forcefully restart the system.

FYI, I have i7 processor and 4 Gb of RAM Kindly suggest !!

Thanks for all your support


(Gurpreet Luthra) #11

Good to know its all running!

The issue you are saying seem most likely because the VM is taking most of your RAM, and rest of your system is competing for RAM resources, and then it freezes. You need to exit any unnecessary processes (or applications) on your host machine, so that the host OS gets sufficient RAM. Also, you can try running Bahmni’s VM on lesser RAM. I think its currently configured to use 3GB RAM for your VM. You can set that to 2GB and try, although that would then mean the Bahmni VM gets less memory. If you for instance are only using EMR/OpenMRS, you can shut down the other services like OpenERP and OpenELIS for the time being inside your Bahmni VM.

To reduce the memory allocated to your VM, go to the “bahmni-vagrant” folder, and edit the “Vagrantfile” file. Its contents are this: https://github.com/Bahmni/bahmni-vagrant/blob/master/Vagrantfile#L11

If you see on Line 11, the value “3092”, which represents the RAM given to the VM in mb. You can maybe change that to “2048”, and restart your vagrant (vagrant halt, vagrant up).


(sudhir jha) #12

Hello Gurpreet,

Thanks for all your support !!

I am almost near to running the application, All the services are up and running, but when I access the application from the browser I am getting following message can you suggest-

SSH-2.0-OpenSSH_5.3 Can you suggest so that i can presume


(Gurpreet Luthra) #13

Can you please attach a screenshot of the error you are seeing. You can attach your screenshot here, and paste a link. http://pasteboard.co/


(sudhir jha) #14

Three images I have uploaded first 2 says that vagrant box is running as well as the services are also running, the third one is the issue which i am encountering while accessing the application from the browser

Awaiting your reply

Thanks


(sudhir jha) #15

Shows services are running fine


(Gurpreet Luthra) #16

@sudhir007: Can you paste the hyperlinks of the uploaded images?


(sudhir jha) #19


(Gurpreet Luthra) #20

The URL you entered seems to be: 127.0.0.1:2222. Thats not the port / host where Bahmni is running. Bahmni runs on Vagrant on http://192.168.33.10/home


(sudhir jha) #21

I have used that IP too it has the same error, This IP is generated when I made the Vagrant up I got this as host a ddress in command prompt.

Is this error related to firewall.


(Gurpreet Luthra) #22

Its possible. Can u check your firewall settings. The port also says 2222 in your screenshot. Usually bahmni runs on port 80. Please check.