On Fri, Aug 5, 2016 at 5:34 PM, Mark Eggers <its_toas...@yahoo.com.invalid> wrote:
> On 8/5/2016 2:19 PM, Sean Son wrote: > > Hello! > > > > I am currently running Tomcat 8 on RHEL 7.2 with one web application > > called AppVet (A mobile Application Vetting program). The > > application works well but when I tried to use a script to allow > > tomcat to start up at boot, the webapp gives an authentication error. > > I saw the following error in the logs for appvet: > > > > > > [ERROR] Could not connect to database: > > com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: > > Communications link failure > > > > The last packet sent successfully to the server was 0 milliseconds > > ago. The driver has not received any packets from the server. Make > > sure your MySQL password in your AppVetProperties.xml file is > > correct > > > > > > I know for a fact that the MySQL password is correct in that XML > > file. I double checked it already. Any ideas on how I should fix > > this error? > > > > This is the script that I am using for startup/shutdown of Tomcat8 on > > boot: > > > > http://pastebin.com/mrvfDtTD > > > > Thanks! > > > > Sean > > > > It appears that your Tomcat process is running as root. Do not do this. > > Is your MySQL server up and running before Tomcat is started? > > . . . just my two cents > /mde/ > > Hello thank you for your response I created a user account for Tomcat, I will set the script to use that account instead of the root account. Question though, does this account need a password? Also, I cant tell if the MySQL server is up and running prior to Tomcat being started. I know that mysqld is enabled to start at boot, but I dont know if Tomcat starts prior to MySQL. How would I figure that out? Thanks!