Coder Social home page Coder Social logo

Comments (29)

Stadicus avatar Stadicus commented on May 27, 2024 3

LND is probably called without an external ip address. As LND did not work with dynamic ip addresses, I tried to enable this with the Public IP script. This is shakey, though, and cannot address changes in the ip address as LND needs to be restarted to rebroadcast it, which locks the wallet.

Fortunately, LND just merged the pull request lightningnetwork/lnd#1109 that will enable full PNP NAT capabilities in the next release, detecting and rebroadcasting your public ip automatically, so this won't be necessary any more.

For the moment, if your IP address does not change too often, I'd scrap the Public IP script and call LND directly with your IP address in the lnd.service unit.

Let's see if this works:

# RaspiBolt LND Mainnet: systemd unit for lnd
# /etc/systemd/system/lnd.service

[Unit]
Description=LND Lightning Daemon
Wants=bitcoind.service
After=bitcoind.service

[Service]
ExecStart=/usr/local/bin/lnd --externalip=108.248.221.82
PIDFile=/home/bitcoin/.lnd/lnd.pid
User=bitcoin
Group=bitcoin
LimitNOFILE=128000
Type=simple
KillMode=process
TimeoutSec=180
Restart=always
RestartSec=60

[Install]
WantedBy=multi-user.target

from raspibolt.

Stadicus avatar Stadicus commented on May 27, 2024 2

The URI consists of tree distinct part:

  • your public Node Key (03013321192...066ef51ca9339abfb)
  • your IP address (something like 194.40.217.50)
  • your port number (usually 9735)

Your URI does not contain a valid IP address, but 0:0:0:0:0:0:0:0 instead.

03013321192df9ccd975baf68436c451957aac1498b759a8f066ef51ca9339abfb@0:0:0:0:0:0:0:0:9735

What is the output when you run the following commands on your RaspiBolt?

$ curl ipinfo.io/ip
$ sudo systemctl status lnd

from raspibolt.

Stadicus avatar Stadicus commented on May 27, 2024 2

First, I think it's important to mention that the LN explorers are not crucial for your node to work. The present only one possible view of the network (they are just nodes themselves) and are frequently outdated.

More important is, that
a) you can connect to other nodes, and for that you do not need to publish your IP address, and
b) other nodes can connect to you (this means you need to announce your IP address to the network).

Now, if your IP address is correctly announced, it should be located somewhere here:
https://geoiptool.com/de/?ip=108.248.221.82

To cover the above mentioned basics, can you paste the output of the following commands?

  • sudo systemctl status lnd
  • bitcoin-cli -getinfo
  • lncli getinfo

from raspibolt.

Stadicus avatar Stadicus commented on May 27, 2024 2

It's hard to help if you cannot paste complete (non cut-off) information. And please take the time to format them correctly using the three backticks ```

So, does it work now?

from raspibolt.

Stadicus avatar Stadicus commented on May 27, 2024 2

Hej @BitcoinVegan, great to hear! With "cut off" I was referring to the right part of your cut/paste snippets, there was important information missing. Maybe you need to make the terminal window wider to see everything?

2018-06-18 19_42_59-this question is concerning the raspibolt please help issue 78 stadicus_g

Don't hesitate to post again an issue if you run into issues.

from raspibolt.

zx9r avatar zx9r commented on May 27, 2024 1

Instead of taking a screenshot of lnd.service file, please upload the file here as an attachment

from raspibolt.

zx9r avatar zx9r commented on May 27, 2024 1

I had similar problem with the --externalip and I think it could be the same. Need to review the file to be sure.

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024 1
# RaspiBolt LND Mainnet: systemd unit for lnd
# /etc/systemd/system/lnd.service

[Unit]
Description=LND Lightning Daemon
Wants=bitcoind.service
After=bitcoind.service

# for use with sendmail alert
#OnFailure=systemd-sendmail@%n

[Service]
# get var PUBIP from file
EnvironmentFile=/run/publicip

ExecStart=/usr/local/bin/lnd --externalip=108.248.221.82
PIDFile=/home/bitcoin/.lnd/lnd.pid
User=bitcoin
Group=bitcoin
LimitNOFILE=128000
Type=simple
KillMode=process
TimeoutSec=180
Restart=always
RestartSec=60

[Install]
WantedBy=multi-user.target

from raspibolt.

Stadicus avatar Stadicus commented on May 27, 2024 1

Doesn't look too good.

Is your bitcoind running with a synced chain? It does not look like it, so this is the first issue you need to look at. Make sure, user admin has access to the rpcpassword (by copying bitcoin.conf etc)
https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_30_bitcoin.md#autostart-bitcoind

After this works, we can check if LND is working. And please make sure to provide the full output, all lines of the systemctl status are cut off at the right side, missing crucial information.

