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

jacogr/polkadot-js-tools metadata tool - abnormal closure error #486

Open
2 of 10 tasks
ghzlatarev opened this issue Apr 14, 2023 · 5 comments
Open
2 of 10 tasks

jacogr/polkadot-js-tools metadata tool - abnormal closure error #486

ghzlatarev opened this issue Apr 14, 2023 · 5 comments
Labels
Support Tracks issues or requests related to troubleshooting, answering questions, and user assistance.

Comments

@ghzlatarev
Copy link

ghzlatarev commented Apr 14, 2023

  • I'm submitting a ...
  • Bug report
  • Feature request
  • Support request
  • Other
  • What is the current behavior and expected behavior?

We have a CI workflow that is supposed to use the metadata diff tool to check whether we need to bump transaction_version of our runtime. Pretty much identical to https://github.com/paritytech/polkadot/blob/master/.github/workflows/release-21_extrinsic-ordering-check-from-two.yml
Yesterday I noticed our own workflow is failing with the following error:

2023-04-07 05:17:20          API-WS: disconnected from ws://localhost:9944: 1006:: connection failed
2023-04-07 05:17:20          API-WS: disconnected from ws://localhost:9955: 1006:: connection failed
2023-04-07 05:17:23          API-WS: disconnected from ws://localhost:9944: 1006:: connection failed
2023-04-07 05:17:23          API-WS: disconnected from ws://localhost:9955: 1006:: connection failed

I tested locally on my machine by running 2 nodes and the following

docker pull jacogr/polkadot-js-tools
docker run --pull always --network host jacogr/polkadot-js-tools metadata ws://localhost:9945 ws://localhost:9944

And reproduced the error

  • What is the motivation for changing the behavior?
  • Please tell us about your environment:
  • Version:

  • Environment:

    • Node.js
    • Browser
    • Other (limited support for other environments)
  • Language:

    • JavaScript
    • TypeScript (include tsc --version)
    • Other
@jacogr
Copy link
Member

jacogr commented Apr 14, 2023

The 1006 is coming from the RPC node. The docker tooling is only reporting that there has been a closure. There is nothing code-wise that can be done, the above is local setup related.

@jacogr jacogr added the Support Tracks issues or requests related to troubleshooting, answering questions, and user assistance. label Apr 14, 2023
@ghzlatarev
Copy link
Author

Do you have any suggestions what to look at, I'm a little lost?
I can reproduce it on fresh ubuntu AWS instance and locally on a Mac, and I can connect to this node through the browser polkadot-js front-end locally. I would've expected that to fail as well.

@wilwade
Copy link
Contributor

wilwade commented Jun 14, 2023

@ghzlatarev I am testing a solution: Use host.docker.internal instead of localhost.

Testing it out now for our own upgrade. It also means you can remove --network host

docker run --pull always jacogr/polkadot-js-tools:0.55.3 metadata ws://host.docker.internal:9946 ws://host.docker.internal:9944

Should know if it works later today.

@wilwade
Copy link
Contributor

wilwade commented Jun 15, 2023

@ghzlatarev Looks like that was a bust. So host.docker.internal alone is not the answer.

@wilwade
Copy link
Contributor

wilwade commented Jun 20, 2023

@ghzlatarev

Found a solution:

I don't know why, but the docker is just not connecting to the host network (or not the right/same one at least).

I just created a new docker network and ran the node in the docker. It is actually nice in a few ways, but it solved the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Tracks issues or requests related to troubleshooting, answering questions, and user assistance.
Projects
None yet
Development

No branches or pull requests

3 participants