How to fix ZAP Error [java.net.UnknownHostException]: vanilla-sandbox.localhost?

250 views
Skip to first unread message

Bami

unread,
Jan 20, 2020, 11:57:13 AM1/20/20
to OWASP ZAP User Group
Hi,

I am a new user to ZAP. I tried use ZAP to manually explore my localhost application using http://vanilla-sandbox.localhost:4200 but got the below following errors


Stack
-> Node.js and Angular for frontend
--> IIS service for backend


Request

GET http://vanilla-sandbox.localhost:4200/login HTTP/1.1
Host: vanilla-sandbox.localhost:4200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-CA,en-US;q=0.7,en;q=0.3
Connection: keep-alive
Upgrade-Insecure-Requests: 1

Response

HTTP/1.1 502 Bad Gateway
Content-Type: text/plain; charset=UTF-8
Content-Length: 893


ZAP Error [java.net.UnknownHostException]: vanilla-sandbox.localhost


Stack Trace:
java.net.UnknownHostException: vanilla-sandbox.localhost
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
    at org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$1.doit(ControllerThreadSocketFactory.java:91)
    at org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$SocketTask.run(ControllerThreadSocketFactory.java:158)
    at java.lang.Thread.run(Unknown Source)



kingthorin+owaspzap

unread,
Jan 20, 2020, 2:35:05 PM1/20/20
to OWASP ZAP User Group
Open a command prompt Do a "host" or "nslookup" on vanilla-sandbox.localhost, does it resolve?

Bamidele Olubadejo

unread,
Jan 20, 2020, 3:44:39 PM1/20/20
to zaprox...@googlegroups.com
Hi, I tried that and it didn't resolve. I tried adding 127.0.0.1 vanilla-sandbox.localhost, it timed out. any ideas what i need to do?

On Mon, Jan 20, 2020 at 2:35 PM kingthorin+owaspzap <kingt...@gmail.com> wrote:
Open a command prompt Do a "host" or "nslookup" on vanilla-sandbox.localhost, does it resolve?

--
You received this message because you are subscribed to the Google Groups "OWASP ZAP User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zaproxy-users/2dfccf02-f6a4-4225-92a7-88c0253dcdb2%40googlegroups.com.


--
Bamidele
  

Bami

unread,
Jan 20, 2020, 3:45:12 PM1/20/20
to OWASP ZAP User Group
Hi, I tried that and it didn't resolve. I tried adding 127.0.0.1 vanilla-sandbox.localhost, it timed out. any ideas what i need to do?

kingthorin+owaspzap

unread,
Jan 21, 2020, 6:34:24 AM1/21/20
to OWASP ZAP User Group
That’s a networking issue not a ZAP issue. Can you navigate to 127.0.0.1:4200 when the app is running?
Reply all
Reply to author
Forward
0 new messages