BTW, with three backticks (```) you can create code blocks (I edited your post above).

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024 1

@Stadicus yes it does work thank you. I'm not sure what "cut off" you are referring to I copy and paste all I could that involved each particular code.

None the less with your steady guidance and instruction we were able to get everything squared away, and will definitely be reaching out to you in the future if another situation comes about.

from raspibolt.

Freefromchainz avatar Freefromchainz commented on May 27, 2024

Here are the outputs for
$ curl ipinfo.io/ip

2018-06-13

$ sudo systemctl status lnd
2018-06-13 1

from raspibolt.

zx9r avatar zx9r commented on May 27, 2024

Please attach here your /etc/systemd/system/lnd.service file

I think the problem can be there

from raspibolt.

Moabbit avatar Moabbit commented on May 27, 2024

@Stadicus i think we have followed all your suggestions, I have attached some screenshots. However, we're still in the same boat. The node is in the wrong location on the Explorer also the node is having issues connecting to others on the map. Any further suggestions?

download_20180615_083350
download_20180615_083356
download_20180615_083350

from raspibolt.

Moabbit avatar Moabbit commented on May 27, 2024

Thanks @zx9r I'll check it out and confirm.

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024

I will once I get home, thank you for this update.

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024

bitcoin-cli -getinfo error: couldn't connect to server: unknown (code -1) (make sure server is running and you are connecting to the correct RPC port)

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024

lncli getinfo [lncli] rpc error: code = Unavailable desc = grpc: the connection is unavailable

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024
$ sudo systemctl status lnd
● lnd.service - LND Lightning Daemon
   Loaded: loaded (/etc/systemd/system/lnd.service; enabled; vendor preset: enab
   Active: activating (auto-restart) (Result: resources) since Sat 2018-06-16 16

Jun 16 16:00:44 bitcoinveganbolt systemd[1]: lnd.service: Failed to run 'start'
Jun 16 16:00:44 bitcoinveganbolt systemd[1]: Failed to start LND Lightning Daemo
Jun 16 16:00:44 bitcoinveganbolt systemd[1]: lnd.service: Unit entered failed st
Jun 16 16:00:44 bitcoinveganbolt systemd[1]: lnd.service: Failed with result 're
lines 1-8/8 (END)...skipping...

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024

should i put the public IP script back in, because I scraped it as you said in your earlier instructions?

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024
# RaspiBolt LND Mainnet: systemd unit for bitcoind
# /etc/systemd/system/bitcoind.service

[Unit]
Description=Bitcoin daemon
Wants=getpublicip.service
After=getpublicip.service

# for use with sendmail alert (coming soon)
#OnFailure=systemd-sendmail@%n

[Service]
User=bitcoin
Group=bitcoin
Type=forking
PIDFile=/home/bitcoin/.bitcoin/bitcoind.pid
ExecStart=/usr/local/bin/bitcoind -daemon -conf=/home/bitcoin/.bitcoin/bitcoin.conf -pid=/home/bitcoin/.bitcoin/bitcoind.pid
KillMode=process
Restart=always
TimeoutSec=120
RestartSec=30

[Install]
WantedBy=multi-user.target

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024
systemctl status bitcoind.service
● bitcoind.service - Bitcoin daemon
   Loaded: loaded (/etc/systemd/system/bitcoind.service; enabled; vendor preset:
   Active: active (running) since Sat 2018-06-16 22:38:57 EDT; 2min 36s ago
  Process: 649 ExecStart=/usr/local/bin/bitcoind -daemon -conf=/home/bitcoin/.bi
 Main PID: 650 (bitcoind)
   CGroup: /system.slice/bitcoind.service
           └─650 /usr/local/bin/bitcoind -daemon -conf=/home/bitcoin/.bitcoin/bi

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024
sudo tail -f /home/bitcoin/.bitcoin/testnet3/debug.log
2018-06-17 02:41:46 New outbound peer connected: version: 70015, blocks=1325641, peer=14
2018-06-17 02:41:46 connect() to 159.65.96.207:18333 failed after select(): Connection refused (111)
2018-06-17 02:41:53 connect() to 219.91.248.99:18333 failed after select(): No route to host (113)
2018-06-17 02:42:00 New outbound peer connected: version: 70015, blocks=1325641, peer=17
2018-06-17 02:42:00 connect() to 5.39.130.240:18333 failed after select(): Connection refused (111)
2018-06-17 02:42:01 connect() to 167.99.165.151:18333 failed after select(): Connection refused (111)
2018-06-17 02:42:13 New outbound peer connected: version: 70015, blocks=1325641, peer=18
2018-06-17 02:42:13 New outbound peer connected: version: 70015, blocks=1325641, peer=19
2018-06-17 02:42:14 New outbound peer connected: version: 70015, blocks=1325641, peer=20
2018-06-17 02:42:14 New outbound peer connected: version: 70014, blocks=1325641, peer=21
2018-06-17 02:46:31 UpdateTip: new best=0000000000007d8e56a456bb24bb7e4d0f37de27836a3b4dca1d40bdc7535797 height=1325642 version=0x20000000 log2_work=70.32805 tx=18425899 date='2018-06-17 02:46:15' progress=1.000000 cache=0.0MiB(142txo) warning='5 of last 100 blocks have unexpected version'

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024
bitcoin-cli getblockchaininfo
{
  "chain": "test",
  "blocks": 1325642,
  "headers": 1325642,
  "bestblockhash": "0000000000007d8e56a456bb24bb7e4d0f37de27836a3b4dca1d40bdc753                                                                             5797",
  "difficulty": 1,
  "mediantime": 1529197940,
  "verificationprogress": 0.9999995652859858,
  "initialblockdownload": false,
  "chainwork": "000000000000000000000000000000000000000000000050571670cc85225dc7                                                                             ",
  "size_on_disk": 13343888767,
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": true
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "active",
      "startTime": 1456790400,
      "timeout": 1493596800,
      "since": 770112
    },
    "segwit": {
      "status": "active",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 834624
    }
  },
  "warnings": "Warning: unknown new rules activated (versionbit 28)"

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024
● lnd.service - LND Lightning Daemon
   Loaded: loaded (/etc/systemd/system/lnd.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: resources) since Sat 2018-06-16 22:58:09 EDT; 14s ago

Jun 16 22:58:09 bitcoinveganbolt systemd[1]: Failed to start LND Lightning Daemon.
Jun 16 22:58:09 bitcoinveganbolt systemd[1]: lnd.service: Unit entered failed state.
Jun 16 22:58:09 bitcoinveganbolt systemd[1]: lnd.service: Failed with result 'resources'.````

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024
   Loaded: loaded (/etc/systemd/system/lnd.service; enabled; vendor preset: enab
   Active: active (running) since Sat 2018-06-16 23:11:12 EDT; 34s ago
 Main PID: 648 (lnd)
   CGroup: /system.slice/lnd.service
           └─648 /usr/local/bin/lnd --externalip=108.248.221.82

Jun 16 23:11:12 bitcoinveganbolt systemd[1]: Started LND Lightning Daemon.
Jun 16 23:11:12 bitcoinveganbolt lnd[648]: Attempting automatic RPC configuratio
Jun 16 23:11:12 bitcoinveganbolt lnd[648]: Automatically obtained bitcoind's RPC
Jun 16 23:11:12 bitcoinveganbolt lnd[648]: 2018-06-16 23:11:12.897 [INF] LTND: V
Jun 16 23:11:12 bitcoinveganbolt lnd[648]: 2018-06-16 23:11:12.898 [INF] LTND: A
Jun 16 23:11:12 bitcoinveganbolt lnd[648]: 2018-06-16 23:11:12.913 [INF] CHDB: C
Jun 16 23:11:12 bitcoinveganbolt lnd[648]: 2018-06-16 23:11:12.982 [INF] RPCS: p
Jun 16 23:11:12 bitcoinveganbolt lnd[648]: 2018-06-16 23:11:12.983 [INF] RPCS: p
Jun 16 23:11:12 bitcoinveganbolt lnd[648]: 2018-06-16 23:11:12.983 [INF] LTND: W

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024

I was able to connect after rebuilding the public IP script.

from raspibolt.

BitcoinVegan avatar BitcoinVegan commented on May 27, 2024
            "active": true,
            "remote_pubkey": "0315249fdd6717953599420c883b3ed1b6582b3335bccbfc9651baf1bbefdf4bce",
            "channel_point": "f87e93061f758a0b14f92e8def53d017e1588cfeb9aae7b80f6741f12ef8d2b6:0",
            "chan_id": "1457562091806588928",
            "capacity": "150000",
            "local_balance": "0",
            "remote_balance": "149817",
            "commit_fee": "183",
            "commit_weight": "552",
            "fee_per_kw": "253",
            "unsettled_balance": "0",
            "total_satoshis_sent": "0",
            "total_satoshis_received": "0",
            "num_updates": "0",
            "pending_htlcs": [
            ],
            "csv_delay": 6,
            "private": false
        },

from raspibolt.

thibaultlangloisberthelot avatar thibaultlangloisberthelot commented on May 27, 2024

I guys I have this similar issue, could give the solution here please (like the bitcoin.conf final version of the file maybe?).
Thx

from raspibolt.

Stadicus avatar Stadicus commented on May 27, 2024

It's probably best if you open a new issue and describe it in as much detail as possible.

from raspibolt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.