`ethstats` plug-in fails with HTTP error 504 if not given full URI
See original GitHub issuetrinity
version:trinity-v0.1.0-alpha.16-15-g3eb6dc5d
(current master: commit 3eb6dc5d7e755ec96fc65df1833b9c3628990ab2)- OS: Arch Linux
- Python Version (python --version): 3.7.0
- Environment (output of
pip freeze
): MISSING
What is wrong?
PR #1336 squash-merged work from PR #1216, implementing the ethstats
plug-in.
I’ve tried it with an actual “secret token” I have for wss://ropsten-stats.parity.io/
, and there’s always a 504
when trying to connect via WebSocket:
ERROR 09-29 23:36:59 EthstatsService Unexpected error in <trinity.plugins.builtin.ethstats.ethstats_service.EthstatsService object at 0x7f4ac6dafa58>, exiting
Traceback (most recent call last):
File "/home/veox/src/py-evm/p2p/service.py", line 103, in run
await self._run()
File "/home/veox/src/py-evm/trinity/plugins/builtin/ethstats/ethstats_service.py", line 68, in _run
async with websockets.connect(self.server_url) as websocket:
File "/home/veox/src/py-evm/.virtualenv/py-evm/lib/python3.7/site-packages/websockets/py35/client.py", line 2, in __aenter__
return await self
File "/home/veox/src/py-evm/.virtualenv/py-evm/lib/python3.7/site-packages/websockets/py35/client.py", line 19, in __await_impl__
extra_headers=protocol.extra_headers,
File "/home/veox/src/py-evm/.virtualenv/py-evm/lib/python3.7/site-packages/websockets/client.py", line 263, in handshake
raise InvalidStatusCode(status_code)
websockets.exceptions.InvalidStatusCode: Status code not 101: 504
Traceback (most recent call last):
File "/home/veox/src/py-evm/p2p/service.py", line 103, in run
await self._run()
File "/home/veox/src/py-evm/trinity/plugins/builtin/ethstats/ethstats_service.py", line 68, in _run
async with websockets.connect(self.server_url) as websocket:
File "/home/veox/src/py-evm/.virtualenv/py-evm/lib/python3.7/site-packages/websockets/py35/client.py", line 2, in __aenter__
return await self
File "/home/veox/src/py-evm/.virtualenv/py-evm/lib/python3.7/site-packages/websockets/py35/client.py", line 19, in __await_impl__
extra_headers=protocol.extra_headers,
File "/home/veox/src/py-evm/.virtualenv/py-evm/lib/python3.7/site-packages/websockets/client.py", line 263, in handshake
raise InvalidStatusCode(status_code)
websockets.exceptions.InvalidStatusCode: Status code not 101: 504
EDIT: As a sanity check, I’ve tried with my previous setup of jsonrpcproxy
+eth-net-intelligence-api
, and it still works. So the URL/secret are correct.
How can it be fixed
See comment.
Either:
- add
api
to the URL in the plug-in ourselves; or - instruct the user (in docs?) to specify the full endpoint path
and rename “URL” to “URI”.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
How to Fix the 504 Gateway Timeout Error on Your Site - Kinsta
The 504 (Gateway Timeout) status code indicates that the server, while acting as a gateway or proxy, did not receive a timely response...
Read more >504 Gateway Timeout - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 504 Gateway Timeout server error response code indicates that the server, while acting as a gateway ...
Read more >How to Fix 504 Gateway Timeout Error: 10 Reliable Solutions
504 gateway timeout is one of the most common errors you may encounter. Learn about it in this guide, including troubleshooting tips.
Read more >504 Gateway Timeout from Backend Server | Apigee Edge
This error response indicates that the client did not receive a timely response from Apigee Edge or the backend server during the execution...
Read more >What is a 504 Gateway Timeout error, and how to fix it?
The 504 (Gateway Timeout) status code indicates that the server while acting as a gateway or proxy, did not receive a timely response...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Also, I think that we can auto select a default for the URI if the node is running against ropsten/mainnet or really any network ID for which we know the right default URI.
Tried to test this with SSL enabled, but it works for me.
@veox BTW, if you pass
wss://ropsten-stats.parity.io/
as server URL, can you please try passingwss://ropsten-stats.parity.io/api
, as that is endpoint clients should connect to.