Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action debugging is not working, throws ECONNREFUSED error #729

Open
shazron opened this issue Sep 12, 2023 · 3 comments
Open

action debugging is not working, throws ECONNREFUSED error #729

shazron opened this issue Sep 12, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@shazron
Copy link
Member

shazron commented Sep 12, 2023

Debug workflow: https://developer.adobe.com/app-builder/docs/resources/debugging/

When the action is debugged in Visual Studio Code, it never gets to "Ready for activations", and throws an ECONNRESET error or just hangs (Windows x86_64, macOS x86_64).

Error Log

C:\test-app-debug/node_modules/.bin/wskdebug.CMD test-app-debug/__secured_generic C:\test-app-debug\actions\generic\index.js -v --disable-concurrency --kind nodejs:14 --inspect-brk=53577
Using openwhisk credential from AIO_runtime_auth environment variable
Agent was already installed, but backup is still present. All good.
- Debugging /53444-shazff8-stage/test-app-debug/__secured_generic on https://adobeioruntime.net
Debugger listening on ws://0.0.0.0:9229/8c0ff2e6-dc66-4856-abd8-da1a9185c4b6
For help, see: https://nodejs.org/en/docs/inspector
Following helper actions are not removed to keep shutdown fast. Remove using --cleanup if desired.
- test-app-debug/__secured_generic_wskdebug_original
- test-app-debug/__secured_generic_wskdebug_invoked
- test-app-debug/__secured_generic_wskdebug_completed
Stopping container wskdebug-test-app-debug-__secured_generic-1694523669978.

FetchError: request to http://0.0.0.0:60813/init failed, reason: connect ECONNREFUSED 0.0.0.0:60813
    at ClientRequest.<anonymous> (C:\openwhisk-wskdebug\node_modules\node-fetch\lib\index.js:1491:11)
    at ClientRequest.emit (node:events:513:28)
    at Socket.socketErrorListener (node:_http_client:494:9)
    at Socket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}

It is failing during a fetch for initializing an action in Docker. This was working previously, not sure if it's a Docker version issue or something else.

Workaround

None for step by step debugging. The alternative is logs.

Verbose wskdebug logs

Before you do an aio app run debug session, update your .env and add this line:

DEBUG=wskdebug
@shazron shazron added the bug Something isn't working label Sep 12, 2023
@aiojbot
Copy link
Collaborator

aiojbot commented Sep 14, 2023

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-2542

@shazron shazron changed the title action debugging is not working, throws ECONNRESET error action debugging is not working, throws ECONNREFUSED error Oct 3, 2023
@shazron
Copy link
Member Author

shazron commented Oct 3, 2023

Might be related: docker/for-mac#6978

@pru55e11
Copy link
Contributor

Related with some interesting findings: adobe/aio-cli#587

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants