obsidiansystems / ledger-app-tezos

Ledger app for Tezos
Apache License 2.0
101 stars 51 forks source link

tezos baker Fatal error: No such file or directory #31

Closed byforcesunseen closed 5 years ago

byforcesunseen commented 5 years ago

I'm at the Start the baking daemon part of the guide and have encountered the following error while executing the ./tezos-baker-002-PsYLVpVv command:

./tezos-baker-002-PsYLVpVv run with local node ~/.tezos-node ledger_tezos_ed_0_0

[tezos@tezos tezos-mainnet]$ TEZOS_LOG="* -> debug" ./tezos-baker-002-PsYLVpVv run with local node ~/.tezos-node ledger_tezos_ed_0_0
Waiting for the node to be synchronized with its peers...
Node synchronized.
Baker started.
Nov 24 01:08:27 - client.scheduling: Setting up before the baker can start.
Fatal error:
  No such file or directory

I'd love to be able to debug this further, but the No such file or directory error message isn't very descriptive - I've got no idea what file or directory it's looking for.

I've been able to successfully run the following commands:

./tezos-endorser-002-PsYLVpVv run ledger_tezos_ed_0_0
./tezos-accuser-002-PsYLVpVv  run

And have successfully registered as a delegate:

./tezos-client register key ledger_tezos_ed_0_0 as delegate

My ledger is currently connected with the Ledger Baking application running and it shows Baking Key: tz1...

~/.tezos-node/config.json contains the following, which was taken from here:

{
    "data-dir": "/mnt/tezos-blockchain-data/.tezos-node/",
    "rpc": {
        "listen-addr": "192.168.1.120:8733",
        "cors-headers": [
            "content-type"
        ],
        "cors-origin": [
            "*"
        ]
    },
    "p2p": {
        "bootstrap-peers": [
            "boot.tzbeta.net",
            "localhost:7733"
        ],
        "listen-addr": "localhost:9733",
        "limits":{
            "connection-timeout":15,
            "authentication-timeout":10,
            "max-connections":10,
            "expected-connections": 10,
            "max-incoming-connections": 0,
            "backlog": 0,
            "read-buffer-size":16384,
            "read-queue-size":1024,
            "write-queue-size":1024,
            "swap-linger":60,
            "max_known_points":[400,300],
            "max_known_peer_ids":[400,300]}
    },
    "shell":{
        "chain_validator":{"bootstrap_threshold":10}
    }
}

The mount point "data-dir": "/mnt/tezos-blockchain-data/.tezos-node/" exists and contains the blockchain data on an external drive. My node is up to date and is working fine.

~/.tezos-client/config contains the following:

{
    "base_dir": "/home/tezos/.tezos-client",
    "node_addr": "192.168.1.120",
    "node_port": 8733,
    "tls": false,
    "web_port": 8080,
    "confirmations": 0
}

I'm running mainnet sha ae1a588d03508de344ec1f9c8288e893c92e5f8d which I recently updated by using the following command:

git fetch && git checkout mainnet && git rebase && eval $(opam env) && make

I'm using Fedora 29 on a Raspberry PI 3 B+ with a ledger nano s.

Any idea what's going on here, or what I can do to figure out what file/directory it's looking for? Thanks!

byforcesunseen commented 5 years ago

I've figured out the cause of this issue, it's because I needed to specify the location of the context/data.mdb when running the baker, because it's on an external drive. It turns out the baking app doesn't read this value from the data-dir attribute in the ~/.tezos-node/config.json file. Fixed this with the following command:

./tezos-baker-002-PsYLVpVv run with local node /mnt/tezos-blockchain-data/.tezos-node/ ledger_tezos_ed_0_0
raulmarcosl commented 4 years ago

Thanks for commenting the solution, you just saved me a few headaches!