Operating System & Version
CentOS 7 (x86_64)
cPanel & WHM Version
Newest version

Inwin1

Registered
May 25, 2020
4
0
1
idk
cPanel Access Level
Reseller Owner
Hello!

For a couple of days ago I purchased a VPS by Namecheap, as I have been building a java spring boot web application and bought it with CPanel. In have been having quite some issues figuring out how to host my web application, as I have little knowledge with VPS, WHM etc. After searching a couple of days, and trying out stuff I stumbled upon this: Tutorial - Installation and configuration of ea-Tomcat85 which helped me a lot.

I got it working almost, the thing now is that my .WAR file wont load in the browser. I have tried using a test.jsp in the webapps/ROOT folder, and when I search mydomain.com/test.jsp it works, but when I try to load in my .WAR file in the ROOT folder, and search mydomain.com/<warfilename>/, I just get a white page that says "HTTP Status 404 - Not Found". I have also tried removing the ROOT folder, renaming the .WAR file to ROOT.war and trying to access that, and it still didn´t work.

So then I though something might be wrong with my .WAR file, so I tried downloading an example .war file from here: Sample Application and uploading it the way I explained above. It still didn´t work.

The thing I am wondering about is, how do I get the .WAR file working when I search it up, like above? I got the .jsp files working, but not the .WAR files working, and I am really clueless on how to fix this.

I hope this is something you guys can help me with, as I have struggled a really long time without any good answers on the internet.

Best regards
- Inwin1
 

cPSamuelM

Technical Analyst Team Lead
Staff member
Nov 20, 2019
196
38
103
USA
cPanel Access Level
Root Administrator
Hello @Inwin1

Thank you for contacting cPanel!

Please refer to the instructions on the following page for deploying a WAR package with Tomcat:

https://docs.cpanel.net/knowledge-base/web-services/how-to-deploy-java-applications/

I believe the guide on that page should help you get the application working. If after reviewing and following the guide you continue to experience issues with your application, please update this thread and we will be happy to assist you further.

Best regards.
 

Inwin1

Registered
May 25, 2020
4
0
1
idk
cPanel Access Level
Reseller Owner
Hello @Inwin1

Thank you for contacting cPanel!

Please refer to the instructions on the following page for deploying a WAR package with Tomcat:

https://docs.cpanel.net/knowledge-base/web-services/how-to-deploy-java-applications/

I believe the guide on that page should help you get the application working. If after reviewing and following the guide you continue to experience issues with your application, please update this thread and we will be happy to assist you further.

Best regards.
Hello! I have actually tried that before, but I am running EasyApache4 and the article didnt work for me, but thanks for the help! I tried figuring the problem a bit myself yesterday, and tried uninstalling tomcat85 through WHM -> EasyApache4 -> Customize -> Sliding tomcat85 off in the "addition packages" and running the provision. But now I have an even bigger issue, and that is that I am not able to install tomcat85 back, by turning the slider on and running the provision. I get a "failed" message in the provision process log, and I am not sure what to do now, as I cant install tomcat85 back?

Hope you guys can help me install tomcat85 back, so that I can continue getting my java web application online!

Here is the log:
Code:
   Provision process started.
