Jump to content

How do I setup and deploy my java application on cpanel?


seintitus

Recommended Posts

First things first, you need to remove cloudflare and set your domain's name servers to ns1.heliohost.org and ns2.heliohost.org. We can't provide proper support for accounts that use it because they're impossible to troubleshoot DNS issues on.

 

Second, you need to request Java access if you haven't already. There's a button in cPanel under "Software" to do that. Then you need to wait in line for it to be installed (estimate is 3 days right now on Tommy, but it may take more or less time depending on load, the number of people in line in front of you, and the number of people who lose it for things like nonuse or getting suspended).

 

Once it's installed, you either upload JSP files into your account, or if you have a .war file, the page where you initially requested Java will have an option to deploy a war file instead.

Link to comment
Share on other sites

I already requested for java and it's currently enabled. Now my question is that the application I am trying to install is Cyclos4 app. I have already downloaded the necessary files from their website: cyclos.org and have uploaded to my public_html. And I am stuck there not sure how to configure

Link to comment
Share on other sites

Check out the installation instructions at https://documentation.cyclos.org/4.3/cyclos-reference/ch01.html

 

Step 1.1.5 is probably what you need to do next. Unzip the archive on your home pc and navigate to the cyclos/WEB-INF/classes directory. There you should see a file called cyclos-release.properties. Make a copy and name the copy cyclos.properties. Edit this file and put in your database information. You can get this information from when you create the database and the database user in the cpanel postgresql button. I recommend using 127.0.0.1 as the host and port 5432 since it will be running on the server. Then once you have this file edited you need to create a .war file out of it. War files are just .zip files that have been renamed so in most cases you should be fine to use a normal zip program and then rename the output to tchesoen_cyclos.war. Then deploy that .war file in the cpanel java button, and pray. If you're lucky it will work. You can monitor the install process by seeing if it creates any tables in your database. Most likely it will fail to deploy though for one reason or another. Just post back here if that happens and I'll check the log files for you. Worst case scenario you have to get a VPS to run this software where you will have root access to Tomcat and all the logs to install this the way they recommend. One concern I have is it suggests increasing the default Tomcat memory setting. That doesn't really work with shared hosting because Tomcat already uses massive amounts of memory and if we increased that setting only 2 or 3 people would be able to have java access at once without crashing the server. If you get a VPS you would be the only user on the whole server so you could use as much memory as you need.

Link to comment
Share on other sites

It can take a little while for the deployment to work once you run it (there's a bunch of things that have to happen in the background, one of which I think is an Apache restart if it's the first time deploying a file with that specific name). If it doesn't deploy and start working within a few hours, let us know.

Link to comment
Share on other sites

Here's your error

10-Nov-2020 16:55:16.140 INFO [localhost-startStop-9] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat/apache-tomcat-8.5.24/webapps/tchesoen_cyclos.war]
10-Nov-2020 17:01:30.684 INFO [Finalizer] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [org.apache.http.impl.conn.PoolingHttpClientConnectionManager$2]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
 java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.apache.http.impl.conn.PoolingHttpClientConnectionManager$2]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
        at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1311)
        at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1299)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.shutdown(PoolingHttpClientConnectionManager.java:413)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.finalize(PoolingHttpClientConnectionManager.java:207)
        at java.lang.System$2.invokeFinalize(System.java:1273)
        at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:102)
        at java.lang.ref.Finalizer.access$100(Finalizer.java:34)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:217)
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...