POSTMAN / NEWMAN:基于代理的环境中的ECONNRESET错误

时间:2019-01-14 08:23:49

标签: api jenkins postman newman postman-collection-runner

我们正在尝试在詹金斯内部使用纽曼执行邮递员收藏。但是我们遇到了ECONNRESET错误。但是这些收藏在邮递员中执行得很好。

  1. 我们的DCLAN团队发现防火墙级别没有限制,因为API服务器和Jenkins服务器位于UAT VLAN中。

  2. 我们在Jenkins主服务器中添加了api服务器的主机条目,反之亦然。

  3. Jenkins服务器能够telnet和ping API服务器,反之亦然。

我们找不到此错误的罪魁祸首。

操作系统:RHEL 7.4

我们得到以下输出:

Building on master in workspace /app/.jenkins/jobs/MCoachAPI/workspace
[workspace] $ /bin/sh -xe /tmp/jenkins5409467620267677647.sh
+ node -v
v10.14.2
+ npm -version
6.4.1
+ newman -v
4.2.2
+ cd /app/mcoach
+ newman run Valuefy_collection.json
newman

Valuefy-Core

→ http://xx.xx.xxx.xxx:9080/VfRoboAPI.svc/GetAssetAllocationforSurplus
  POST http://xx.xx.xxx.xxx:9080/VfRoboAPI.svc/GetAssetAllocationforSurplus [errored]
     read ECONNRESET

┌─────────────────────────┬──────────┬──────────┐
│                         │ executed │   failed │
├─────────────────────────┼──────────┼──────────┤
│              iterations │        1 │        0 │
├─────────────────────────┼──────────┼──────────┤
│                requests │        1 │        1 │
├─────────────────────────┼──────────┼──────────┤
│            test-scripts │        0 │        0 │
├─────────────────────────┼──────────┼──────────┤
│      prerequest-scripts │        0 │        0 │
├─────────────────────────┼──────────┼──────────┤
│              assertions │        0 │        0 │
├─────────────────────────┴──────────┴──────────┤
│ total run duration: 108ms                     │
├───────────────────────────────────────────────┤
│ total data received: 0B (approx)              │
├───────────────────────────────────────────────┤
│ average response time: 0ms                    │
└───────────────────────────────────────────────┘

  #  failure  detail                                                                        

 1.  Error                                                                                  
              read ECONNRESET                                                               
              at request                                                                    
              inside "http://xx.xx.xxx.xxx:9080/VfRoboAPI.svc/GetAssetAllocationforSurplus" 
Build step 'Execute shell' marked build as failure
Finished: FAILURE

我们的收藏文件:

-bash-4.2$ cat Valuefy_collection.json
{
        "variables": [],
        "info": {
                "name": "Valuefy-Core",
                "_postman_id": "54e64918-f4c7-697e-00d7-8f645b4301cd",
                "description": "",
                "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
        },
        "item": [
                {
                        "name": "http://xx.xx.xxx.xx:9080/VfRoboAPI.svc/GetAssetAllocationforSurplus",
                        "request": {
                                "url": "http://xx.xx.xxx.xxx:9080/VfRoboAPI.svc/GetAssetAllocationforSurplus",
                                "method": "POST",
                                "header": [
                                        {
                                                "key": "Content-Type",
                                                "value": "application/json",
                                                "description": ""
                                        }
                                ],
                                "body": {
                                        "mode": "raw",
                                        "raw": "{\r\n  \"username\" : \"Fs8+/s+QGtHG/X7KtoLCRQ==\",\r\n  \"pwd\" : \"UcVd3yZ8ZsZ9bCFUn1S9nQ==\",\r\n  \"Client_Code\" : \"uB9eQYMSSqY0iKbVrxQlSw==\",\r\n  \"Source_Platform\" : \"Mobile\",\r\n  \"Is_Retail_Flag\" : \"1\"\r\n}"
                                },
                                "description": ""
                        },
                        "response": []
                }
        ]
}

enter image description here

0 个答案:

没有答案