Closed jayanthktn closed 3 years ago
C:>node -v v14.15.4
C:>npm -v 6.14.10
C:>newman -v 5.2.2
C:>
When i add some console logs, following details are passing to "axios", is my argument mismatched with the expectation?
newman run https://postman-echo.com/status/200 -r @reportportal/agent-js-postman --reporter-@reportportal/agent-js-postman-debug=true --reporter-@reportportal/agent-js-postman-endpoint=http://xxxx-xxx-xxxxx.na.xxxxx.com:8080/api/v1 --reporter-@reportportal/agent-js-postman-token=8f9d4d9c-xxxx-xxxx-xxxx-fe08xxxc7xxx --reporter-@reportportal/agent-js-postman-launch=SampleRunJai --reporter-@reportportal/agent-js-postman-project=SUPERADMIN_PERSONAL --reporter-@reportportal/agent-js-postman-description=LAUNCH_DESCRIPTION -x
URL : //launch method : POST options : {"headers":{"User-Agent":"NodeJS","Authorization":"bearer undefined"}} data : {"name":"Newman launch","startTime":1617173255565,"launch":"Newman launch","attributes":[{"key":"agent","value":"@reportportal/newman-reporter-agent-js-postman|5.0.0","system":true},{"key":"client","value":"@reportportal/client-javascript|5.0.3","system":true},{"key":"os","value":"Windows_NT|x64","system":true},{"key":"RAMSize","value":8490938368,"system":true},{"key":"nodeJS","value":"v14.15.4","system":true}]}
Error: connect ECONNREFUSED 127.0.0.1:80
This is same as the problem I've reported a long time ago: #42
Hi @jayanthktn @AdamHepner
This is an axios problem. By default, axios redirects us to 127.0.0.1:80 if it doesn't find requested URL or http method(GET/POST/PUT). I guess the problem might be with the server http://xxxxxxxxxxx.com:8080/api/v1
. It may not be running, or it may not work, or there is no such server at all.
In our case we use the same report portal instance with multiple programming languages/agents, and only this one is having problems
Hi, @AdamHepner
Thank you for your comment! It gave me a hint. The point is that you use the command line to work with newman-reporter-agent-js-postman
and the custom reporter receives an object options
with keys of a certain kind reportportalAgentJsPostman<YourOption>
. Since our reporter does not process options of this kind, we have undefined values. And this causes the given error. As a quick fix, you can run the reporter programmatically (it works without this kind of error). As soon as possible new agent's version with the fix will be released that will allow you to work with the command line.
Let me try it programmatically, same host I am trying for UI automation(java), it is working. It's only failing when I use it for Newman cli.
Thanks Jayanth
On Wed, 7 Apr 2021, 5:37 pm KatsiarynaTatarynovich, < @.***> wrote:
Hi, @AdamHepner https://github.com/AdamHepner Thank you for your comment! It gave me a hint. The point is that you use the command line to work with newman-reporter-agent-js-postman and the custom reporter receives an object options with keys of a certain kind reportportalAgentJsPostman
. Since our reporter does not process options of this kind, we have undefined values. And this causes the given error. As a quick fix, you can run the reporter programmatically (it works without this kind of error). As soon as possible new agent's version with the fix will be released that will allow you to work with the command line. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/reportportal/agent-js-postman/issues/43#issuecomment-814860531, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGOA2PAIYY5AQD3GL2P5C23THRDHRANCNFSM42D253ZQ .
For me, the work-around was to remove the port 8080
Hi there! We've already released a fix in the version 5.0.1. Now, as @KatsiarynaTatarynovich noted, it is possible to correctly specify the agent parameters via the CLI. I'll close this issue but feel free to open it again if you have any other questions on the topic.
I am providing proper endpoint, still, error displaying the localhost IP and throwing connection refused error
Cmd line : newman run test_fail.json -e Auto_QA.json -r @reportportal/agent-js-postman --reporter-@reportportal/agent-js-postman-debug=true --reporter-@reportportal/agent-js-postman-endpoint=http://xxxxxxxxxxx.com:8080/api/v1 --reporter-@reportportal/agent-js-postman-token=8f9d4d9c-xxxx-xxxx-xxxx-fe08ddc7fada --reporter-@reportportal/agent-js-postman-launch=SampleRunJai --reporter-@reportportal/agent-js-postman-project=SUPERADMIN_PERSONAL --reporter-@reportportal/agent-js-postman-description=LAUNCH_DESCRIPTION -x
Error: connect ECONNREFUSED 127.0.0.1:80 at C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\@reportportal\newman-reporter-agent-js-postman\node_modules\@reportportal\client-javascript\lib\rest.js:31:23 at processTicksAndRejections (internal/process/task_queues.js:93:5) Error: connect ECONNREFUSED 127.0.0.1:80 at C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\@reportportal\newman-reporter-agent-js-postman\node_modules\@reportportal\client-javascript\lib\rest.js:31:23 at processTicksAndRejections (internal/process/task_queues.js:93:5) Error: connect ECONNREFUSED 127.0.0.1:80 at C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\@reportportal\newman-reporter-agent-js-postman\node_modules\@reportportal\client-javascript\lib\rest.js:31:23 at processTicksAndRejections (internal/process/task_queues.js:93:5) Error: connect ECONNREFUSED 127.0.0.1:80 at C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\@reportportal\newman-reporter-agent-js-postman\node_modules\@reportportal\client-javascript\lib\rest.js:31:23 at processTicksAndRejections (internal/process/task_queues.js:93:5)