Unable to access the Bahmni applications after server restart

I have installed Bahmni 0.92 version in Centos 7.6 and then able to access Bahmni Clinical, Lab and Odoo application in my Windows browser which is connected with the same network.

However , once I have reboot my centos; I am able to see the applications are Up and running with new Process-ids. However, I am not able to access the applications in browser.

I have shut down the services and started-up again. But it makes no difference. I am assuming that the web-application is not running in centos ; that’s why I am not able to browse it.

Any suggestions or procedures to resolve this issue please ?

Regards Susanta

Are you able to access the application on the Centos machine? You may have to check the firewall on the CentOS machine.

In centos, I have checked by running the command PS -ef ! Grep - bahmni. So, all processes are running with the new pid. Is there any other check required?

Regarding firewall, after installation, the application was running fine. But after OS reboot, it’s not working. Is it possible that firewall configuration will be changed dynamically once OS reboots. If so, could you please guide me with the correct configuration?

@jaghatise …is there any suggestions please??

@susant2020 Check your java versions. You will need to specify a default java. Run Java -version on the CentOS machine

hi Jaghatise,

Java version is as below openjdk version “1.8.0_181” OpenJDK Runtime Environment (build 1.8.0_181-b13) OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

I can confirm that after server restart , I am able to open the application in the web browser in CENTOS machine (e.g. http://localhost/home). But, I am not able to open the application in the windows machine in browser (http://192.168.122.1/home) which is connected to the same network. I am able to ping and connect windows machine to the CENTOS machine using the same ip (192.168.122.1). Not sure what is the problem …

Firewall configuration also looks okay to me as below


[root@localhost bahmni_support]# iptables -L -n -v --line-numbers Chain INPUT (policy ACCEPT 0 packets, 0 bytes) *num pkts bytes target prot opt in out source destination * 1 0 0 ACCEPT udp – virbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:53 2 0 0 ACCEPT tcp – virbr0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 3 0 0 ACCEPT udp – virbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:67 4 0 0 ACCEPT tcp – virbr0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:67 5 195K 56M ACCEPT all – * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED *6 1127 67644 ACCEPT all – lo * 0.0.0.0/0 0.0.0.0/0 * *7 317 22833 INPUT_direct all – * * 0.0.0.0/0 0.0.0.0/0 * *8 317 22833 INPUT_ZONES_SOURCE all – * * 0.0.0.0/0 0.0.0.0/0 * *9 317 22833 INPUT_ZONES all – * * 0.0.0.0/0 0.0.0.0/0 * 10 13 580 DROP all – * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID 11 302 22149 REJECT all – * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) *num pkts bytes target prot opt in out source destination * 1 0 0 ACCEPT all – * virbr0 0.0.0.0/0 192.168.122.0/24 ctstate RELATED,ESTABLISHED *2 0 0 ACCEPT all – virbr0 * 192.168.122.0/24 0.0.0.0/0 * *3 0 0 ACCEPT all – virbr0 virbr0 0.0.0.0/0 0.0.0.0/0 * 4 0 0 REJECT all – * virbr0 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable 5 0 0 REJECT all – virbr0 * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable 6 0 0 ACCEPT all – * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED *7 0 0 ACCEPT all – lo * 0.0.0.0/0 0.0.0.0/0 * *8 0 0 FORWARD_direct all – * * 0.0.0.0/0 0.0.0.0/0 * *9 0 0 FORWARD_IN_ZONES_SOURCE all – * * 0.0.0.0/0 0.0.0.0/0 * *10 0 0 FORWARD_IN_ZONES all – * * 0.0.0.0/0 0.0.0.0/0 * *11 0 0 FORWARD_OUT_ZONES_SOURCE all – * * 0.0.0.0/0 0.0.0.0/0 * *12 0 0 FORWARD_OUT_ZONES all – * * 0.0.0.0/0 0.0.0.0/0 * 13 0 0 DROP all – * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID 14 0 0 REJECT all – * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT 171K packets, 34M bytes) *num pkts bytes target prot opt in out source destination * 1 0 0 ACCEPT udp – * virbr0 0.0.0.0/0 0.0.0.0/0 udp dpt:68 *2 196K 53M OUTPUT_direct all – * * 0.0.0.0/0 0.0.0.0/0 *

Chain FORWARD_IN_ZONES (1 references) *num pkts bytes target prot opt in out source destination * *1 0 0 FWDI_public all – em1 * 0.0.0.0/0 0.0.0.0/0 [goto] * *2 0 0 FWDI_public all – + * 0.0.0.0/0 0.0.0.0/0 [goto] *

Chain FORWARD_IN_ZONES_SOURCE (1 references) *num pkts bytes target prot opt in out source destination *

Chain FORWARD_OUT_ZONES (1 references) *num pkts bytes target prot opt in out source destination * *1 0 0 FWDO_public all – * em1 0.0.0.0/0 0.0.0.0/0 [goto] * *2 0 0 FWDO_public all – * + 0.0.0.0/0 0.0.0.0/0 [goto] *

Chain FORWARD_OUT_ZONES_SOURCE (1 references) *num pkts bytes target prot opt in out source destination *

Chain FORWARD_direct (1 references) *num pkts bytes target prot opt in out source destination *

Chain FWDI_public (2 references) *num pkts bytes target prot opt in out source destination * *1 0 0 FWDI_public_log all – * * 0.0.0.0/0 0.0.0.0/0 * *2 0 0 FWDI_public_deny all – * * 0.0.0.0/0 0.0.0.0/0 * *3 0 0 FWDI_public_allow all – * * 0.0.0.0/0 0.0.0.0/0 * *4 0 0 ACCEPT icmp – * * 0.0.0.0/0 0.0.0.0/0 *

Chain FWDI_public_allow (1 references) *num pkts bytes target prot opt in out source destination *

Chain FWDI_public_deny (1 references) *num pkts bytes target prot opt in out source destination *

Chain FWDI_public_log (1 references) *num pkts bytes target prot opt in out source destination *

Chain FWDO_public (2 references) *num pkts bytes target prot opt in out source destination * *1 0 0 FWDO_public_log all – * * 0.0.0.0/0 0.0.0.0/0 * *2 0 0 FWDO_public_deny all – * * 0.0.0.0/0 0.0.0.0/0 * *3 0 0 FWDO_public_allow all – * * 0.0.0.0/0 0.0.0.0/0 *

Chain FWDO_public_allow (1 references) *num pkts bytes target prot opt in out source destination *

Chain FWDO_public_deny (1 references) *num pkts bytes target prot opt in out source destination *

Chain FWDO_public_log (1 references) *num pkts bytes target prot opt in out source destination *

Chain INPUT_ZONES (1 references) *num pkts bytes target prot opt in out source destination * *1 291 19856 IN_public all – em1 * 0.0.0.0/0 0.0.0.0/0 [goto] * *2 26 2977 IN_public all – + * 0.0.0.0/0 0.0.0.0/0 [goto] *

Chain INPUT_ZONES_SOURCE (1 references) *num pkts bytes target prot opt in out source destination *

Chain INPUT_direct (1 references) *num pkts bytes target prot opt in out source destination *

Chain IN_public (2 references) *num pkts bytes target prot opt in out source destination * *1 317 22833 IN_public_log all – * * 0.0.0.0/0 0.0.0.0/0 * *2 317 22833 IN_public_deny all – * * 0.0.0.0/0 0.0.0.0/0 * *3 317 22833 IN_public_allow all – * * 0.0.0.0/0 0.0.0.0/0 * *4 0 0 ACCEPT icmp – * * 0.0.0.0/0 0.0.0.0/0 *

Chain IN_public_allow (1 references) *num pkts bytes target prot opt in out source destination * 1 2 104 ACCEPT tcp – * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 ctstate NEW

Chain IN_public_deny (1 references) *num pkts bytes target prot opt in out source destination *

Chain IN_public_log (1 references) *num pkts bytes target prot opt in out source destination *

Chain OUTPUT_direct (1 references) *num pkts bytes target prot opt in out source destination * [root@localhost bahmni_support]#


Any solution?

Try this… Sudo service iptables start

did not work for me

this happens with me all the time I reboot the bahmni instance, i have to relaod the Firewall settings for Bahmni through commond line (CLI) as per below link

not only that I have to actually start “Service start commands for Bahmni” in CLI - weired. not sure whats wrong. but the above works until the VM is rebooted.

For bahmni commands to restart the services as per the guide in the below link - i have enabled the services to start at reboot - but in wain- I suppose this is to do with the firewall settings that are reloaded need the services restart aswell…?

https://bahmni.atlassian.net/wiki/spaces/BAH/pages/33128505/Install+Bahmni+on+CentOS

solution please

Thanks

if you are running CentOS newer version, the default firewall mgmt system might be “firewalld”!