XRPLF / rippled

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

After restart rippled, the server show InsufficientNetworkMode, why network not synced? #2332

Closed passionofvc closed 6 years ago

passionofvc commented 6 years ago

I have run rippled in testnet for 3 weeks with no problem , but after restart rippled today, it show InsufficientNetworkMode, I check that the peer is connected, and the rippled use half of memory.

2280

[ripple@Paci-RIPPLE-DEV build]$ /home/ripple/build/rippled --conf=/home/ripple/build/cfg/stg/rippled.cfg account_info rsK2DRGED8RDmPaeZW4MQHxkabEj9hji8u
Loading: "/home/ripple/build/cfg/stg/rippled.cfg"
2018-Jan-15 06:50:31 HTTPClient:NFO Connecting to 127.0.0.1:5005

{
   "result" : {
      "error" : "noNetwork",
      "error_code" : 17,
      "error_message" : "InsufficientNetworkMode",
      "request" : {
         "account" : "rsK2DRGED8RDmPaeZW4MQHxkabEj9hji8u",
         "command" : "account_info"
      },
      "status" : "error"
   }
}

[ripple@Paci-RIPPLE-DEV build]$ /home/ripple/build/rippled --conf=/home/ripple/build/cfg/stg/rippled.cfg server_info
Loading: "/home/ripple/build/cfg/stg/rippled.cfg"
2018-Jan-15 06:51:07 HTTPClient:NFO Connecting to 127.0.0.1:5005

{
   "result" : {
      "info" : {
         "build_version" : "0.90.0-b2",
         "closed_ledger" : {
            "age" : 7,
            "base_fee_xrp" : 1e-05,
            "hash" : "784D5895F73057B32C4AA0DEBA16F2563FBD1A45192EA283C3B34124BEB5E71C",
            "reserve_base_xrp" : 20,
            "reserve_inc_xrp" : 5,
            "seq" : 5857592
         },
         "complete_ledgers" : "empty",
         "fetch_pack" : 16,
         "hostid" : "Paci-RIPPLE-DEV",
         "io_latency_ms" : 1,
         "last_close" : {
            "converge_time_s" : 1.999,
            "proposers" : 0
         },
         "load" : {
            "job_types" : [
               {
                  "job_type" : "untrustedValidation",
                  "per_second" : 1
               },
               {
                  "job_type" : "untrustedProposal",
                  "per_second" : 31
               },
               {
                  "avg_time" : 6,
                  "job_type" : "ledgerData",
                  "peak_time" : 188,
                  "per_second" : 3
               },
               {
                  "in_progress" : 1,
                  "job_type" : "clientCommand"
               },
               {
                  "job_type" : "writeObjects",
                  "per_second" : 118
               },
               {
                  "job_type" : "peerCommand",
                  "per_second" : 342
               },
               {
                  "job_type" : "SyncReadNode",
                  "per_second" : 338
               },
               {
                  "job_type" : "AsyncReadNode",
                  "per_second" : 2464
               },
               {
                  "job_type" : "WriteNode",
                  "per_second" : 276
               }
            ],
            "threads" : 16
         },
         "load_factor" : 1,
         "peers" : 10,
         "pubkey_node" : "n9LnwURHfsUFdMVKCdzAnTcoo5gCamEdvjCNJvtUZWzKoKyp4HEr",
         "pubkey_validator" : "none",
         "published_ledger" : "none",
         "server_state" : "connected",
         "state_accounting" : {
            "connected" : {
               "duration_us" : "2165121769",
               "transitions" : 2
            },
            "disconnected" : {
               "duration_us" : "1497681",
               "transitions" : 1
            },
            "full" : {
               "duration_us" : "60023306",
               "transitions" : 1
            },
            "syncing" : {
               "duration_us" : "0",
               "transitions" : 0
            },
            "tracking" : {
               "duration_us" : "63",
               "transitions" : 1
            }
         },
         "uptime" : 2227,
         "validation_quorum" : 3,
         "validator_list_expires" : "never"
      },
      "status" : "success"
   }
}

Every 2.0s: /home/ripple/build/rippled --conf=/home/ripple/build/cfg/stg/rippled.cfg server_info | egrep 'load_|complete|peers|status...  Mon Jan 15 15:51:47 2018

