Lab - Apache Tomcat Q#1 command in hint not working

Trying to install latest version 9.0.37 then move pkg to path. 1st two commands work - to change directory and refer to website. I did input version #.
last 2 commands: tar -xvf and mv does not work. Pls advise as need this step to work in Q#1 before finishing rest of lab.
image

Hi fifafd350,

It’s an initial problem and we are investigating it.

We do sorry for any inconvenience.

Please let me know once resolved. Still waiting for solutions to other questions you were having tech issues with and have received no response. thank you

We will work on that and will keep you updated ASAP.

having the same issues
i was not able to install tomcat 8

Hello, @oba
Hint is working fine for me.

$ sudo curl -O https://downloads.apache.org/tomcat/tomcat-8/v8.5.58/bin/apache-tomcat-8.5.58.tar.gz
$ ls
$ sudo tar -xvf apache-tomcat-8.5.58.tar.gz
$ sudo mv apache-tomcat-8.5.58 /opt/apache-tomcat-8

Can you please tell me where you are facing issue? May be I can help you to troubleshoot your issue.

1 Like

Thanks. It works now

Thanks for the corrected steps.It works fine

Hi Team,

Facing the same issue.

Hello, @Priyanka
What kind of issue you are facing? I already provided solution. It didn’t work?

I tried the solution provided. it didnt work.
Attaching screenshot

Hello, @Priyanka
Because version has been changed.
You can try below one,

$ sudo curl -O https://downloads.apache.org/tomcat/tomcat-8/v8.5.61/bin/apache-tomcat-8.5.61.tar.gz

