POSTMAN / NEWMAN: ошибка ECONNRESET в прокси-среде - PullRequest
0 голосов
/ 14 января 2019

Мы пытаемся выполнить коллекции почтальонов, используя Newman внутри Jenkins. Но мы получили ошибку ECONNRESET. Но коллекции хорошо работают в почтальоне.

  1. Наша команда DCLAN обнаружила, что на уровне брандмауэра нет ограничений, поскольку серверы API и сервер Jenkins находятся в сети VAT UAT.

  2. Мы добавили записи хоста api-серверов в наш мастер Jenkins, и наоборот.

  3. Сервер Jenkins может подключаться к telnet и пинговать серверы 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

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...