-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Closed
Labels
waiting for releaseIssue is fix, waiting on new releaseIssue is fix, waiting on new release
Milestone
Description
I already have a web server running on 8080, so I need to run WebGoat on a different port.
$ netstat -ano
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State Timer
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN off (0.00/0/0)
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN off (0.00/0/0)
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN off (0.00/0/0)
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN off (0.00/0/0)
tcp 0 52 192.168.1.87:22 192.168.1.1:49766 ESTABLISHED on (0.23/0/0)
tcp6 0 0 :::8080 :::* LISTEN off (0.00/0/0)
tcp6 0 0 :::445 :::* LISTEN off (0.00/0/0)
tcp6 0 0 :::3000 :::* LISTEN off (0.00/0/0)
tcp6 0 0 :::139 :::* LISTEN off (0.00/0/0)
tcp6 0 0 :::22 :::* LISTEN off (0.00/0/0)
tcp6 0 0 :::21 :::* LISTEN off (0.00/0/0)
tcp6 0 0 127.0.0.1:8005 :::* LISTEN off (0.00/0/0)
tcp6 0 0 :::80 :::* LISTEN off (0.00/0/0)
If I follow the documentation here to set the ports, it will successfully set the WebWolf port, but then fail to change the WebGoat port from 8080.
java -Dfile.encoding=UTF-8 -Dwebgoat.port=6060 -Dwebwolf.port=7070 -jar /opt/webgoat/webgoat-2023.8.jar --server.address 0.0.0.0
2024-09-26T20:01:46.388Z INFO 1793 --- [ main] o.s.b.w.e.undertow.UndertowWebServer : Undertow started on port(s) 7070 (http) with context path '/WebWolf'
....
***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 8080 was already in use.
If I instead set server.port
java -Dfile.encoding=UTF-8 -Dserver.port=6060 -Dwebwolf.port=7070 -jar /opt/webgoat/webgoat-2023.8.jar --server.address 0.0.0.0
Then WebWolf is started on 6060 and WebGoat is attempted to start on 6060.
2024-09-26T20:05:19.568Z INFO 1880 --- [ main] o.s.b.w.e.undertow.UndertowWebServer : Undertow started on port(s) 6060 (http) with context path '/WebWolf'
...
***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 6060 was already in use.
My solution to this has been to specify WEBGOAT_PORT=6060
as an environment variable before the command.
WEBGOAT_PORT=6060 java -Dfile.encoding=UTF-8 -Dwebwolf.port=7070 -jar /opt/webgoat/webgoat-2023.8.jar --server.address 0.0.0.0
Would be useful for either -Dwebgoat.port
to work or the environment variable documented.
Metadata
Metadata
Assignees
Labels
waiting for releaseIssue is fix, waiting on new releaseIssue is fix, waiting on new release