Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Peer discovery issue - Error sending status request #8933

Closed
phahulin opened this issue Jun 20, 2018 · 12 comments
Closed

Peer discovery issue - Error sending status request #8933

phahulin opened this issue Jun 20, 2018 · 12 comments
Labels
F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust.
Milestone

Comments

@phahulin
Copy link
Contributor

I'm running:

  • Which Parity version?: 1.10.6
  • Which operating system?: Linux
  • How installed?: via binaries
  • Are you fully synchronized?: -
  • Which network are you connected to?: sokol
  • Did you try to restart the node?: yes

we run a poa-based network and I noticed that recently new nodes joining the network have very low peers count. This might be related to our security upgrade from 1.9.2 to 1.10.6.

"Old" nodes (the ones launched some time ago) maintain high peers count (30-40). However, when a new node joins the network peers count stays low (3-5). It appears that some of the old nodes no longer can be synced from while others still can, I don't see what differentiates them, all old nodes are in sync and look similar.

I did the following test: started parity locally on my laptop with correct genesis file but without any peers:

./parity --chain sokol-spec.json --jsonrpc-apis parity,parity_set --logging sync=trace,network=trace --base-path pdata 2>log.txt

Waited for 0/25 peers message to appear in logs. Then I added one of the old nodes as reserved peer

curl --data '{"method":"parity_addReservedPeer","params":["enode://0171db265a569636372566e86cb7a69306fe5c15a8e2ed5bed4010012fa1d146ae4918a688cf1bd3fd98e8c2d5c3705d68ff941c88ab974ff52c7fc8606ce2f8@1.2.3.4:30303"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
{"jsonrpc":"2.0","result":true,"id":1}

(I changed the IP address here for security purposes). And still there were 0/25 peers.
Here is the log, I see an error message

Error sending status request: Error(Expired, State { next_error: None, backtrace: None })
@Tbaut Tbaut added the Z7-duplicate 🖨 Issue is a duplicate. Closer should comment with a link to the duplicate. label Jun 20, 2018
@Tbaut Tbaut added this to the 1.12 milestone Jun 20, 2018
@Tbaut
Copy link
Contributor

Tbaut commented Jun 20, 2018

Duplicates #7531
Please run the node with --no-discovery or upgrade to 1.11.X

@Tbaut Tbaut closed this as completed Jun 20, 2018
@phahulin
Copy link
Contributor Author

I updated parity to 1.11.4 both locally and on the remote node, but get the same error. Here's the new log

@Tbaut Tbaut reopened this Jun 20, 2018
@Tbaut Tbaut removed the Z7-duplicate 🖨 Issue is a duplicate. Closer should comment with a link to the duplicate. label Jun 20, 2018
@roninkaizen
Copy link

as you open each node individually and delete the nodes.json from the chains directory
and recheck, it could work again,
-->tested in distributed ubuntu 18.04 environment with poa-standard.environment as discribed within the wiki with 4 nodes over 4 hours parallel connect to main.chain with version parity_1.10.7<--

@phahulin
Copy link
Contributor Author

phahulin commented Jun 21, 2018

I can't test it in full because I don't have access to majority of nodes of our network. I'm also not sure that deleting nodes.json files on old nodes is a good idea, since those might be the only correct ones.

I upgraded two nodes to 1.11.4. On one of these two, I completely deleted parity data folder (including nodes.json) and resynced it, with a fresh enode. It now only has a single peer, and it's not the second node.

It'd be good if someone could clarify what does this error (Error sending status request: Error(Expired,...) indicate, it's not clear for me from parity source code.

@Tbaut
Copy link
Contributor

Tbaut commented Jun 22, 2018

This Error appears here: https://github.com/paritytech/parity/blob/2060ea5de388f7b3b515ba5c2d58425585a8ac1e/ethcore/sync/src/chain/handler.rs#L128-L136

It actually looks like you have connectivity issues as it means that you'll disconnect from the peer. How many nodes do you have on the network?

@phahulin
Copy link
Contributor Author

phahulin commented Jun 22, 2018

In total there are about 60 nodes, we keep a list of 12 of them to use as --reserved-peers for new nodes joining the network and then it usually grows up to 30-40 peers.
I just checked that telnet on 30303 port works for all 12 nodes except 1, so seems like there are 11 available peers in the list.

@Tbaut Tbaut added F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M4-core ⛓ Core client code / Rust. labels Jun 22, 2018
@Tbaut
Copy link
Contributor

Tbaut commented Jun 22, 2018

It can take a while to connect to all nodes, but the reserved-peers should definitely connect quickly. Alternatively, you could try to sync with --reserved-only and check the logs to see what happens.

@phahulin
Copy link
Contributor Author

This is basically what it did - I started with 0 peers and add a single peer as reserved peer. Link to logs are above.

@Tbaut Tbaut changed the title Peer discovery issue Peer discovery issue - Error sending status request Jun 25, 2018
@5chdn 5chdn modified the milestones: 2.0, 2.1 Jul 17, 2018
@5chdn 5chdn modified the milestones: 2.1, 2.2 Sep 11, 2018
@5chdn 5chdn modified the milestones: 2.2, 2.3 Oct 29, 2018
@jam10o-new
Copy link
Contributor

