MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.87k stars 4.85k forks source link

MetaMask clocks while connecting to CustomRPC network #5947

Closed Jagdish0886 closed 5 years ago

Jagdish0886 commented 5 years ago

I am trying to connect to the ethereum network hosted on my EC2 instance.

I am able to telnet to the EC2insatnce from my local machine. However, while trying to connect to the Custom RPC network from metamask i get below errors and MetaMask screen keeps clocking:

I have used git, go-ethereum, go lang softwares.

I HAVEN'T used ganache tool on the server, do we need ganache tool to be able to connect??

***Error****

Failed to load resource: net::ERR_CONNECTION_REFUSED background.js:1 Error: PollingBlockTracker - encountered an error while attempting to update latest block: Error: JsonRpcEngine - response has no error or result for request: { "id": 249230732874046, "jsonrpc": "2.0", "params": [], "method": "eth_blockNumber" } at background.js:1 at n (background.js:1) at i (background.js:1) at background.js:1 at background.js:1 at background.js:1 at background.js:1 at c (background.js:1) at s (background.js:1) at background.js:1 at background.js:1 at background.js:1 at background.js:1 at background.js:1 at m.run (background.js:1) at p (background.js:1) at t.exports._performSync (background.js:1) 6 ...:8545/:1 Failed to load resource: net::ERR_CONNECTION_REFUSED background.js:1 Uncaught (in promise) Error: JsonRpcEngine - response has no error or result for request: { "id": 249230732874019, "jsonrpc": "2.0", "params": [ "0x83d3552c9ca8cfde050f4bb8264ae4923bce3f28", "0x69731f" ], "method": "eth_getBalance" } at background.js:1 at n (background.js:1) at i (background.js:1) at background.js:1 at background.js:1 at background.js:1 at background.js:1 at c (background.js:1) at s (background.js:1) at background.js:1 at background.js:1 at background.js:1 at background.js:1 at c (background.js:1) at s (background.js:1) at background.js:1 at background.js:1 at background.js:1 at m.run (background.js:1) at p (background.js:1) background.js:1 Error in RPC response:

Object error: {code: -32603, message: "Error: JsonRpcEngine - response has no error or re…eogaeaoehlefnkodbefgpgknn/background.js:1:734447)"} id: 7518591407585163 jsonrpc: "2.0" proto: Object

danfinlay commented 5 years ago

The connection refused error means metamask is getting connections refused from the target port. Are you able to connect to it using curl?

Jagdish0886 commented 5 years ago

Thank you Dan,

Curl is not working on the server. I am getting below error curl http://**.**.**.**:30303 curl: (52) Empty reply from server

However, i see the CPU utilization on the server is normal, SWAP space is zero, but the RAM available is just only 86 MB. Based on my further investigation, is the low RAM causing the error? Please guide

Regards, Jagdish

Jagdish0886 commented 5 years ago

I think less RAM shouldnt be a problem, I cleared RAM upto 600MB. Also, CURL commands are working for google and other websites. The curl is not working for this particular server and port, it looks something to deal with ethereum network application configuration. Can you please guide, what other possible troubleshooting steps i can follow.

Jagdish0886 commented 5 years ago

The issue is solved for me. The reason was simple, i was trying to connect with my private network on port 30303, which is P2P port on ethereum netwrok. I connected to the Private network using the 8545, which is RPC port. And I made it sure that the service on port 8545 is running on the server, and we are able to telnet to the server and port remotely.