I keep failing this easy task, even doing what I believe is correct.
Here is my steps for instruction that I need to setup and install tomcat on Naut App 01
- ssh tony@hostname
- sudo yum install -y tomcat tomcat-webapps tomcat-admin-webapps
- sudo systemctl enable tomcat
- sudo vi /etc/tomcat/server.xml
- Change the Port to the said port (either 5001 or 8082)
- ssh thor@hostname (go to jump host)
- scp /tmp/ROOT.war tony@hostname:/tmp/
- Deploy ( sudo cp /tmp/ROOT.war /var/lib/tomcat/webapps/ //
sudo chown tomcat:tomcat /var/lib/tomcat/webapps/ROOT.war)
- Start and apply changes (sudo systemctl restart tomcat //
sudo systemctl status tomcat)
- test via curl (curl http:hostname:5001, which is successful and given me a response for default tomcat)
Hello there and happy holidays, I hope I can resolve your issue.
Also wondering what error was given when you clicked Check?
The only difference I can spot in this from mine would be just simply installing tomcat and no need to chown. Also, I assume you sudo systemctl start tomcat and just forgot to list it in your steps.
My steps follow using port 3002 for my task
thor@jumphost /tmp$ scp /tmp/ROOT.war tony@stapp01:/tmp
thor@jumphost /tmp$ ssh tony@stapp01
[tony@stapp01 ~]$ sudo yum update -y
[tony@stapp01 ~]$ sudo yum install tomcat -y
[tony@stapp01 ~]$ sudo vi /etc/tomcat/server.xml
<Connector port=“3002” protocol=“HTTP/1.1”
:wq
[tony@stapp01 ~]$ sudo cp /tmp/ROOT.war /usr/share/tomcat/webapps/
[tony@stapp01 ~]$ sudo systemctl enable --now tomcat
[tony@stapp01 ~]$ sudo systemctl status tomcat
[tony@stapp01 ~]$ sudo netstat -tulpen | grep 3002
tcp 0 0 0.0.0.0:3002 0.0.0.0:* LISTEN 53 729676579 4541/java
[tony@stapp01 ~]$ curl http://stapp01:3002
SampleWebApp
Welcome to xFusionCorp Industries!
</body>
Hope that helps.
Thanks for the reply and guidance. I did start it up since I have made connection via curl and netstat too. It just weird that it keeps failing me when doing the “check” for the task. I did tried to follow your steps and now it does work. Thank you!