Open drewstone opened 5 years ago
Did you do any offchain http requests?
The error comes from ws-rs
crate, so it's also related to the weboscket server as #3124. I'd be in favour of merging the two issues.
Is:
Encountered an error: Unable to parse HTTP: Invalid byte where token is required.
Enable a logger to see more information.
the last log line that was printed? It seems that it was printed earlier as well and it didn't really cause any issues.
Again to fully analyze what's going on having a full log running with -lws=trace,rpc=trace
would be really helpful.
Getting the same by trying to connect a the polkadot UI to a remote subtrate node
2019-09-19 09:47:02.964 tokio-runtime-worker-2 INFO substrate Idle (1 peers), best: #0 (0x6963…8cb9), finalized #0 (0x6963…8cb9), ⬇ 0 ⬆ 0
2019-09-19 09:47:03.763 TRACE ws::io Processing 1 events
2019-09-19 09:47:03.764 INFO ws::io Accepted a new tcp connection from 87.xxx.xxx.30:35412.
2019-09-19 09:47:03.765 TRACE ws::io Active connections 1
2019-09-19 09:47:03.765 TRACE ws::io Waiting for event
2019-09-19 09:47:03.765 TRACE ws::io Processing 1 events
2019-09-19 09:47:03.765 TRACE ws::connection Ready to read handshake from 87.xxx.xxx.30:35412.
2019-09-19 09:47:03.765 TRACE ws::io Encountered error while reading: Unable to parse HTTP: Invalid byte where token is required.
2019-09-19 09:47:03.765 ERROR ws::handler WS Error <Http(Token)>: Invalid byte where token is required.
2019-09-19 09:47:03.765 TRACE ws::io Scheduling connection to 87.xxx.xxx.30:35412 as Writable
2019-09-19 09:47:03.765 TRACE ws::io Active connections 1
2019-09-19 09:47:03.765 TRACE ws::io Waiting for event
2019-09-19 09:47:03.765 TRACE ws::io Processing 1 events
2019-09-19 09:47:03.765 TRACE ws::connection Ready to write handshake to 87.xxx.xxx.30:35412.
2019-09-19 09:47:03.766 TRACE ws::connection Finished writing handshake response to 87.xxx.xxx.30:35412
2019-09-19 09:47:03.766 DEBUG ws::io WebSocket connection to 87.xxx.xxx.30:35412 disconnected.
2019-09-19 09:47:03.766 TRACE ws::io Active connections 0
2019-09-19 09:47:03.766 TRACE ws::io Waiting for event
can't comment on the node sync part. I'm running with --ws-external
what kind of token is required?
edit: it's also not working with a local node, setting https://polkadot.js.org/apps/#/settings to
wss://127.0.0.1:9944/
Tested with https://github.com/dothereum/dothereum @ 35138d4
Based on Substrate master @ 5a2be8bd56ed5d9dc787fb3b9a76ce10ced4704b
@soc1c What do you mean by "the same"? Does the node crash, stop operating, etc? Is the Waiting for event
the last line that ever get's printed?
The errors in logs just indicate that an invalid http request has been send to the server, as you can see it just disconnected the client that sent this and it should be operating normally. --ws-external
maybe the reason why you get such invalid http request - most likely just some automated scanner.
@soc1c What do you mean by "the same"? Does the node crash, stop operating, etc? Is the
Waiting for event
the last line that ever get's printed?
No, the node is not crashing or freezing. The Waiting for event line gets printed.
Does this mean I misconfigured the node? Sorry, I just jumped on this ticket because the first error message is the same...
The errors in logs just indicate that an invalid http request has been send to the server, as you can see it just disconnected the client that sent this and it should be operating normally.
--ws-external
maybe the reason why you get such invalid http request - most likely just some automated scanner.
Ok, the message coincides with starting the polkadot ui connection to the node in question and stops when I shut down polkadot ui. As I mentioned, this also happens on a local node without exposing websockets to external addresses.
Maybe this is a polkadot-js/apps issue? @jacogr
Your issue for local is here - wss://127.0.0.1:9944/
- local is certainly not a secure connection. The node has no certificates.
If you want certs, put it behind an nginx proxy.
@soc1c Does the node continue to operate (i.e. import blocks, etc) or is the waiting
thing the last thing you ever see.
Since indeed the wss is not supported, but it shouldn't break node operations under any circumstances.
Ah, perfect! So my comments are off-topic. Thanks
Another odd behavior of a node pegged against master from July 14th. In the middle of syncing, the following error finally drops syncing and drops the node from telemetry. The program doesn't crash but instead begins eating up most of the CPU power as well.