I've upgraded to OpenShift Pro and I am trying to get one of my own web apps to work.
The source code is on GitHub and any code I push from my local IDE causes a build, so that all seems ok.
Tomcat is running, I can see that when I enter the url /docs. But my app is not running.
The logs show (abbreviated for clarity):
Starting Servlet Engine: Apache Tomcat/8.0.18
Deploying web application directory /deployments/manager
Deployment of web application directory /deployments/manager has finished in 1,762 ms
Deploying web application directory /deployments/docs
Deployment of web application directory /deployments/docs has finished in 514 ms
Deploying web application directory /deployments/host-manager
Deployment of web application directory /deployments/host-manager has finished in 471 ms
Starting ProtocolHandler ["http-apr-8080"]
Server startup in 2815 ms
As you can see, manager, docs and host-manager have all started but I was expecting to see something like the following after the Starting Servlet Engine line:
Deploying web application archive /deployments/ROOT.war
Deployment of web application archive /deployments/ROOT.war has finished in 2,560 ms
Please note that the OpenShift App name is not the same as my local Eclipse Project name. When I run this Eclipse Project locally the context is 'stripes', and a request looks like localhost:8080/stripes/Test.action
Any ideas?
Have I missed something out?
Any help would be much appreciated...
It looks like that in this case, the built ROOT.war
was not found in the /tmp/src/target
directory and deployed automatically by the s2i image.
This could be somehow tricky to spot, as the build log is just missing one line in that case. If the built war file is in the correct location, you should see a message in the log that the ROOT.war
file (or any other name, if not deploying in the root context) has been copied into the /opt/webserver/webapps/
directory, right under the "Copying all target war artifacts from..." line, such as:
(...)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:02.946s
[INFO] Finished at: Fri Sep 08 13:59:42 UTC 2017
[INFO] Final Memory: 18M/288M
[INFO] ------------------------------------------------------------------------
Copying all target war artifacts from /home/jboss/source/target directory into /opt/webserver/webapps for later deployment...
'/home/jboss/source/target/ROOT.war' -> '/opt/webserver/webapps/ROOT.war'
(...)