Is this still an issue with the recent discovery fixes? @phahulin lmk if this still persists in the recent stable and you need this reopened

@jam10o-new jam10o-new added the Z3-stale 🍃 Issue is in principle valid, but it is not relevant anymore or can not reproduced. label Nov 8, 2018
@danihodovic
Copy link

danihodovic commented Jan 23, 2019

I'm seeing this issue on Parity nodes that have been restored from an S3 backup. The node connects to 1 out of 7 peers in total. These nodes only serve as API nodes for dApps and therefore have no credentials attached to them. We're running a proof-of-authority chain.

Procedure:

  1. Create a tarfile out of an entire Parity directory. Exclude:
  • /opt/parity/password.pwds
  • /opt/parity/network/key
  • /opt/parity/keys
  1. Save the tarfile to S3
  2. Boot a new Parity instance, copy the backup into /opt/parity and start Parity.

Parity version:

root@7fc47f247dcc:/opt/parity# /home/parity/bin/parity --version
Parity Ethereum
  version Parity-Ethereum/v2.2.7-stable-b00a21f-20190115/x86_64-linux-gnu/rustc1.31.1

Stacktrace:

2019-01-23 08:15:48 UTC IO Worker #1 DEBUG sync  25 -> Invalid packet 0
2019-01-23 08:15:48 UTC IO Worker #2 DEBUG sync  42 -> Invalid packet 0
2019-01-23 08:15:48 UTC IO Worker #1 DEBUG sync  33 -> Invalid packet 0
2019-01-23 08:15:48 UTC IO Worker #2 DEBUG sync  Error sending status request: Error(Expired, State { next_error: None, backtrace: InternalBacktrace { backtrace: Some(stack backtrace:
   0:     0x55ab294976dd - <no info>
   1:     0x55ab29496092 - <no info>
   2:     0x55ab2907d421 - <no info>
   3:     0x55ab2907d755 - <no info>
   4:     0x55ab289023c2 - <no info>
   5:     0x55ab2871adc8 - <no info>
   6:     0x55ab286f23ee - <no info>
   7:     0x55ab286f26ba - <no info>
   8:     0x55ab28676138 - <no info>
   9:     0x55ab286af94f - <no info>
  10:     0x55ab2868d076 - <no info>
  11:     0x55ab2868195b - <no info>
  12:     0x55ab286fd66f - <no info>
  13:     0x55ab2872464b - <no info>
  14:     0x55ab286e3966 - <no info>
  15:     0x55ab286e3bf6 - <no info>
  16:     0x55ab29521e79 - <no info>
  17:     0x55ab286ebd67 - <no info>
  18:     0x55ab2950c12d - <no info>
  19:     0x55ab294f6ce5 - <no info>
  20:     0x7f1949ea46b9 - <no info>
  21:     0x7f19499c441c - <no info>
  22:                0x0 - <no info>) } })

Config

[parity]
base_path = "/opt/parity"
chain = "chain.json"
mode = "active"

[footprint]
cache_size_db = 777
pruning = "fast"

[network]
nat = "extip:<ip>"
warp = false
reserved_peers = "reserved.txt"
min_peers = 3

[rpc]
apis = ["web3", "eth", "net", "parity"]
interface = "all"
cors = ["*"]

[websockets]
apis = ["web3", "eth", "pubsub", "net"]
interface = "all"
origins = ["all"]

[ipc]
disable = true

[misc]
logging = "own_tx=warn,sync=debug"

@jam10o-new jam10o-new added the F1-panic 🔨 The client panics and exits without proper error handling. label Jan 23, 2019
@jam10o-new jam10o-new removed F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. Z3-stale 🍃 Issue is in principle valid, but it is not relevant anymore or can not reproduced. labels Jan 23, 2019
@jam10o-new jam10o-new modified the milestones: 2.3, 2.4 Jan 23, 2019
@jam10o-new jam10o-new reopened this Jan 23, 2019
@danihodovic
Copy link

danihodovic commented Jan 23, 2019

Update 1:

It turns out that the network key which is responsible for generating the enode was the same as the one from the backed up node. Once I deleted it and it generated a new enode the peer count went up to 2. I'm not sure if that's related to this problem. However it doesn't go beyond 2 and the stacktrace is still being logged.

rm /opt/parity/network/key

Update 2:

I stopped Parity and deleted the below files. After that Parity immediately synced to the reserved peers.

  • /opt/parity/chains/<chain>/user_defaults
  • /opt/parity/chains/<chain>/network/nodes.json

The content of /opt/parity/chains/<chain>/user_defaults was

{"is_first_launch":false,"pruning":"fast","tracing":false,"fat_db":false,"mode":"active"}

@jam10o-new jam10o-new added F2-bug 🐞 The client fails to follow expected behavior. and removed F1-panic 🔨 The client panics and exits without proper error handling. labels Feb 4, 2019
@5chdn 5chdn modified the milestones: 2.4, 2.5 Feb 21, 2019
@soc1c soc1c modified the milestones: 2.5, 2.6 Apr 2, 2019
@ordian ordian modified the milestones: 2.6, 2.7 Jul 12, 2019
@adria0
Copy link

adria0 commented Jul 27, 2020

Closing issue due to its stale state.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

No branches or pull requests

9 participants