Loading: "/home/ripple/build/cfg/stg/rippled.cfg"
2018-Jan-15 06:51:48 HTTPClient:NFO Connecting to 127.0.0.1:5005

         "complete_ledgers" : "empty",
         "load_factor" : 1,
         "peers" : 10,
         "server_state" : "connected",
         "uptime" : 2267,
         "status" : "success"

htop-rippled

passionofvc commented 6 years ago
It only has below error,
the [PeerFinder] seems in loop on connecting to peers.
$ grep ERR debug_stg.log
2018-Jan-15 04:46:49 Application:ERR Waiting for 'Overlay' to stop

2018-Jan-15 07:25:42 PeerFinder:NFO Bootcache connect 198.11.206.4:51235 with 1 success
2018-Jan-15 07:25:42 PeerFinder:NFO Bootcache connect 34.227.191.219:51235 with 1 success
2018-Jan-15 07:25:42 PeerFinder:NFO Bootcache connect 34.239.128.122:51235 with 1 success
2018-Jan-15 07:25:42 PeerFinder:NFO Bootcache connect 54.200.82.201:51235 with 1 success
2018-Jan-15 07:25:42 PeerFinder:NFO Bootcache connect 54.212.236.161:51235 with 1 success
2018-Jan-15 07:25:43 PeerFinder:NFO Bootcache connect 184.173.45.36:51235 with 1 success
2018-Jan-15 07:25:43 PeerFinder:NFO Bootcache connect 54.86.175.122:51235 with 1 success
2018-Jan-15 07:25:43 PeerFinder:NFO Bootcache connect 34.201.59.230:51235 with 1 success

grep "PeerFinder:NFO Bootcache connect" debug_stg.log  | awk '{print $6}' | sort | uniq -c | sort -r
     44 50.22.123.215:51235
     43 54.202.12.93:51235
     43 54.172.76.54:51235
     42 54.213.156.82:51235
     42 54.200.82.201:51235
     42 34.201.63.178:51235
     42 174.37.225.41:51235
     42 169.55.164.29:51235
     42 169.54.2.157:51235
     41 54.244.69.36:51235
     41 54.203.128.96:51235
     41 54.202.39.36:51235
     41 52.90.101.104:51235
     41 34.239.120.20:51235
     41 34.229.128.152:51235
     41 34.224.89.120:51235
     41 34.203.40.35:51235
     41 184.72.137.59:51235
     41 169.55.164.21:51235
     41 169.55.164.20:51235
     41 169.54.2.154:51235
     40 54.245.168.196:51235
     40 54.218.44.232:51235
     40 54.186.73.52:51235
     40 52.90.42.69:51235
     40 34.227.191.219:51235
     40 34.213.185.56:51235
     40 34.201.59.230:51235
     40 34.201.105.122:51235
     40 184.173.45.62:51235
     40 174.37.225.45:51235
JoelKatz commented 6 years ago

I wonder if it's some issue with your UNL (list of validators). I don't see any trusted validations or proposals being received.

passionofvc commented 6 years ago

hi @JoelKatz The rippled.cfg setting is below. I connect these 52.11.28.194 51235 54.94.245.104 51235 54.201.240.60 51235 54.238.143.216 51235 would you mean my UNL not trust the rippled?

[server]
 port_rpc_admin_local
 port_peer
 port_ws_admin_local

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

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

 [port_ws_admin_local]
 port = 6006
 ip = 127.0.0.1
 admin = 127.0.0.1
 protocol = ws

 [port_ws_public]
 port = 5006
 ip = 127.0.0.1
 protocol = wss

 #-------------------------------------------------------------------------------
 [node_size]
 medium

 [ledger_history]
 2000
 [node_db]
 type=RocksDB
 path=/home/ripple/build/db_stg/rocksdb
 open_files=2000
 filter_bits=12
 cache_mb=256
 file_size_mb=8
 file_size_mult=2
 online_delete=2000
 advisory_delete=0

 [database_path]
 /home/ripple/build/db_stg

 # This needs to be an absolute directory reference, not a relative one.
 # Modify this value as required.
 [debug_logfile]
 /home/ripple/build/debug_stg.log
