CA WA Agent for Application Intermittent error Invalid argument for HTTP job
search cancel

CA WA Agent for Application Intermittent error Invalid argument for HTTP job


Article ID: 100396


Updated On:


Workload Automation Agent CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation DE - Business Agents (dSeries)


We are using the HTTP job type to send a POST to an internal restful web service and we are sometimes receiving the following error:

Unhandled exception: Invalid argument Invalid argument @at


CA Workload Automation Agent for Application Services


The initial connection failed with 401 Unauthorized "Invalid user name or password".

The commons_wrapper_log.log has the complete sequence:
- POST sent
- 401 Unauthorized response received
- POST sent
- socket disconnected with no response

>> "POST /passengerservrpt/psr/report/priiadelay/email HTTP/1.1[\r][\n]"
>> "Content-Length: 34[\r][\n]"
>> "Content-Type: application/x-www-form-urlencoded; charset=ISO-8859-1[\r][\n]"
>> "Host:[\r][\n]"
>> "Connection: Keep-Alive[\r][\n]"
>> "User-Agent: Apache-HttpClient/4.1.2 (java 1.5)[\r][\n]"
>> "[\r][\n]"
>> "originDate=2018-03-31&options=BOTH"
<< "HTTP/1.1 401 Unauthorized[\r][\n]"
<< "X-Powered-By: Servlet/3.0[\r][\n]"
<< "WWW-Authenticate: Basic realm="psr"[\r][\n]"
<< "Content-Type: text/html[\r][\n]"
<< "$WSEP: [\r][\n]"
<< "Date: Mon, 02 Apr 2018 12:34:10 GMT[\r][\n]"
<< "Last-Modified: Tue, 27 Feb 2018 19:11:09 GMT[\r][\n]"
<< "Content-Length: 379[\r][\n]"
<< "Content-Language: en-US[\r][\n]"
<< "[\r][\n]"
<< "<!doctype html>[\r][\n]"
<< "<html lang="en-US">[\r][\n]"
<< "<head>[\r][\n]"
<< " <meta http-equiv="Content-Type" content="text/html; charset=utf-8">[\r][\n]"
<< " <title>Login Error</title>[\r][\n]"
<< " <link rel="shortcut icon" href="favicon.ico">[\r][\n]"
<< " <link rel="icon" href="favicon.ico">[\r][\n]"
<< " <link rel="stylesheet" type="text/css" href="styles.css"> [\r][\n]"
<< "</head>[\r][\n]"
<< "[\r][\n]"
<< "<body>[\r][\n]"
<< " <h2>Invalid user name or password.</h2>[\r][\n]"
<< "</body>[\r][\n]"
<< "</html>


The default setting is to retry failed connections 3 times, but the server seems configured to disconnect instead of responding when retries come in too quickly .

The default retry setting can be changed by adding this line to the agent's agentparm.txt and restarting the agent:


Note - The default value used to be 0, but the underlying libraries changed and the default became 3. You need to restart the agent for the change to be effected.