Lightning: How to start lightning node now that --ipaddr is gone?

Created on 23 Jun 2018  路  10Comments  路  Source: ElementsProject/lightning

Guys, could you just explain how I should start my lightning node?

Since --ipaddr=82.217.214.215 has been removed, I have had nothing but trouble.

1: ../lightningd/lightningd --network=bitcoin --log-level=debug --rgb=23354d --alias=Bight.nl >& out.txt &

Doesn't seem to announce my ip address (or should it?, no one knows), port 9735 is now open
So what should happen in this case (without --addr)?

2: ../lightningd/lightningd --network=bitcoin --addr=82.217.214.215:9735 --log-level=debug --rgb=23354d --alias=Bight.nl >& out.txt &

../cli/lightning-cli getinfo, I get: Connection refused, it's not even starting (why?)

3: ../lightningd/lightningd --bind-addr=127.0.0.1:9735 --announce-addr=82.217.214.215:9735 --rgb=23354d --alias=Bight.nl --network=bitcoin >& out.txt &

Announces address but port 9735 remains closed (didn't know that, have been running with a closed port for weeks)

4: ../lightningd/lightningd --bind-addr=192.168.178.20:9735 --announce-addr=82.217.214.215:9735 --rgb=23354d --alias=Bight.nl --network=bitcoin >& out.txt &

Seems to work well (192.168.178.20:9735 is my local LAN address) port is now open but no one has ever opened a channel to my node (http://channels.bight.nl/)

I'm now running with option 4. Is this the right way? Can you guys open a channel to my node? How to run and announce ip and have port 9735 open so other people can create channels to my node?

addr question

Most helpful comment

The last version is the correct one, and you can widen it to be --bind-addr=0.0.0.0:9735 that will open the port on all interfaces (including loopback so you can connect to 127.0.0.1 as well).

The first option does not announce because it detects its IP as 192.168.178.20, which is a private network, announcing that would leak information about your internal network and wouldn't be helpful because people still couldn't connect to it.

The second option is an alias for --bind-addr=82.217.214.215:9735 --announce-addr=82.217.214.215:9735, and so it'll try to bind to your public address (which is likely owned by your router), which will fail.

The third option binds only to the loopback interface, so you can connect using 127.0.0.1, but the node is unreachable for anybody that is not also sitting on your machine.

The fourth finally binds to the ethernet or wlan device, and is told to announce the external IP address, which is correct.

I just checked, and I'm able to open a connection to your node, but I don't have your node's ID so I can't really set up the encrypted transport:

telnet 82.217.214.215 9735                                                                                     
Trying 82.217.214.215...
Connected to 82.217.214.215.
Escape character is '^]'.
^]
telnet> quit
Connection closed.

All 10 comments

The last version is the correct one, and you can widen it to be --bind-addr=0.0.0.0:9735 that will open the port on all interfaces (including loopback so you can connect to 127.0.0.1 as well).

The first option does not announce because it detects its IP as 192.168.178.20, which is a private network, announcing that would leak information about your internal network and wouldn't be helpful because people still couldn't connect to it.

The second option is an alias for --bind-addr=82.217.214.215:9735 --announce-addr=82.217.214.215:9735, and so it'll try to bind to your public address (which is likely owned by your router), which will fail.

The third option binds only to the loopback interface, so you can connect using 127.0.0.1, but the node is unreachable for anybody that is not also sitting on your machine.

The fourth finally binds to the ethernet or wlan device, and is told to announce the external IP address, which is correct.

I just checked, and I'm able to open a connection to your node, but I don't have your node's ID so I can't really set up the encrypted transport:

telnet 82.217.214.215 9735                                                                                     
Trying 82.217.214.215...
Connected to 82.217.214.215.
Escape character is '^]'.
^]
telnet> quit
Connection closed.

lncli describegraph | jq -r '.nodes[] | select(.addresses[].addr|contains("82.217.214.215:9735")) | .pub_key '

02c5371591b640da03f9a645e2ddfa5620d8537388b03ddd524d36766c0f550db0
03352c89e73541dad209b43fd077d0ddbe449a5a386fb1546b8ad57c405395fd23
033a6cfd3a7c3da838c152f667bd414712056599e323eda27597ab9517adac25f2
0358904498ccedeb79540808be26ae92725b6f4736750d92cab605f078a58934ce

Thanks a lot for taking so much time to answer my questions really fast and in such detail. I think it will be useful for other people as well. My node id is (sorry for that):

02c5371591b640da03f9a645e2ddfa5620d8537388b03ddd524d36766c0f550db0@82.217.214.215:9735

More information here: http://bight.nl/contact.html

EDiT: it was so confusing because I used to start my node with:

../lightningd/lightningd --rgb=ffa500 --alias=Bight.nl --ipaddr=82.217.214.215 --network=bitcoin --log-level=debug >& out.txt &

and that worked just fine.

Thanks @githorray, there were quite a few node IDs and since this was mainly about reachability it seemed to be sufficient with telnet. The first ID works btw :-)

@sumBTC
I was having a similar problem in starting the node with the new --bind-addr and --announce. I've connected to your node successfully and can find it on #recksplorer.

{
      "state": "GOSSIPING",
      "id": "02c5371591b640da03f9a645e2ddfa5620d8537388b03ddd524d36766c0f550db0",
      "alias": "Bight.nl",
      "color": "23354d",
      "netaddr": [
        "82.217.214.215:9735"
      ],
      "connected": true,
      "owner": "lightning_gossipd"
    }

I'm having trouble finding my node on #recksplorer but it seems like I can connect to your node and other nodes.

Would appreaciate if someone could try to connect to my node below
021187f1f8ceaeb33e933fef27a3097f42c503c14d38a4f109cb5bdf59ce2ccd9d@35.237.28.239:9735

Nice it was useful. I've successfully opened a channel with your node, so it's working. If you use --alias= you can set an alias. After that, try to get yiour 1000 satoshi and get your alias in the hall of fame: http://gettip.bight.nl/

If it's working for you, I assume people can open a channel with me as well but I'm still not sure. When you're done, could you close my channel and open a channel to my node? I know that will take a few days.

@sumBTC

Thanks! I've set an alias in the config file but I'll try again in the command line. I'll retrieve the tip and close the channel, and open a channel with your node.

Great! Oh, could you also give a few satoshi back (http://givetip.bight.nl/) when you received the tip.
I see a lot of failed attempts lately which also worries me. Have a look at http://channels.bight.nl/ as well.

EDIT: in givetip you have to insert satoshi not millisatoshi, just give back 10 or 100 satoshi so you can try other things :-)

Ahh that makes sense, great I've sent back a tip :)

Received, it works: "status": "paid". So it's still working. Nice to know. Thanks a lot.

Was this page helpful?
0 / 5 - 0 ratings