[sntp_servers]
 time.windows.com
 time.apple.com
 time.nist.gov
 pool.ntp.org

 # Where to find some other servers speaking the Ripple protocol.
 #
 [ips]
 #r.ripple.com 51235
 52.11.28.194 51235
 54.94.245.104 51235
 54.201.240.60 51235
 54.238.143.216 51235

 # File containing trusted validator keys or validator list publishers.
 # Unless an absolute path is specified, it will be considered relative to the
 # folder in which the rippled.cfg file is located.
 [validators_file]
 validators.txt

 # Turn down default logging to save disk space in the long run.
 # Valid values here are trace, debug, info, warning, error, and fatal
 [rpc_startup]
 { "command": "log_level", "severity": "info" }

 # If ssl_verify is 1, certificates will be validated.
 # To allow the use of self-signed certificates for development or internal use,
 # set to ssl_verify to 0.
 [ssl_verify]
 1

$ /home/ripple/build/rippled --conf=/home/ripple/build/cfg/stg/rippled.cfg peers


{
   "result" : {
      "cluster" : {},
      "peers" : [
         {
            "address" : "198.11.206.26:51235",
            "complete_ledgers" : "35839767 - 35840023",
            "ledger" : "DB5E53D479C7D41F4234E5DD1C9B8250D33F8CD18AC59C52FEF1D65D5596B91C",
            "load" : 6,
            "public_key" : "n9LieQkojpM1wsqman9d8jxVXrLxRh8RAmwv5rDvC5ea3kxnEVUn",
            "sanity" : "unknown",
            "uptime" : 3,
            "version" : "rippled-0.81.0"
         },
         {
            "address" : "54.190.54.141:51235",
            "complete_ledgers" : "35839767 - 35840023",
            "latency" : 1072,
            "ledger" : "DB5E53D479C7D41F4234E5DD1C9B8250D33F8CD18AC59C52FEF1D65D5596B91C",
            "load" : 92,
            "public_key" : "n94fczGiPmk6rdTmhUepW42shxEMFY7RsBwSPjYxyqUJCTcehkKV",
            "sanity" : "unknown",
            "uptime" : 132,
            "version" : "rippled-0.81.0"
         },
         {
            "address" : "54.186.248.91:51235",
            "complete_ledgers" : "35838992 - 35840015",
            "latency" : 16000,
            "ledger" : "90256B0BE398463A866E3EE74032D526766EE421828D9C643BAEE1EBB8210AB2",
            "load" : 54,
            "public_key" : "n9MT5EjnV912KGuBUqPs4tpdhzMPGcnDBrTuWkD9sWQHJ1kDcUcz",
            "sanity" : "unknown",
            "uptime" : 213,
            "version" : "rippled-0.81.0"
         },
         {
            "address" : "162.236.15.109:51301",
            "complete_ledgers" : "30363472 - 35840010",
            "latency" : 32000,
            "ledger" : "56ED7E963798E1E837967A1347629DB82AA5DF7BB596ADBAB3FE39DF44CB73F7",
            "load" : 26,
            "public_key" : "n9Luhcfuqk6YvtkANfjSXmXfKA5d7cYXRkLWpUHLDStBCBxeJQJi",
            "sanity" : "unknown",
            "uptime" : 213,
            "version" : "rippled-0.90.0-b2"
         },
         {
            "address" : "169.54.137.7:51235",
            "complete_ledgers" : "35839767 - 35840023",
            "latency" : 7713,
            "ledger" : "DB5E53D479C7D41F4234E5DD1C9B8250D33F8CD18AC59C52FEF1D65D5596B91C",
            "load" : 111,
            "public_key" : "n9Mdk7abYaVvded5zic9oDEY3NULv9RmeJ9Z5hgjXX1ycZqAGhTn",
            "sanity" : "unknown",
            "uptime" : 213,
            "version" : "rippled-0.81.0"
         },
         {
            "address" : "169.55.164.25:51235",
            "complete_ledgers" : "35839766 - 35840022",
            "latency" : 4040,
            "ledger" : "54CA683698E22CC2B30215397D5EBC91356F334A6DAB98B4CACF2BEADFD7C7A3",
            "load" : 49,
            "public_key" : "n9MVtD55afcuW1Ry9UF72LpNcdogDQug4RxjJ4EXn1watCo7WiAE",
            "sanity" : "unknown",
            "uptime" : 44,
            "version" : "rippled-0.81.0"
         },
         {
            "address" : "34.213.185.56:51235",
            "complete_ledgers" : "35839760 - 35840016",
            "latency" : 16000,
            "ledger" : "90256B0BE398463A866E3EE74032D526766EE421828D9C643BAEE1EBB8210AB2",
            "load" : 28,
            "public_key" : "n9LDPTEri5YY1cnPZ9GSrXziR2dTCgPvSGEby23iFU1Zb1J4YdBa",
            "sanity" : "unknown",
            "uptime" : 68,
            "version" : "rippled-0.81.0"
         },
         {
            "address" : "198.11.206.6:51235",
            "complete_ledgers" : "35839766 - 35840022",
            "latency" : 4484,
            "ledger" : "54CA683698E22CC2B30215397D5EBC91356F334A6DAB98B4CACF2BEADFD7C7A3",
            "load" : 91,
            "public_key" : "n9MGChK9EgiCBM6s15EwF9d6m4LWZHh1UnJcgr16kQr4xBpx71fS",
            "sanity" : "unknown",
            "uptime" : 213,
            "version" : "rippled-0.81.0"
         },
         {
            "address" : "52.79.141.73:51235",
            "latency" : 2080,
            "load" : 62,
            "public_key" : "n9LUbkhmeD75nTea8kLERJteK53R4ZG9X89dFLHazGCTQYXwXSZp",
            "sanity" : "unknown",
            "uptime" : 214,
            "version" : "rippled-0.81.0"
         },
         {
            "address" : "52.78.78.122:51235",
            "complete_ledgers" : "35740022 - 35840022",
            "latency" : 1765,
            "ledger" : "54CA683698E22CC2B30215397D5EBC91356F334A6DAB98B4CACF2BEADFD7C7A3",
            "load" : 80,
            "public_key" : "n9KybMFrer7erpQDh58epdQkQga3pSaVYhD855h4gTkHtMUGVMx2",
            "sanity" : "unknown",
            "uptime" : 214,
            "version" : "rippled-0.81.0"
         }
      ],
      "status" : "success"
   }
}
MarkusTeufelberger commented 6 years ago

