dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #09763
Re: DHIS2 not restarting with Server after Bootup [SOLVED]
Hi Adam
It sounds like you have a system tomcat (/etc/init.d/tomcat7)
competing with your custom dhis tomcats. Probably you can uninstall
this first to remove any ambiguities (apt-get remove tomcat7). It was
probably competing for the default port 8080.
Bob
On 23 March 2016 at 14:37, Adam Dawoodjee <adam.daveed@xxxxxxxxx> wrote:
> Hello Community,
>
> I have DHIS2 2.22 running on ubuntu server 14.04. I have:
>
> - setup a the tomcat file with the contents:
>
> #!/bin/sh
> #Tomcat init script
> HOME=/home/dhis/tomcat/bin
> case $1 in
> start)
> sh ${HOME}/startup.sh
> ;;
> stop)
> sh ${HOME}/shutdown.sh
> ;;
> restart)
> sh ${HOME}/shutdown.sh
> sleep 5
> sh ${HOME}/startup.sh
> ;;
> esac
> exit 0
>
>
>
> - executed the commands
>
>> sudo chmod +x /etc/init.d/tomcat
>
>> sudo /usr/sbin/update-rc.d -f tomcat defaults 81
> update-rc.d: warning: /etc/init.d/tomcat missing LSB information
> update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
> Adding system startup for /etc/init.d/tomcat ...
> /etc/rc0.d/K81tomcat -> ../init.d/tomcat
> /etc/rc1.d/K81tomcat -> ../init.d/tomcat
> /etc/rc6.d/K81tomcat -> ../init.d/tomcat
> /etc/rc2.d/S81tomcat -> ../init.d/tomcat
> /etc/rc3.d/S81tomcat -> ../init.d/tomcat
> /etc/rc4.d/S81tomcat -> ../init.d/tomcat
> /etc/rc5.d/S81tomcat -> ../init.d/tomcat
>
>
> *I wonder if there's a problem on the warnings.
>
> On Server REBOOT. Tomcat starts but I get a 404 error until I shutdown and
> restart Tomcat. I noticed that the HOME variable in the /etc/init.d/tomcat
> file was not pointing to my tomcat-<user> instance.
>
> So I changed the line HOME=/home/dhis/tomcat/bin to
> HOME=/home/dhis/tomcat-<user>/bin. In my case
> HOME=/home/dhis/tomcat-dhis/bin.
>
> At this point I still got the 404.
>
> Checking the /etc/init.d/ directory showed two tomcat files, another called
> tomcat7. Assuming this file could be starting at startup without reference
> to my tomcat-dhis, i renamed it to tomcat7_bu. Run > sudo reboot and it
> worked.
>
> Please recommend if there's a better solution. Also, is there a better way
> of presenting solutions to problems like on stackexchange.com?
>
> I hope this helps someone else in my situation.
>
> Regards,
> Adam
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help : https://help.launchpad.net/ListHelp
>
References