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

502 Bad Gateway when connecting to RPC #16

Open
ajruizvargas opened this issue May 11, 2023 · 8 comments
Open

502 Bad Gateway when connecting to RPC #16

ajruizvargas opened this issue May 11, 2023 · 8 comments

Comments

@ajruizvargas
Copy link

I ran the playbook and it seems that it ran successfully. When I try to connect to the RPC I get 502 Bad Gateway error. Any ideas why this is happening?

Screenshot 2023-05-11 at 11 40 45
@Gauravk0029
Copy link

I am also facing same issue RPC is not working

@sohan-pelqa
Copy link

Getting same issue

@praetoriansentry
Copy link
Contributor

Hey @Gauravk0029 / @sohan-pelqa / @ajruizvargas can you let me know what command you were using to access the RPC?

I would also ssh into any particular validator or fullnode and double check that edge is running with sudo systemctl status edge if you're getting a 502 it sounds like the lb was created properly and the nodes behind the lb are unhealthy and not running. This can happen in situations where network didn't bootstrap properly for one reason or another.

In my case, I just ran through the full process this evening while doing some testing on mumbai:
image

@sohanyadav
Copy link

sohanyadav commented May 18, 2023

@praetoriansentry edge service not starting error is

2023-05-17T10:56:00.115Z [INFO]  polygon.server: Data dir: path=/var/lib/edge
2023-05-17T10:56:00.117Z [INFO]  polygon.server: Prometheus server started: addr==127.0.0.1:9091
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1570320]

And Service not starting due to this error

@Ak162
Copy link

Ak162 commented May 18, 2023

Hello @praetoriansentry, yes my bootstarp script is not work properly And not install node when i run script and quick deployment faced same error. Can you please check bootstarp.sh file.

@Gauravk0029
Copy link

@praetoriansentry yes , when i run the ansible playbook, script is not deploying. When i try to run manual through validatore node it's giving errors like below:

fatal: [i-03a65600a90ed31b3]: FAILED! => {"changed": true, "cmd": "cd /var/lib/bootstrap\nexport PRIVATE_KEY=$(cat rootchain-wallet.json | jq -r '.HexPrivateKey')\nexport NATIVE_ERC20_ADDR=$(cat genesis.json | jq -r '.params.engine.polybft.bridge.nativeERC20Address') \nnpm install\nnode /var/lib/bootstrap/deploy-and-run.js > /var/lib/bootstrap/run-deploy-output.txt\n", "delta": "0:00:07.295354", "end": "2023-05-17 10:52:21.876678", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 10:52:14.581324", "stderr": "cat: genesis.json: No such file or directory\nnpm WARN deprecated [email protected]: this library is no longer supported\nnpm WARN deprecated [email protected]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.\nnpm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.\nnpm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142\nnpm WARN deprecated [email protected]: This module has been superseded by the multiformats module\nnpm WARN deprecated [email protected]: This module has been superseded by the multiformats module\nnpm WARN deprecated [email protected]: This module has been superseded by the multiformats module\nnpm WARN deprecated [email protected]: This module has been superseded by the multiformats module\nnpm WARN deprecated [email protected]: This module has been superseded by the multiformats module\n/var/lib/bootstrap/node_modules/web3-core-helpers/lib/errors.js:125\n return new Error('This contract object doesn\'t have address set yet, please set an address first.');\n ^\n\nError: This contract object doesn't have address set yet, please set an address first.\n at Object.ContractNoAddressDefinedError (/var/lib/bootstrap/node_modules/web3-core-helpers/lib/errors.js:125:16)\n at Object._processExecuteArguments (/var/lib/bootstrap/node_modules/web3-eth-contract/lib/index.js:746:22)\n at Object._executeMethod (/var/lib/bootstrap/node_modules/web3-eth-contract/lib/index.js:762:68)\n at file:///var/lib/bootstrap/deploy-and-run.js:19:102\n\nNode.js v18.16.0", "stderr_lines": ["cat: genesis.json: No such file or directory", "npm WARN deprecated [email protected]: this library is no longer supported", "npm WARN deprecated [email protected]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.", "npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", "npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142", "npm WARN deprecated [email protected]: This module has been superseded by the multiformats module", "npm WARN deprecated [email protected]: This module has been superseded by the multiformats module", "npm WARN deprecated [email protected]: This module has been superseded by the multiformats module", "npm WARN deprecated [email protected]: This module has been superseded by the multiformats module", "npm WARN deprecated [email protected]: This module has been superseded by the multiformats module", "/var/lib/bootstrap/node_modules/web3-core-helpers/lib/errors.js:125", " return new Error('This contract object doesn\'t have address set yet, please set an address first.');", " ^", "", "Error: This contract object doesn't have address set yet, please set an address first.", " at Object.ContractNoAddressDefinedError (/var/lib/bootstrap/node_modules/web3-core-helpers/lib/errors.js:125:16)", " at Object._processExecuteArguments (/var/lib/bootstrap/node_modules/web3-eth-contract/lib/index.js:746:22)", " at Object._executeMethod (/var/lib/bootstrap/node_modules/web3-eth-contract/lib/index.js:762:68)", " at file:///var/lib/bootstrap/deploy-and-run.js:19:102", "", "Node.js v18.16.0"], "stdout": "\nadded 335 packages, and audited 336 packages in 7s\n\n53 packages are looking for funding\n run npm fund for details\n\n6 moderate severity vulnerabilities\n\nTo address all issues (including breaking changes), run:\n npm audit fix --force\n\nRun npm audit for details.", "stdout_lines": ["", "added 335 packages, and audited 336 packages in 7s", "", "53 packages are looking for funding", " run npm fund for details", "", "6 moderate severity vulnerabilities", "", "To address all issues (including breaking changes), run:", " npm audit fix --force", "", "Run npm audit for details."]}

@praetoriansentry
Copy link
Contributor

I think there are different issues going on for different people. I think it's best if in each case you destroy your current environment and do a full reprovision based on the latest code in main. The most common issue I've seen is that the bootstrap doesn't run properly either due to missing the --unlock flag when using cast or issues with funding on the root chain (especially when using Mumbai or some other testnet).

I would try pulling the latest code and resetting your environment.

@Gauravk0029
Copy link

@praetoriansentry Thanks for your update, i have setup the mumbai testnet branch and it's working fine. Now i will also try with main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants