Unexpected end of file from server.Getting error on jenkins

119 views
Skip to first unread message

Alkesh Sirsode

unread,
Jan 11, 2021, 7:55:43 AM1/11/21
to OWASP ZAP Developer Group
I am executing zap by java code it is working fine on local but when i am trying to execute on jenkins giving the error  ie, Unexpected end of file from server

execute zap in daemon mode and disable api key as well
public static void initZAPconnetion() {
String[] command = new String[6];
command[0] = "bash";
command[1] = "/home/ubuntu/ZAP_2.9.0/zap.sh";
command[2] = "-daemon";
command[3] = "-host 0.0.0.0";
command[4] = "-port 8090";
command[5] = "-config api.disablekey=true";
Runtime.getRuntime().exec(command);

getting error on the below line 
zapScanner = new ZAProxyScanner(zapProxyHost, zapProxyPort,zapAPIKey);

thc...@gmail.com

unread,
Jan 11, 2021, 7:58:20 AM1/11/21
to zaproxy...@googlegroups.com
Hi.

Most likely you are not allowing the remote address to access the API.

The ZAP logs should indicate the reason/address.

https://www.zaproxy.org/docs/api/#troubleshooting

Best regards.
Reply all
Reply to author
Forward
0 new messages