Testnet nodes are not very common, you are mostly connected to mainnet ones. Maybe that's the issue?

passionofvc commented 6 years ago

@MarkusTeufelberger thanks.

my validators.txt is below, I don't think the rippled connect to mainnet. I have check the cfg, and the setting is [nHUhG1PgAG8H8myUENypM35JgfqXAKNQvRVVAFDRzJrny5eZN8d5 nHBu9PTL9dn2GuZtdW4U2WzBwffyX9qsQCd9CNU4Z5YG3PQfViM8 nHUPDdcdb2Y5DZAJne4c2iabFuAP3F34xZUgYQT2NH7qfkdapgnz nHB1X37qrniVugfQcuBTAjswphC1drx7QjFFojJPZwKHHnt8kU7v nHUkAWDR4cB8AgPg7VXMX6et8xRTQb2KJfgv1aBEXozwrawRKgMB ] for testnet. but the peer command show mainnet [n9Mdk7abYaVvded5zic9oDEY3NULv9RmeJ9Z5hgjXX1ycZqAGhTn] output this is very odd!


the  rippled run [/home/ripple/build/rippled --conf=/home/ripple/build/cfg/stg/rippled.cfg]

[ripple@Paci-RIPPLE-DEV build]$ ls  -ltr /home/ripple/build/cfg/stg/
合計 44
-rw-rw-r--. 1 ripple ripple 37254  1月 15 13:44 rippled.cfg
-rw-rw-r--. 1 ripple ripple  1758  1月 15 19:55 validators.txt
[ripple@Paci-RIPPLE-DEV build]$ cat  /home/ripple/build/cfg/stg/validators.txt
# Public keys of the validators that this rippled instance trusts.
[validators]
nHUhG1PgAG8H8myUENypM35JgfqXAKNQvRVVAFDRzJrny5eZN8d5
nHBu9PTL9dn2GuZtdW4U2WzBwffyX9qsQCd9CNU4Z5YG3PQfViM8
nHUPDdcdb2Y5DZAJne4c2iabFuAP3F34xZUgYQT2NH7qfkdapgnz
nHB1X37qrniVugfQcuBTAjswphC1drx7QjFFojJPZwKHHnt8kU7v
nHUkAWDR4cB8AgPg7VXMX6et8xRTQb2KJfgv1aBEXozwrawRKgMB
wilsonianb commented 6 years ago

Hi @passionofvc

Here are latest config options to use Ripple-operated testnet nodes:

rippled.cfg

[ips]
r.altnet.rippletest.net 51235

