Hi everyone,
It looks like that the official documentation of Debugging Code Running Tomcat is not totally accurate, at least with the latest vagrant box.
In the tutorial, there is a note saying:
If you have a new vagrant box (from atlas), then tomcat service may not exist. Instead the service name will be openmrs.
That is right and the consequences are:
sudo service tomcat {start|stop}
doesn’t work/home/bahmni/apache-tomcat/bin
doesn’t existcatalina.sh
andcatalina.out
don’t exist
Other notes:
- This last step wasn’t need for me to configure remote debugging
So, see below the steps that I had to follow to configure remote debugging.
Restart Tomcat to run in debug mode
Log into your Vagrant box
$ cd bahmni-vagrant
$ vagrant ssh
Once logged in
[vagrant@localhost ~]$ sudo service openmrs stop
Wait for the service to stop, then
[vagrant@localhost ~]$ sudo service openmrs debug
The port 8000 will be open for remote debugging.
- [Optional] From your local machine, run
nmap -v -sT 192.168.33.10
to check if the port is open
Wait for the server to completely start. This may take a while…
Your app should be up and running accessible at the usual address: https://192.168.33.10/ and “debuggable” on port 8000.
Hope this helps.