Error deploying a war file of openELIS

When running scripts/vagrant/vagrant-deploy.sh the openelis.war file is created fine but the next step fails in the vagrant-deploy step of the ant build process. Here’s the stack: vagrant-deploy: [echo] Deploying OpenElis.war to Vagrant Tomcat [exec] +++ dirname /opt/bahmni-lab/etc/OpenElis/scripts/vagrant/vagrant-deploy.sh [exec] ++ cd /opt/bahmni-lab/etc/OpenElis/scripts/vagrant [exec] ++ pwd [exec] + PATH_OF_CURRENT_SCRIPT=/opt/bahmni-lab/etc/OpenElis/scripts/vagrant [exec] + source /opt/bahmni-lab/etc/OpenElis/scripts/vagrant/vagrant_functions.sh [exec] ++ MACHINE_IP=192.168.33.10 [exec] ++ KEY_FILE=/root/.vagrant.d/insecure_private_key [exec] ++ TIMEOUT=’-o ConnectTimeout=5’ [exec] + TEMP_ELIS_WAR_FOLDER=/tmp/deploy_openelis [exec] + CWD=/opt/bahmni-lab/etc/OpenElis [exec] + SCRIPTS_DIR=/opt/bahmni-lab/etc/OpenElis/scripts/vagrant [exec] + run_in_vagrant -f /opt/bahmni-lab/etc/OpenElis/scripts/vagrant/setup_environment.sh [exec] + ‘[’ -f == -c ‘]’ [exec] + ‘[’ -f == -f ‘]’ [exec] + ssh vagrant@192.168.33.10 -i /root/.vagrant.d/insecure_private_key -o ConnectTimeout=5 [exec] Pseudo-terminal will not be allocated because stdin is not a terminal. [exec] + scp_to_vagrant openelis/dist/openelis.war /tmp/deploy_openelis [exec] + scp -i /root/.vagrant.d/insecure_private_key -o ConnectTimeout=5 openelis/dist/openelis.war vagrant@192.168.33.10:/tmp/deploy_openelis [exec] + run_in_vagrant -f /opt/bahmni-lab/etc/OpenElis/scripts/vagrant/deploy_elis_war.sh [exec] + ‘[’ -f == -c ‘]’ [exec] + ‘[’ -f == -f ‘]’ [exec] + ssh vagrant@192.168.33.10 -i /root/.vagrant.d/insecure_private_key -o ConnectTimeout=5 [exec] Pseudo-terminal will not be allocated because stdin is not a terminal. [exec] cp: cannot create regular file `/home/bahmni/apache-tomcat-8.0.12/webapps/openelis.war’: Permission denied

There’s no folder apache-tomcat-8.0.12/webapps at /home/bahmni

Kindly help. Thanks

The vagrant-deploy scripts haven’t been updated to point to the new deployment paths.

Please check the location of OpenELIS in your vagrant box. You can copy the OpenELIS.war file directly into the right location. Make sure you shutdown the bahmni-lab service before you overwrite the war file. You could take a backup of the original Openelis.war file, before replacing it with the new one, in case things don’t go as planned.

cd bahmni-vagrant #or wherever is your vagrant located.
vagrant ssh #now you  are in vagrant box
cd /opt/bahmni-lab/etc #this is where bahmni-lab is located (openelis)
# The folder of your host machine is mapped into /bahmni location inside vagrant box
# Copy the war file from /bahmni appropriate location, into this location and restart ELIS service
# cp /bahmni/(path-of-elis-war-file)  /opt/bahmni-lab/etc/

See this discussion for OpenELIS deployment path: openELIS translation

@decote As @gsluthra pointed out, the vagrant-deploy.sh script is not updated to point to rpms. It needs to be done similar to this script. This is for bahmni-reports which is also a service that has an embedded tomcat. Do you mind checking it out, updating it and sending us a Pull Request. We will review it and merge it. Thanks for the help.