Current ledger is unavailable

497 views
Skip to first unread message

Sony Joseph

unread,
Aug 7, 2014, 11:47:14 AM8/7/14
to ripple...@googlegroups.com

I am running rippled locally and when I try executing the 'account_info' I get the following error:
 
 ./build/rippled account_info <accountid>
Loading: "/Users/aaa/.config/ripple/rippled.cfg"
Failed to open '"/Users/aaa/.config/ripple/rippled.cfg"'.
Connecting to: :5001
{
   "result" : {
      "error" : "noCurrent",
      "error_code" : 12,
      "error_message" : "Current ledger is unavailable.",
      "request" : {
         "account" : <accountid>,
         "command" : "account_info"
      },
      "status" : "error"
   }
}

The server_info (./build/rippled server_info) works fine on the local.

I am though able to get the account_info when I connect to wss://s1.ripple.com

Here’s my local  rippled config file:
(rest all values are set to default)

[peer_private]
1

# Allow untrusted clients to connect to this server.
#
[websocket_public_ip]
127.0.0.1

[websocket_public_port]
5006

[websocket_ip]
127.0.0.1

[websocket_port]
6006

[rpc_ip]
127.0.0.1

[rpc_port]
5001

[rpc_allow_remote]
0

[node_size]
medium

# This is primary persistent datastore for rippled.  This includes transaction
# metadata, account states, and ledger headers.  Helpful information can be
# found here: https://ripple.com/wiki/NodeBackEnd
[node_db]
type=RocksDB
path=/var/lib/rippled/db/rocksdb
open_files=2000
filter_bits=12
cache_mb=256
file_size_mb=8
file_size_mult=2

[database_path]
/var/lib/rippled/db

# This needs to be an absolute directory reference, not a relative one.
# Modify this value as required.
[debug_logfile]
/var/log/rippled/debug.log

[sntp_servers]
time.windows.com
time.apple.com
time.nist.gov
pool.ntp.org

[ips]
r.ripple.com 51235

[validators]
n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7    RL1
n9MD5h24qrQqiyBC8aeqqCWvpiBiYQ3jxSr91uiDvmrkyHRdYLUj    RL2
n9L81uNCaPgtUJfaHh89gmdvXKAmSt5Gdsw2g1iPWaPkAHW5Nm4C    RL3
n9KiYM9CgngLvtRCQHZwgC2gjpdaZcCcbt3VboxiNFcKuwFVujzS    RL4
n9LdgEtkmGB9E2h3K4Vp7iGUaKuq23Zr32ehxiU8FWY7xoxbWTSA    RL5

# Ditto.
[validation_quorum]
#3

[rpc_startup]
{ "command": "log_level", "severity": "warning" }


Any thoughts on what is going on?

Thanks

lid

unread,
Aug 7, 2014, 4:56:12 PM8/7/14
to ripple...@googlegroups.com
This seems indicative: > Failed to open '"/Users/aaa/.config/ripple/rippled.cfg"'.

Sony Joseph

unread,
Aug 7, 2014, 5:07:23 PM8/7/14
to ripple...@googlegroups.com

I don't think that is the problem as I am able to run server_info and get the details.
I do pass the rippled.cfg file location along with the command line parameters.

Thanks

Donovan Hide

unread,
Aug 7, 2014, 5:12:37 PM8/7/14
to Sony Joseph, ripple...@googlegroups.com
"Current ledger is unavailable" means the rippled instance is "syncing". You can probably see that state reflected in the server_state field in the server_info response at the same time as experience the failed account_tx response. Set up a command in another terminal window and monitor your instance this way:

watch  './rippled -q server_info | grep server_state'

Sony Joseph

unread,
Aug 7, 2014, 5:29:38 PM8/7/14
to ripple...@googlegroups.com, sony...@gmail.com

Thanks Donovan.

Does this mean I just need to give it enough of time to sync. And once that happen I should be good to execute command on my local rippled.

On another note, for now I want to use the server to just sign transactions and execute commands on behalf of the back-end application. Does it still need to sync? What are the recommended configurations ( or settings I need to change) to have it run as a 'signing server/. I see the instructions on how to set it up as a 'public server' and 'validating server'  @ https://ripple.com/wiki/Rippled_setup_instructions.

Donovan Hide

unread,
Aug 7, 2014, 5:38:03 PM8/7/14
to Sony Joseph, ripple...@googlegroups.com
Hi Sony,

you need to monitor your instance to check that it is capable of syncing at all. Network speed and disk speed are contributory factors. You want your server_state to be either "full" or "proposing" depending on if it is a validator or not. Not sure if you can submit a transaction to an unsynced server or not. Try it and find out :-) The server doesn't have to sign the transaction for you, ripple-lib can also do that. But any rippled instance, validator or not is capable of doing so. Also you can submit the signed transaction to any rippled server, you don't need your own just to submit. The basic principle is you don't ever want to expose your secret/private key that you sign the transaction with to a machine that you personally do not trust.

Hope that helps, it can be confusing at first. Just try things out and it will start to make sense :-)

Reply all
Reply to author
Forward
0 new messages