Re: Connection Refused while running tests on app hosted on docker container

46 views
Skip to first unread message

Mohit Mahesh Vaswani

unread,
Mar 7, 2024, 3:04:45 AM3/7/24
to ZAP User Group
I have a app hosted in docker container on port 5000
ie: http://localhost:5000

I am trying to run this:
docker run -p 8090:8090 --net=zapnet -t owasp/zap2docker-stable zap-baseline.py -t http://localhost:5000
But getting this:

Using the Automation Framework
Automation plan failures:
        Job spider failed to access URL http://localhost:5000 : Connect to http://localhost:5000 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
2024-03-07 04:50:51,497 Failed to access summary file /home/zap/zap_out.json 

I also had a look at:https://www.zaproxy.org/docs/docker/about/ 
last part where we use: 
docker run -t softwaresecurityproject/zap-weekly zap-baseline.py -t http://$(ip -f inet -o addr show docker0 | awk '{print $4}' | cut -d '/' -f 1):10080

i am getting: 
Option "-f" is unknown, try "ip help".
Using the Automation Framework
Automation plan failures:
        Job spider failed to access URL http://:5000 : java.lang.IllegalArgumentException: Host name must not be empty
2024-03-07 04:58:28,694 Failed to access summary file /home/zap/zap_out.json


Can anyone please help with commands or steps?

Simon Bennetts

unread,
Mar 7, 2024, 4:43:07 AM3/7/24
to ZAP User Group

Note that we have had to keep spam filtering in place, so posts from new users will usually get quarantined.
You do not need to keep posting the same question, we will check and approve valid messages.
Reply all
Reply to author
Forward
0 new messages