Merge #117: Fix nodeinfo for clightning

ae15205689 Mention another way to get nixops to pick up the correct IP address of a virtualbox (Jonas Nick)
4df0c9fcfd Fix nodeinfo for clightning (Jonas Nick)

Pull request description:

ACKs for top commit:
  cypherpunk2140:
    ACK ae15205689

Tree-SHA512: 56fff8c687e0070c0dcd1d7c44cd1b82f6d86103e8634a06fc823dea4bf9d1d986bcfb19caa6c72836c4cbcb636cd5360b3326ae71ee05ecf0942c02566b61b9
This commit is contained in:
Jonas Nick 2019-09-24 08:14:51 +00:00
commit 491dcf9568
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@
```
* **A:** This is issue https://github.com/NixOS/nixops/issues/908. The machine needs to be rebooted. You can do that by running `nixops deploy` with the `--force-reboot` flag once.
* **Q:** I'm deploying to virtualbox it's not able to connect anymore.
* **A:** Maybe the IP address of the box changed. Run `nixops deploy --check` to update nixops with the new IP address. Sometimes you also need to remove the old IP address from `~/.ssh/known_hosts`.
* **A:** Maybe the IP address of the box changed. Run `nixops deploy --check` to update nixops with the new IP address. Sometimes you need to run `nixops modify -d <deployment> network/network.nix network/network-vbox.nix`. Sometimes you also need to remove the old IP address from `~/.ssh/known_hosts`.
* **Q:** The clightning service is running but when I try to use it (f.e. by running `lightning-cli getinfo` as user operator) all I get is `lightning-cli: Connecting to 'lightning-rpc': Connection refused`.
* **A:** Check your clightning logs with `journalctl -eu clightning`. Do you see something like `bitcoin-cli getblock ... false` failed? Are you using pruned mode? That means that clightning hasn't seen all the blocks it needs to and it can't get that block because your node is pruned. If you're just setting up a new node you can `systemctl stop clightning` and wipe your `/var/lib/clightning` directory. Otherwise you need to reindex the Bitcoin node.
* **Q:** My disk space is getting low due to nix.

View File

@ -4,7 +4,7 @@ set -o pipefail
BITCOIND_ONION="$(cat /var/lib/onion-chef/operator/bitcoind)"
echo BITCOIND_ONION="$BITCOIND_ONION"
if [ -x "$(command -v clightning)" ]; then
if [ -x "$(command -v lightning-cli)" ]; then
CLIGHTNING_NODEID=$(sudo -u clightning lightning-cli --lightning-dir=/var/lib/clightning getinfo | jq -r '.id')
CLIGHTNING_ONION="$(cat /var/lib/onion-chef/operator/clightning)"
CLIGHTNING_ID="$CLIGHTNING_NODEID@$CLIGHTNING_ONION:9735"