[2020-05-26 12:37:34 +0000] info [xml-api] ---> Package ea-tomcat85.x86_64 0:8.5.55-1.1.1.cpanel will be installed
[2020-05-26 12:37:34 +0000] info [xml-api] --> Finished Dependency Resolution
[2020-05-26 12:37:34 +0000] info [xml-api] ================================================================================
[2020-05-26 12:37:34 +0000] info [xml-api]  Package            Arch          Version                      Repository  Size
[2020-05-26 12:37:34 +0000] info [xml-api] ================================================================================
[2020-05-26 12:37:34 +0000] info [xml-api] Installing:
[2020-05-26 12:37:34 +0000] info [xml-api]  ea-tomcat85        x86_64        8.5.55-1.1.1.cpanel          EA4        9.7 M
[2020-05-26 12:37:34 +0000] info [xml-api] Transaction Summary
[2020-05-26 12:37:34 +0000] info [xml-api] ================================================================================
[2020-05-26 12:37:34 +0000] info [xml-api] Install  1 Package
[2020-05-26 12:37:34 +0000] info [xml-api] Total size: 9.7 M
[2020-05-26 12:37:34 +0000] info [xml-api] Installed size: 14 M
[2020-05-26 12:37:34 +0000] info [xml-api] Downloading packages:
[2020-05-26 12:37:34 +0000] info [xml-api] Running transaction check
[2020-05-26 12:37:34 +0000] info [xml-api] Running transaction test
[2020-05-26 12:37:34 +0000] info [xml-api] Transaction test succeeded
[2020-05-26 12:37:34 +0000] info [xml-api] Running transaction
[2020-05-26 12:37:34 +0000] info [xml-api] usermod: no changes
[2020-05-26 12:37:34 +0000] info [xml-api]   Installing : ea-tomcat85-8.5.55-1.1.1.cpanel.x86_64                       1/1Error unpacking rpm package ea-tomcat85-8.5.55-1.1.1.cpanel.x86_64
[2020-05-26 12:37:34 +0000] info [xml-api] 
[2020-05-26 12:37:34 +0000] info [xml-api] error: unpacking of archive failed on file /opt/cpanel/ea-tomcat85/logs: cpio: rename
[2020-05-26 12:37:34 +0000] info [xml-api] Purging all relevant cached command results
[2020-05-26 12:37:34 +0000] info [xml-api] Removing:  /root/.cpanel/datastore/_usr_sbin_httpd_-V
[2020-05-26 12:37:34 +0000] info [xml-api] Removing:  /root/.cpanel/datastore/_usr_sbin_httpd_-l
[2020-05-26 12:37:34 +0000] info [xml-api] Removing:  /root/.cpanel/datastore/_usr_sbin_httpd_-v
[2020-05-26 12:37:34 +0000] info [xml-api] Rebuilding global cache
[2020-05-26 12:37:34 +0000] info [xml-api] Building global cache for cpanel...Done
[2020-05-26 12:37:34 +0000] info [xml-api] Ensuring current entry for “ea-php54” is correct …
[2020-05-26 12:37:34 +0000] info [xml-api] Ensuring current entry for “ea-php55” is correct …
[2020-05-26 12:37:34 +0000] info [xml-api] Ensuring current entry for “ea-php56” is correct …
[2020-05-26 12:37:34 +0000] info [xml-api] Ensuring current entry for “ea-php70” is correct …
[2020-05-26 12:37:34 +0000] info [xml-api] Ensuring current entry for “ea-php71” is correct …
[2020-05-26 12:37:34 +0000] info [xml-api] Ensuring current entry for “ea-php72” is correct …
[2020-05-26 12:37:34 +0000] info [xml-api] Built /etc/apache2/conf/httpd.conf OK
[2020-05-26 12:37:34 +0000] info [xml-api] Nothing to do under ea4 (this script has been deprecated under ea4).
[2020-05-26 12:37:34 +0000] info [xml-api] Fix mailman RPM directories …
[2020-05-26 12:37:34 +0000] info [xml-api]  … PID 28786
[2020-05-26 12:37:34 +0000] info [xml-api] Fix mailing list perms …
[2020-05-26 12:37:34 +0000] info [xml-api]  … PID 28788
[2020-05-26 12:37:34 +0000] info [xml-api] Aligning modsec config to Whostmgr
[2020-05-26 12:37:34 +0000] info [xml-api] - Whostmgr version 11.86.0.21
[2020-05-26 12:37:34 +0000] info [xml-api] - Whostmgr supports conf.d/modsec location
[2020-05-26 12:37:34 +0000] info [xml-api] - No change necessary
[2020-05-26 12:37:34 +0000] info [xml-api] Waiting for “httpd” to restart gracefully …waiting for “httpd” to initialize ………finished.
[2020-05-26 12:37:34 +0000] info [xml-api] Service Status
[2020-05-26 12:37:34 +0000] info [xml-api]     httpd (/usr/sbin/httpd -k start) is running as root with PID 947 (systemd+/proc check method).
[2020-05-26 12:37:34 +0000] info [xml-api] Startup Log
[2020-05-26 12:37:34 +0000] info [xml-api]     May 25 16:20:44 server1.inwin1designs.com systemd[1]: Starting Apache web server managed by cPanel EasyApache...
[2020-05-26 12:37:34 +0000] info [xml-api]     May 25 16:20:45 server1.inwin1designs.com systemd[1]: Can't open PID file /run/apache2/httpd.pid (yet?) after start: No such file or directory
[2020-05-26 12:37:34 +0000] info [xml-api]     May 25 16:20:45 server1.inwin1designs.com systemd[1]: Started Apache web server managed by cPanel EasyApache.
[2020-05-26 12:37:34 +0000] info [xml-api] Log Messages
[2020-05-26 12:37:34 +0000] info [xml-api]     [Tue May 26 12:31:58.603695 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api]     [Tue May 26 12:22:07.784774 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api]     [Tue May 26 12:11:45.625332 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api]     [Tue May 26 11:13:03.395259 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api]     [Tue May 26 09:16:19.217748 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api]     [Tue May 26 08:28:02.118005 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api]     [Tue May 26 08:26:02.565847 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api]     [Tue May 26 07:02:54.680912 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api]     [Tue May 26 05:06:10.606904 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api]     [Tue May 26 03:09:26.569582 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api]     [Tue May 26 00:56:01.919221 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api]     [Mon May 25 22:42:37.454628 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api]     [Mon May 25 21:04:00.524736 2020] [mpm_worker:notice] [pid 947:tid 47405985117248] AH00292: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 configured -- resuming normal operations
[2020-05-26 12:37:34 +0000] info [xml-api] httpd restarted successfully.
[2020-05-26 12:37:34 +0000] info [xml-api] Setting /home permissions to 0711......Done
[2020-05-26 12:37:34 +0000] info [xml-api] Setting permissions for.....inwipwrm …
[2020-05-26 12:37:34 +0000] info [xml-api] ...Done
[2020-05-26 12:37:34 +0000] info [xml-api]   Verifying  : ea-tomcat85-8.5.55-1.1.1.cpanel.x86_64                       1/1
[2020-05-26 12:37:34 +0000] info [xml-api] Failed:
[2020-05-26 12:37:34 +0000] info [xml-api]   ea-tomcat85.x86_64 0:8.5.55-1.1.1.cpanel                                     
[2020-05-26 12:37:34 +0000] info [xml-api] There were non-fatal errors in the transaction
[2020-05-26 12:37:34 +0000] info [xml-api] Finished Transaction
[2020-05-26 12:37:34 +0000] info [xml-api] Leaving Shell

Provision process finished.
 

Sylvester91

Registered
Nov 30, 2020
1
0
1
France
cPanel Access Level
Root Administrator
Hello @Inwin1

Thank you for contacting cPanel!

Please refer to the instructions on the following page for deploying a WAR package with Tomcat:

https://docs.cpanel.net/knowledge-base/web-services/how-to-deploy-java-applications/

I believe the guide on that page should help you get the application working. If after reviewing and following the guide you continue to experience issues with your application, please update this thread and we will be happy to assist you further.

Best regards.
I'm having the same problem right now. What's wrong? That's exactly what he described.