validators.txt

[validator_list_sites]
https://vl.altnet.rippletest.net

[validator_list_keys]
ED264807102805220DA0F312E71FC2C69E1552C9C5790F6C25E3729DEB573D5860
passionofvc commented 6 years ago

@wilsonianb very thanks it's work!, I will try to commit testnet config in ripple repository https://github.com/ripple/rippled/tree/develop/doc/testnet.

gituser commented 6 years ago

had exactly same issue this morning, really need better documentation on how-to run your own testnet node somewhere

Vivek-Patil commented 6 years ago

@passionofvc @wilsonianb I changed my rippled.cfg and replaced ips and validators.txt file as above.


https://vl.altnet.rippletest.net

[validator_list_keys]
ED264807102805220DA0F312E71FC2C69E1552C9C5790F6C25E3729DEB573D5860```

Even now i get `InsufficientNetworkMode` error. In the server logs i keep getting
```NetworkOPs:WRN We are not running on the consensus ledger
2018-Mar-21 09:14:04 ValidatorList:WRN New quorum of 18446744073709551615 exceeds the number of trusted validators (0)
2018-Mar-21 09:14:04 LedgerConsensus:WRN Need consensus ledger FA31855EDCAEAEF17B367E7A7728307E94ABAC15E065707037394A925178DEEE
2018-Mar-21 09:14:05 LedgerConsensus:WRN View of consensus changed during open status=open,  mode=wrongLedger```

Can you help me with this ?
passionofvc commented 6 years ago

hi @Vivek-Patil you may to check your network bandwidth, disk, under some slow network condition(or slow IOPS), the ripple daemon may report [InsufficientNetworkMode] or [noNetworkError].

bachase commented 6 years ago

Also, check out https://ripple.com/build/rippled-setup/ which has more details on recommended system requirements for running rippled.

JJNET commented 6 years ago

hi @bachase I read & check https://ripple.com/build/rippled-setup/ already. But I cannot understand validators architecture till now. That is very different point with other cryptocurrency like Bitcoin, Ehtereum..etc. And I am very confusing what is current correct testnet url & port. @wilsonianb said : r.altnet.rippletest.net 51235 But https://ripple.com/build/xrp-test-net/ said : https://s.altnet.rippletest.net:51234

I met [InsufficientNetworkMode] or [noNetworkError]. like @Vivek-Patil also. How can I solve this problem? Do I have to do domain verification mentioned at this link https://ripple.com/build/rippled-setup/#domain-verification ?

Vivek-Patil commented 6 years ago

Hey @passionofvc . I have spinned up an Ec2 instance with 16GB of RAM and 100 GB disk. I have started the sync for testnet since last 2 hours.I neither see any disk space utilization nor increase in CPU usage.I have changed teh rippled.cfg as stated above and validators.txt. When I check the server_info RPC command the server_state still shows as connected.In the logs i keep getting

2018-Mar-22 07:47:53 NetworkOPs:WRN We are not running on the consensus ledger 2018-Mar-22 07:47:53 ValidatorList:WRN New quorum of 18446744073709551615 exceeds the number of trusted validators (0) 2018-Mar-22 07:47:53 LedgerConsensus:WRN Need consensus ledger DF8F481E5669EC3B95205F68CDA9D0F6F126C1A821F8F98CCE72731DC0ABD26F 2018-Mar-22 07:47:54 LedgerConsensus:WRN View of consensus changed during open status=open, mode=wrongLedger 2018-Mar-22 07:47:54 LedgerConsensus:WRN DF8F481E5669EC3B95205F68CDA9D0F6F126C1A821F8F98CCE72731DC0ABD26F to A0CA222B3AC2C9D5B7B62BC138ADA4BA4E84B7A0DFB193712EBDFA455A724ACE 2018-Mar-22 07:47:54 LedgerConsensus:WRN {"accepted":true,"account_hash":"15048836A2F95EF428DCEF253517618B59E2112636D92F1632198E52A7D8E23C","close_flags":0,"close_time":575020070,"close_time_human":"2018-Mar-22 07:47:50","close_time_resolution":10,"closed":true,"hash":"A0CA222B3AC2C9D5B7B62BC138ADA4BA4E84B7A0DFB193712EBDFA455A724ACE","ledger_hash":"A0CA222B3AC2C9D5B7B62BC138ADA4BA4E84B7A0DFB193712EBDFA455A724ACE","ledger_index":"7684366","parent_close_time":575020050,"parent_hash":"20E53C9D10CE77E31E62D40806D83571882018317DFE2C9302306907A8612B4E","seqNum":"7684366","totalCoins":"99997208499433762","total_coins":"99997208499433762","transaction_hash":"0000000000000000000000000000000000000000000000000000000000000000"}

I have been struggling to get this up. Do you see any issue here in any of my configuration? How much time it takes to sync the ripple testnet ? Still when I make an account_info RPC call, it shows me as InsufficientNetworkMode. I have given more then the resources it needs now IMO. Your help will be truly appreciated

Thanks Vivek

JJNET commented 6 years ago

Hello, @Vivek-Patil

I solved same problem with updating rippled. Follow as this

  1. update rippled to 0.90

    $ sudo rpm -Uvh --replacepkgs https://mirrors.ripple.com/ripple-repo-el7.rpm $ yumdownloader --enablerepo=ripple-stable --releasever=el7 rippled $ rpm -K rippled.rpm $ sudo alien -i --scripts rippled.rpm $ sudo systemctl daemon-reload $ sudo service rippled restart

  2. Insert validate Token at rippled.cfg

[validator_token] eyJtYW5pZNUYWtkRzJ0TGppcVBGdEd5cFRTZG9UNHlL cEZ3Mmk5eFFDd0hEWE1oQWhnZFVXcE0rZ0FjbGxJSUY4TXVldkJjVUpRSGI2VHRSMkdmNXBt ZjVoeUFkOW9mRXFhSGRlb0hwTnI0RytyZjE0V21kbnhu eEhlQWlCenA2RkNzUlhpUU1FRFZ1VjQvd1NlTUROY3Nta1hTNXpSd0MyVExEQUNIbkFTUUN4 OXcwWGs4NjdRUk5HZmsveWxSdllVM0l2N25wTjlhalBVMmdTYzZObGVYcFVobGE0a3h4ZFpP eUZH*****k01VEFBPSIsInZhbGlkYXRpb25fc2VjcmV0X2tl eSI6IjU2QjY5NzY4NTdCMTc3Njc5MkQ0QThDOERDMEU5NUM0MjhDNDA2RDgwNURCMjZCRUY2 MDJBODRDRDNBQjY0RjAifQ==

Then, InsufficientNetworkMode was removed. But "Account not found error" is remained til now. so I have to solve that problem. :-) (rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh genesis account is successfully returned.)

JJNET commented 6 years ago

Account not found error caused from 20XRP maybe according to the explanation below https://forum.ripple.com/viewtopic.php?f=2&t=16218 (I think it's a message too shabby compared to the importance of the error)

But how can I send testnet 20XRP coins to my address? => success!

bachase commented 6 years ago

@JJNET

And I am very confusing what is current correct testnet url & port. @wilsonianb said : r.altnet.rippletest.net 51235 But https://ripple.com/build/xrp-test-net/ said : https://s.altnet.rippletest.net:51234

The different addresses are used for different purposes. The s.altnet. address is the JSON-RPC handler address of a test net server run by Ripple. You can interact with it using any HTTP client according to instructions like https://ripple.com/build/rippled-apis/#json-rpc. This allows you to interact with the test net without having to run your own rippled server.

If you do want to run your own rippled server, you should use the r.altnet address and configuration shared by @wilsonianb. That address is how rippled will find other peer rippled servers on the test net.

But "Account not found error" is remained til now. so I have to solve that problem. :-)

To fund your account, click the Generate Credentials button on the test-net webpage https://ripple.com/build/xrp-test-net/, this will give you an address and the corresponding secret and fund it with some initial XRP. Note that the testnet is reset from time to time, so there is no guarantee this address will work indefinitely.

bachase commented 6 years ago

@Vivek-Patil What type of storage is your amazon instance using? Be sure to read the Amazon Web Services section in https://ripple.com/build/rippled-setup/#network-and-hardware regarding IOPS and AWS.

JJNET commented 6 years ago

@bachase I appreciate your kind explanation. But I can not understand why ripple official site don't mention that kind of explanation to support testnet developer till now.

One more question, Does rippled have a feature like "walletnotify" event callback of bitcoind? Otherwise how can I get deposits event real time?

passionofvc commented 6 years ago

hi @JJNET there is no walletnotify event in ripple daemon, you must polling all account's tx, you can use callback client weksocket lib.

JJNET commented 6 years ago

@passionofvc I can't understand, rippled can support that kind of huge polling connection requests, if many transaction are occured like Bithumb, bitfinex or other huge crypto exchange?

MarkusTeufelberger commented 6 years ago

Yes, so far it can.

bachase commented 6 years ago

@JJNET, thank you for the feedback on limited testnet documentation. Regarding the walletnotify equivalent, have you read the rippled API documentation? I believe https://ripple.com/build/rippled-apis/#subscribe is what you'd like.

Also, I think we've taken this closed issue off its original problem. In the future, please open a specific issue for any actionable questions you have.

passionofvc commented 6 years ago

hi @JJNET yes you can, the ripple daemon can process many rpc request if your server have many CPU, many memory,high SSD disk, but your client must watch every tx's state until tx finally in validated ledger. I do not know whether there is a limit in RPC request, or an option to control RCP thread number. below is the test code I use.

const WebSocket = require('ws');

 const connections = {};
 //const ip='wss://s.altnet.rippletest.net:51233';
 //const ip='wss://127.0.0.1:5006';
 //const ip='wss://s1.ripple.com' ;
 subscribe(ip);

-function subscribe(ip) {
|
|  // Skip addresses that are already connected
-  if (connections[ip]) {
2    return;
2  }
|
|  const ws = new WebSocket(ip);
|  connections[ip] = ws;
|
-  ws.on('error', function(error) {
2    console.log(error);
-    if (ip && connections[ip]) {
3      connections[ip].close();
3
3      delete connections[ip];
3    }
2  });
|
-  ws.on('close', function(error) {
-    if (ip && connections[ip]) {
3      delete connections[ip];
3    }
2  });
|
-  ws.on('open', function() {
2    console.log('open' + ip);
2
-    if (ip && connections[ip]) {
-      connections[ip].send(JSON.stringify({
4        id: 1,
4        command: 'subscribe',
4        streams: [
4         "transactions"
4         // "ledger"
4         //"ledger","server","transactions","transactions_proposed"
4        ]
4        //,
4        //accounts: [ 'rgvYz7whPbk2cxnV1SmD23fHx7zWzJ8KZ', 'rwBxHbxkPSfbvsYtnuKmTP7JDYHALTUkw3', 'rMDG5uGCiakP8SqQ1NkEPpS8STTpNUqDiu' ]
4      }));
3    }
2  });
|
-  ws.on('message', function(dataString) {
2    const data = JSON.parse(dataString);
2    console.log( JSON.stringify(data,null,2) );
2  });
|}
JJNET commented 6 years ago

@passionofvc

Can I use subscribe function with RippleAPI? I wrote every code with Node.js & RippleAPI already. Your codes looks like Node.js. Is it correct?

passionofvc commented 6 years ago

hi @JJNET I am not good at js, but you can see https://github.com/ripple/ripple-lib/issues/809 I also asked past, it may be your answer.

JJNET commented 6 years ago

Hi @passionofvc

Your code are good with Node.js. Some kind of message can arrived periodically. I can figure out my address's transaction maybe. Thank you very much!

JJNET commented 6 years ago

Hi @wilsonianb

Does Ripple Testnet have a problems now?

Suddenly, My rippled shows InsufficientNetworkMode with all accounts includiing Genesis Address. (Until ten hours ago, it was fine.) cf) /opt/ripple/bin/rippled account_info rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh Loading: "/etc/opt/ripple/rippled.cfg" 2018-Mar-26 07:27:58 HTTPClient:NFO Connecting to 127.0.0.1:5005

{ "result" : { "error" : "noNetwork", "error_code" : 17, "error_message" : "InsufficientNetworkMode", "request" : { "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "command" : "account_info" }, "status" : "error" } }

I configured setup files as follows :+1:

---------------ripple.cfg

[ips]

r.ripple.com 51235

r.altnet.rippletest.net 51235

[validators_file] validators.txt

-------------- validators.txt

[validator_list_sites]

https://vl.ripple.com

https://vl.altnet.rippletest.net

[validator_list_keys]

ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734

ED264807102805220DA0F312E71FC2C69E1552C9C5790F6C25E3729DEB573D5860

gituser commented 6 years ago

Yes, prolly you need to upgrade.

From the git log (of the develop branch):

commit 9af994ceb45a82861205bb9d0b8d845cec950524 Author: seelabs scott.determan@yahoo.com Date: Thu Mar 15 14:31:02 2018 -0400

Set version to 1.0.0-b2

2018-03-26 10:32 GMT+03:00 JJNET notifications@github.com:

Hi @wilsonianb https://github.com/wilsonianb

Does Ripple Testnet have a problems now?

Suddenly, My rippled shows InsufficientNetworkMode with all accounts includiing Genesis Address. (Until ten hours ago, it was fine.) cf) /opt/ripple/bin/rippled account_info rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh Loading: "/etc/opt/ripple/rippled.cfg" 2018-Mar-26 07:27:58 HTTPClient:NFO Connecting to 127.0.0.1:5005

{ "result" : { "error" : "noNetwork", "error_code" : 17, "error_message" : "InsufficientNetworkMode", "request" : { "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "command" : "account_info" }, "status" : "error" } }

I configured setup files as follows 👍

---------------ripple.cfg

[ips]

r.ripple.com 51235

r.altnet.rippletest.net 51235

[validators_file] validators.txt

-------------- validators.txt

[validator_list_sites]

https://vl.ripple.com

https://vl.altnet.rippletest.net

[validator_list_keys]

ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734

ED264807102805220DA0F312E71FC2C69E1552C9C5790F6C25E3729DEB573D5860

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ripple/rippled/issues/2332#issuecomment-376072404, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGX1Vq9OYFsJOO9ykVpMog2W0kuBPmHks5tiJmqgaJpZM4Rd_kh .

PawanTiwariOodles commented 6 years ago

Hello, I have setup rippled, but its not syncing. When I check by server_state, { "result" : { "info" : { "build_version" : "1.0.0", "closed_ledger" : { "age" : 31, "base_fee_xrp" : 1e-05, "hash" : "60571B6D5573E1611CDF2B1D4AEB227F38612E6CD8A83AD71B496F57CDD7C441", "reserve_base_xrp" : 200, "reserve_inc_xrp" : 50, "seq" : 8 }, "complete_ledgers" : "empty", "hostid" : "ip-10-10-60-60", "io_latency_ms" : 1, "jq_trans_overflow" : "0", "last_close" : { "converge_time_s" : 2, "proposers" : 0 }, "load" : { "job_types" : [ { "job_type" : "untrustedValidation", "per_second" : 4 }, { "job_type" : "untrustedProposal", "per_second" : 43 }, { "in_progress" : 1, "job_type" : "clientCommand" }, { "job_type" : "peerCommand", "per_second" : 524 } ], "threads" : 4 }, "load_factor" : 1, "peer_disconnects" : "0", "peer_disconnects_resources" : "0", "peers" : 10, "pubkey_node" : "n9LBjh7rCy5m2yEdxoJcQG8ybdZtUoMMz5ukACFTA4swUNhkXyUB", "pubkey_validator" : "nHUbWffKtLJr1kGGJygiypvBkDMDMjZwuh7bgSyx2dxmeV4YkQNg", "published_ledger" : "none", "server_state" : "connected", "state_accounting" : { "connected" : { "duration_us" : "388243044", "transitions" : 1 }, "disconnected" : { "duration_us" : "1211333", "transitions" : 1 }, "full" : { "duration_us" : "0", "transitions" : 0 }, "syncing" : { "duration_us" : "0", "transitions" : 0 }, "tracking" : { "duration_us" : "0", "transitions" : 0 } }, "time" : "2018-Jun-08 06:58:11.922538", "uptime" : 390, "validation_quorum" : 13, "validator_list_expires" : "2018-Jun-18 00:00:00.000000000" }, "status" : "success" } } It's been more than, sixteen hours, I don't know, what I'm missing. Can anyone help.?

Thanks.

burnside commented 5 years ago

I was pulling my hair out on this. Spent many hours trying various testnet config tweaks:

For each change I let it run 10-15 mins and watched the logs. My node was getting lots of peers, lots of data flowing in the logs, etc., but my node was never getting a server_state beyond "connected". Eventually I remembered that another currency I'd worked with before kept a list of peers in the local db. So I wiped my db directory, started it up, and within 5 minutes I am "syncing" just fine. My guess is I started it up with the wrong validators.txt config in the past and it peered with mainnet. Probably all I needed to wipe was the "peerfinder.sqlite" file.