rest steps is same.
You can cross verify of available version by visiting that site (https://downloads.apache.org/tomcat/tomcat-8/v8.5.61/bin/).

Let me know if you are still facing the issue.

I had tried it with latest version as well.
But it is working now.
Thanks!

Good to hear that, :+1:

hi @player001 / @KodeKloud

I just tried this and it is not working now . Can you please review and suggest


hor@host01 /$
thor@host01 /$
thor@host01 /$ cd /opt
thor@host01 /opt$
thor@host01 /opt$ sudo curl -O https://downloads.apache.org/tomcat/tomcat-8/v8.5.61/bin/apache-tomcat-v8.5.61.tar.gz;
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   196  100   196    0     0   1767      0 --:--:-- --:--:-- --:--:--  1781
thor@host01 /opt$
thor@host01 /opt$ pwd
/opt
thor@host01 /opt$
thor@host01 /opt$ ls
apache-tomcat-v8.5.61.tar.gzthor@host01 /opt$
thor@host01 /opt$ sudo tar -xvf apache-tomcat-v8.5.61.tar.gz
tar: This does not look like a tar archive

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
thor@host01 /opt$
thor@host01 /opt$ date
Fri Jan 15 14:24:54 UTC 2021
thor@host01 /opt$
thor@host01 /opt$ ls -la
total 12
drwxr-xr-x 1 root root 4096 Jan 15 14:24 .
drwxr-xr-x 1 root root 4096 Jan 15 14:21 ..
-rw-r--r-- 1 root root  196 Jan 15 14:24 apache-tomcat-v8.5.61.tar.gz
thor@host01 /opt$
thor@host01 /opt$

hi @player001 /@KodeKloud

This time I have updated / upgraded CentOs which is underlying OS to see whether this helps . But still the output is same .

Can you please review and suggest ?


thor@host01 /$ cd /opt
thor@host01 /opt$
thor@host01 /opt$ sudo curl -O https://downloads.apache.org/tomcat/tomcat-8/v8.5.61/bin/apache-tomcat-v8.5.61.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   196  100   196    0     0   1143      0 --:--:-- --:--:-- --:--:--  1139
thor@host01 /opt$
thor@host01 /opt$ pwd
/opt
thor@host01 /opt$
thor@host01 /opt$ ls -al
total 12
drwxr-xr-x 1 root root 4096 Jan 15 14:47 .
drwxr-xr-x 1 root root 4096 Jan 15 14:41 ..
-rw-r--r-- 1 root root  196 Jan 15 14:47 apache-tomcat-v8.5.61.tar.gz
thor@host01 /opt$
thor@host01 /opt$
thor@host01 /opt$ sudo tar -xvf apache-tomcat-v8.5.61.tar.gz
tar: This does not look like a tar archive

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
thor@host01 /opt$
thor@host01 /opt$ date
Fri Jan 15 14:47:56 UTC 2021
thor@host01 /opt$
thor@host01 /opt$ ls -la
total 12
drwxr-xr-x 1 root root 4096 Jan 15 14:47 .
drwxr-xr-x 1 root root 4096 Jan 15 14:41 ..
-rw-r--r-- 1 root root  196 Jan 15 14:47 apache-tomcat-v8.5.61.tar.gz
thor@host01 /opt$
thor@host01 /opt$ history
    1  sudo yum install update -y
    2  sudo yum install upgrade -y
    3  clear
    4  sudo dnf install udpate -y
    5  clear
    6  cat /etc/*release*
    7  sudo yum check update
    8  sudo yum update
    9  sudo yum upgrade
   10  clear
   11  cd /opt
   12  sudo curl -O https://downloads.apache.org/tomcat/tomcat-8/v8.5.61/bin/apache-tomcat-v8.5.61.tar.gz
   13  pwd
   14  ls -al
   15  sudo tar -xvf apache-tomcat-v8.5.61.tar.gz
   16  date
   17  ls -la
   18  history
thor@host01 /opt$
thor@host01 /opt$
thor@host01 /opt$ date
Fri Jan 15 14:48:20 UTC 2021
thor@host01 /opt$
thor@host01 /opt$

hi @player001 / @KodeKloud

When same thing is attempted on v9.0.41 I do not get this error.

Can you please investigate and suggest why there is error in version suggested earlier v8.5.61 but this error is not seen when V9.0.41 is chosen.

Am I missing anything ?

Output is provided below


thor@host01 /opt$ sudo curl -O https://downloads.apache.org/tomcat/tomcat-9/v9.0.41/bin/apache-tomcat-9.0.41.tar.gz;
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10.9M  100 10.9M    0     0  38.4M      0 --:--:-- --:--:-- --:--:-- 38.5M
thor@host01 /opt$
thor@host01 /opt$ ls -al
total 11184drwxr-xr-x 1 root root     4096 Jan 15 19:25 .
drwxr-xr-x 1 root root     4096 Jan 15 19:22 ..
-rw-r--r-- 1 root root 11442169 Jan 15 19:25 apache-tomcat-9.0.41.tar.gz
thor@host01 /opt$
thor@host01 /opt$ sudo tar -xvf apache-tomcat-9.0.41.tar.gz
apache-tomcat-9.0.41/conf/
apache-tomcat-9.0.41/conf/catalina.policy
apache-tomcat-9.0.41/conf/catalina.properties
apache-tomcat-9.0.41/bin/tool-wrapper.sh
apache-tomcat-9.0.41/bin/version.sh
thor@host01 /opt$
thor@host01 /opt$ ls -al
total 11188
drwxr-xr-x 1 root root     4096 Jan 15 19:26 .
drwxr-xr-x 1 root root     4096 Jan 15 19:22 ..
drwxr-xr-x 9 root root     4096 Jan 15 19:26 apache-tomcat-9.0.41
-rw-r--r-- 1 root root 11442169 Jan 15 19:25 apache-tomcat-9.0.41.tar.gz
thor@host01 /opt$
thor@host01 /opt$ ls -al /opt/apache-tomcat-9.0.41
total 156
drwxr-xr-x 9 root root  4096 Jan 15 19:26 .
drwxr-xr-x 1 root root  4096 Jan 15 19:26 ..
drwxr-x--- 2 root root  4096 Jan 15 19:26 bin
-rw-r----- 1 root root 18982 Dec  3 11:48 BUILDING.txt
drwx------ 2 root root  4096 Dec  3 11:48 conf
-rw-r----- 1 root root  5409 Dec  3 11:48 CONTRIBUTING.md
drwxr-x--- 2 root root  4096 Jan 15 19:26 lib
-rw-r----- 1 root root 57092 Dec  3 11:48 LICENSE
drwxr-x--- 2 root root  4096 Dec  3 11:43 logs
-rw-r----- 1 root root  2333 Dec  3 11:48 NOTICE
-rw-r----- 1 root root  3257 Dec  3 11:48 README.md
-rw-r----- 1 root root  6898 Dec  3 11:48 RELEASE-NOTES
-rw-r----- 1 root root 16507 Dec  3 11:48 RUNNING.txt
drwxr-x--- 2 root root  4096 Jan 15 19:26 temp
drwxr-x--- 7 root root  4096 Dec  3 11:45 webapps
drwxr-x--- 2 root root  4096 Dec  3 11:43 work
thor@host01 /opt$
thor@host01 /opt$ pwd
/opt
thor@host01 /opt$ sudo mv apache-tomcat-9.0.41 /opt/apache-tomcat-9.0.41
mv: cannot move ‘apache-tomcat-9.0.41’ to a subdirectory of itself, ‘/opt/apache-tomcat-9.0.41/apache-tomcat-9.0.41’
thor@host01 /opt$ date
Fri Jan 15 19:28:30 UTC 2021
thor@host01 /opt$
thor@host01 /opt$ pwd
/opt
thor@host01 /opt$
thor@host01 /opt$ history
    1  PWD
    2  clear
    3  pwd
    4  clear
    5  cd /opt
    6  sudo curl -O https://downloads.apache.org/tomcat/tomcat-8/v9.0.41/bin/apache-tomcat-9.0.41.tar.gz;
    7  ls -al
    8  sudo tar -xvf apache-tomcat-9.0.41.tar.gz
    9  rm *
   10  ls -al
   11  rm apache-tomcat-9.0.41.tar.gz
   12  sudo rm apache-tomcat-9.0.41.tar.gz
   13  ls -al
   14  clear
   15  sudo curl -O https://downloads.apache.org/tomcat/tomcat-9/v9.0.41/bin/apache-tomcat-9.0.41.tar.gz;
   16  ls -al
   17  sudo tar -xvf apache-tomcat-9.0.41.tar.gz
   18  ls -al
   19  ls -al /opt/apache-tomcat-9.0.41
   20  pwd
   21  sudo mv apache-tomcat-9.0.41 /opt/apache-tomcat-9.0.41
   22  date
   23  pwd
   24  history
thor@host01 /opt$
thor@host01 /opt$


Output of extraction is ommited due to limitation imposed on characters . But this is enough for me to pass the checks at the end if I manually create directory with -8 just for sake of passing.