Zhumengxin / webgoat

Automatically exported from code.google.com/p/webgoat
0 stars 0 forks source link

WebGoat on Ubuntu Linux doesn't start #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download the archive
2. Unzip it
3. lunching in linux the command 'sudo sh webgoat.sh start80' into a terminal

What is the expected output? What do you see instead?
The program have to lunch the service, and after I have to be able to see
something at http://127.0.0.1/WebGoat/attack like the output say. But there
are problem with the JAVA_HOME.
1)- The script says that JAVA_HOME was not defined, then into a terminal i
wrote JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/ But nothing changed.

2)- Then i found a post of a guy with the same problem, then i putted this
row (the same i was writing into the terminal to set this variable) above
into the webgoat.sh. The line is JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/
Now the command sudo 'sh webgoat.sh start80' returns this messages:
----------------------------------------------------------------
jollyr0ger@icecube:~/bin/WebGoat-5.1$ sudo sh webgoat.sh start80
The JAVA_HOME environment variable is not defined
This environment variable is needed to run this program

  Open http://127.0.0.1/WebGoat/attack
  Username: guest
  Password: guest
  Or try http://guest:guest@127.0.0.1/WebGoat/attack 

tail: impossible to open `./tomcat/logs/catalina.out' for reading: No file
or directory
tail: no file rimained
----------------------------------------------------------------
(PS the last 2 lines are translated by me from the italian)

3)- Then i create the log file with 
'touch ./tomcat/logs/catalina.out' command
Now the program returns
----------------------------------------------------------------
jollyr0ger@icecube:~/bin/WebGoat-5.1$ sudo sh webgoat.sh start80
The JAVA_HOME environment variable is not defined
This environment variable is needed to run this program

  Open http://127.0.0.1/WebGoat/attack
  Username: guest
  Password: guest
  Or try http://guest:guest@127.0.0.1/WebGoat/attack 

----------------------------------------------------------------

Obviously trying to open http://127.0.0.1/WebGoat/attack the page is not
loaded.

What version of the product are you using? On what operating system?
I'm on Ubuntu Linux 7.10 with sun-java5-bin, sun-java5-demo, sun-java5-jdk,
sun-java5-jre installed.Tomcat packages are tomcat5.5 and libtomcat5.5-java

Please provide any additional information below.
I've tryed to add other packages that can be useful for webgoat but nothing
happened. For more detailed info, ask with no problem

Original issue reported on code.google.com by jollyr0...@gmail.com on 6 Feb 2008 at 10:39

Attachments:

GoogleCodeExporter commented 9 years ago
Hi i was missing that the version is the 5.1

Original comment by jollyr0...@gmail.com on 6 Feb 2008 at 10:52

GoogleCodeExporter commented 9 years ago
This looks like the JAVA_HOME environment setting is not propagating to the 
root user.

try:

$ JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/ sudo webgoat.sh start80

or

$ export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/
$ sudo webgoat.sh start80

Original comment by rogan.da...@gmail.com on 6 Feb 2008 at 12:49

GoogleCodeExporter commented 9 years ago
This comment was relayed from the WebGoat Mail list, which is a duplicate of 
Rogan's
response.  The WebGoat mail list can be subscribed to at:
https://lists.owasp.org/mailman/listinfo/owasp-webgoat

JAVA_HOME must be an enviroment variable. In Linux to set an environment 
variable you
use export command. The true syntax is as follows:

export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/

Original comment by mayhe...@gmail.com on 6 Feb 2008 at 1:27

GoogleCodeExporter commented 9 years ago
Hi to all!
I've solved the problem with your help, really thanks.

just a precisation, in the comment above the command to lunch the application 
was
missing the './' before the name of the application.

So the correct commands are:
$ export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/
$ sudo ./webgoat.sh start80

i think that into the website, at the project page, someone can be more helpfull
writing some words about using it over linux. something like how package 
install, how
to find the script to lunch it, and how set the JAVA_HOME.

shortly i'll write an howto install and use webgoat over ubuntu (italian and
english), and i'll link it here, if you want you can take it like an idea to 
write
the help page.

regards
jollyr0ger

Original comment by jollyr0...@gmail.com on 8 Feb 2008 at 12:50

GoogleCodeExporter commented 9 years ago

Original comment by mayhe...@gmail.com on 22 Feb 2008 at 2:05