XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.5k stars 1.46k forks source link

ripple stop sync after run for a long time #2786

Closed lfj7282 closed 5 years ago

lfj7282 commented 5 years ago

Hi,i start my ripple server as a rpc. it work at begin. after a few days , i fund the ledger_version is not increase. the server_info is this: { "result" : { "info" : { "build_version" : "1.1.1", "complete_ledgers" : "42964104-43045772", "hostid" : "ripple-wallet-server", "io_latency_ms" : 1, "jq_trans_overflow" : "0", "last_close" : { "converge_time_s" : 2.002, "proposers" : 0 }, "load" : { "job_types" : [ { "in_progress" : 1, "job_type" : "clientCommand" } ], "threads" : 6 }, "load_factor" : 1, "peer_disconnects" : "165", "peer_disconnects_resources" : "1", "peers" : 0, "pubkey_node" : "n9M3tYxs3UV5DXyzv27fuw8rKqervTWQprk1H1crpW9snBG9jx6L", "pubkey_validator" : "none", "server_state" : "full", "state_accounting" : { "connected" : { "duration_us" : "128333797", "transitions" : 1 }, "disconnected" : { "duration_us" : "1572820", "transitions" : 1 }, "full" : { "duration_us" : "604436649439", "transitions" : 1 }, "syncing" : { "duration_us" : "5062124", "transitions" : 1 }, "tracking" : { "duration_us" : "2", "transitions" : 1 } }, "time" : "2018-Nov-22 03:53:50.578686", "uptime" : 604573, "validated_ledger" : { "age" : 409970, "base_fee_xrp" : 1e-05, "hash" : "4C0840DA99D09372FF9F3C27C467E3641338F3D30299A646F30AF2598EAB1B42", "reserve_base_xrp" : 20, "reserve_inc_xrp" : 5, "seq" : 43045772 }, "validation_quorum" : 19, "validator_list" : { "count" : 1, "expiration" : "2018-Nov-28 00:00:00.000000000", "status" : "active" } }, "status" : "success" } }

i guess the reason is no pees for connected at this moment. but it can ping r.ripple.com . i do not know the true reason ,who can help me? thanks! and my ripple.cfg [server] port_rpc_admin_local
port_peer

    [port_rpc_admin_local]
    port = 5005
    ip =127.0.0.1
    admin = 127.0.0.1
    protocol = http

    [port_peer]
    port = 51235
    ip = 0.0.0.0
    protocol = peer

    [node_size]
    medium
    [node_db]
    type=RocksDB
    path=/home/ripple/rippled/db/rocksdb
    online_delete=20000
    advisory_delete=0

    [database_path]
    #区块存储路径
    /home/ripple/rippled/db
    [debug_logfile]
    #日志
    /home/ripple/rippled/debug.log

    [sntp_servers]
    time.windows.com
    time.apple.com
    time.nist.gov
    pool.ntp.org    
    [ips]
    r.ripple.com 51235
    [validators_file]
    validators.txt
    [rpc_startup]
    { "command": "log_level", "severity": "warning" }
    [ssl_verify]
    1
ximinez commented 5 years ago

Yeah, the problem is definitely having 0 peers. If you monitor the output of the rippled peers command, do you see it making/accepting new connections? Does anything happen if you run rippled connect r.ripple.com 51235? Does the problem resolve itself if you restart rippled, and if so, does it recur?

Usually extended peer connection problems have something to do with local or upstream network behavior, but I don't think I've ever seen a node successfully connect, then lose all it's peers, and stay disconnected for any significant period of time.

lfj7282 commented 5 years ago

@ximinez first, thanks for your answer. i do not use the command "rippled connect",but i can ping the ip "r.ripple.com". it is ok when i restart rippled., but i lost my online ledgers for my project. i also think it can successfully connect by itself ,when my node lose all peers ,with the net is well. but it was not,i wait for two hours when i found my all peers losted, before i restart rippled server. unfortunate, i lost my debug.log file , so i do not know why? i will keep my eyes on my server .

ximinez commented 5 years ago

You're welcome. The reason I suggested rippled connect is to narrow down the problem to the network or rippled. Just because you can ping doesn't mean that the rippled port isn't being blocked somehow.

The good news is that if you were using a disk-backed node store (eg. RocksDB, NuDB), you haven't lost your ledger data. Rippled will first prioritize getting and staying in sync with the network, then backfilling the ledger store based on your configuration either from the network, or locally. This can be a slow process, because it's done in idle time, but if your node is healthy, it'll get there eventually.

I'm going to close this ticket since things seem to be working for you now, but feel free to re-open it if the problem recurs. (And if it does recur, try that rippled connect command before restarting.)

lfj7282 commented 5 years ago

@ximinez i did a test,the question occured again,In the past few hours. i do command network stop,wait for a while.the debug.log log this ......... 2018-Nov-28 06:48:10.850769375 Peer:WRN [14558] 34.239.128.122:51235 failed: No ping reply received 2018-Nov-28 06:48:10.895743621 Peer:WRN [15179] 54.203.128.96:51235 failed: No ping reply received 2018-Nov-28 06:48:10.985777512 Peer:WRN [13428] 52.79.141.73:51235 failed: No ping reply received 2018-Nov-28 06:48:11.401805716 Peer:WRN [15390] 184.72.137.59:51235 failed: No ping reply received 2018-Nov-28 06:48:12.845043999 Peer:WRN [15198] 45.56.78.201:51235 failed: No ping reply received 2018-Nov-28 06:48:13.266122821 Peer:WRN [13178] 54.212.236.161:51235 failed: No ping reply received 2018-Nov-28 06:48:13.266212157 Peer:WRN [11776] 52.78.78.122:51235 failed: No ping reply received 2018-Nov-28 06:48:13.284117472 Peer:WRN [14621] 54.218.44.232:51235 failed: No ping reply received 2018-Nov-28 06:48:14.513767615 Peer:WRN [15312] 54.202.12.93:51235 failed: No ping reply received 2018-Nov-28 06:48:16.326593637 Peer:WRN [15272] 54.203.8.192:51235 failed: No ping reply received 2018-Nov-28 06:49:19.717604920 ValidatorSite:WRN Problem retrieving from https://vl.ripple.com 2:Host not found (non-authoritative), try again later 2018-Nov-28 06:49:49.730999880 ValidatorSite:WRN Problem retrieving from https://vl.ripple.com 2:Host not found (non-authoritative), try again later 2018-Nov-28 06:50:19.732743378 ValidatorSite:WRN Problem retrieving from https://vl.ripple.com 2:Host not found (non-authoritative), try again later 2018-Nov-28 06:50:49.735231331 ValidatorSite:WRN Problem retrieving from https://vl.ripple.com 2:Host not found (non-authoritative), try again later

And then i do network start and rippled connect r.ripple.com 51235 the result "result" : { "message" : "connecting", "status" : "success" }

but the server_info command peers is still zero, and dubug.log is nothing increase.it seem the node nothing to do. this is some wrong with my node

lfj7282 commented 5 years ago

hi @ximinez . i guess the reason is my version have fault. i do the same test by another version "build_version" : "1.2.0-b5", it can keep try to connect per of 30s, and network start it can work well.

maybe the "build_version" : "1.1.1" have fault. you can test it to confirm.