Pages:
Author

Topic: The Lightning Network FAQ - page 14. (Read 33426 times)

hero member
Activity: 910
Merit: 5935
not your keys, not your coins!
July 18, 2022, 09:44:30 AM
Code:
bitcoin@raspibolt:~ $ lightningd --conf=/home/bitcoin/.lightningmobile/lightningd.conf --lightning-dir=/home/bitcoin/.lightningmobile

----
(stuck doesn't do anything)
It being 'stuck' is actually what you want, to be honest. That's what normally happens when you run lightningd from the command line without --daemon parameter.
Have you tried, while it's stuck, e.g. in another tmux window or other SSH session, to then execute lightning-cli with the same --lightning-dir?

I'm not sure about this, but in one of those 2 stackexchange links I sent in a few posts above, someone says that we have to set different ports for RPC. I'm not sure if he meant for Bitcoin deamon or for the lightnind daemon.
The OP end up answering himself with this:

Quote
Listen addresses must be different, eg. 0.0.0.0:9735 and 0.0.0.0:9736, and both need to be open in router. Also rpclisten must be different, eg: 127.0.0.1:10009 and 127.0.0.1:10019

Going to check my config files of both Bitcoin Core and Core Lightning to se if I have this setting in any of them!
Yes, I do remember when I had both a Testnet and Mainnet node, that I had to use different ports indeed. May have changed by now, may not, may be a different issue entirely - not sure, but good thing to check.
Easiest way to confirm that ports are the issue would be to shut down the main Core Lightning node and then start the lightningmobile one.
legendary
Activity: 1932
Merit: 1273
July 18, 2022, 01:09:26 AM
@BlackHatCoiner, does when you start the node, the debug show any output that starts with "Server started with public key xxx"?

Code:
INFO    lightningd: Server started with public key xx, alias Lightning Vortex from mobile (color #031de8) and lightningd v0.10.2
hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
July 17, 2022, 02:22:54 PM
Code:
bitcoin@raspibolt:~ $ lightningd --lightning-dir=/home/bitcoin/.lightningmobile > /dev/null 2>&1 &
[1] 14287
bitcoin@raspibolt:~ $ lightning-cli --lightning-dir=/home/bitcoin/.lightningmobile getinfo
lightning-cli: Connecting to 'lightning-rpc': Connection refused
[1]+  Exit 1                  lightningd --lightning-dir=/home/bitcoin/.lightningmobile > /dev/null 2>&1

I'm not sure about this, but in one of those 2 stackexchange links I sent in a few posts above, someone says that we have to set different ports for RPC. I'm not sure if he meant for Bitcoin deamon or for the lightnind daemon.
The OP end up answering himself with this:

Quote
Listen addresses must be different, eg. 0.0.0.0:9735 and 0.0.0.0:9736, and both need to be open in router. Also rpclisten must be different, eg: 127.0.0.1:10009 and 127.0.0.1:10019

Going to check my config files of both Bitcoin Core and Core Lightning to se if I have this setting in any of them!
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
July 17, 2022, 02:03:51 PM
Code:
bitcoin@raspibolt:~ $ lightningd --lightning-dir=/home/bitcoin/.lightningmobile > /dev/null 2>&1 &
[1] 14287
bitcoin@raspibolt:~ $ lightning-cli --lightning-dir=/home/bitcoin/.lightningmobile getinfo
lightning-cli: Connecting to 'lightning-rpc': Connection refused
[1]+  Exit 1                  lightningd --lightning-dir=/home/bitcoin/.lightningmobile > /dev/null 2>&1
hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
July 17, 2022, 01:57:17 PM
If you stop `lightningd` because you thought it was stuck, your RPC calls won't work... heheh It is not stuck. The eamon simply is not sending any messages to the stdout. Let it like that and start a new terminal/session/ssh, and run the lightning-cli commands.

The daemon is running but it doesn't output anything to the stdout, so it looks like it's stuck, but it isn't.

Another alternative is that you require the prompt back and additionally, to avoid any possible message in that session/terminal, you send all possible messages from the daemon to the void, with:

Code:
lightningd --lightning-dir=/home/bitcoin/.lightningmobile > /dev/null 2>&1 &

The
Code:
/dev/null 2>&1

might even be skipped. The & "requires" the prompt back so that you can keep working/playing/enjoying!


Edited;
But something is strage, depending on the sequence you ran the commands.
ps shows you the processes running that matches the grep criteria. So, if you ran this command, after you stop the deamon because you thought it was stuck, then it shouldn't show 2 instances of the daemon running.

If you ran it before you kill the daemon, then there is some other problem with the conenction from the client to the server via RPC!
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
July 17, 2022, 01:37:03 PM
Code:
./lightning-cli getinfo
Any command without "--lightning-dir=/home/bitcoin/.lightningmobile" works properly, because it refers to my main node. By default, if you don't specify a lightning-dir, it'll be "/.lightning". The problem is with the .lightningmobile node.

That's my configuration:
Code:
bitcoin@raspibolt:~ $ sudo cat /home/bitcoin/.lightningmobile/lightningd.conf
daemon
alias=Lightning Vortex from mobile
network=bitcoin
log-level=debug
log-file=/home/bitcoin/.lightningmobile/debug.log

# incoming via tor
bind-addr=127.0.0.1:9835
announce-addr=rbfwzvypteyncgwr2iywyvt7k3vbga7hzuemtkoinivlz5tr2ofzv7yd.onion

# outgoing via tor
proxy=127.0.0.1:9050
always-use-proxy=true

I doubt it helps.




Code:
bitcoin@raspibolt:~ $ lightning-cli --lightning-dir=/home/bitcoin/.lightningmobile getinfo
lightning-cli: Connecting to 'lightning-rpc': Connection refused

Code:
bitcoin@raspibolt:~ $ lightningd --conf=/home/bitcoin/.lightningmobile/lightningd.conf --lightning-dir=/home/bitcoin/.lightningmobile

----
(stuck doesn't do anything)




Code:
ps aux | grep lightningd
That's the output:
Code:
bitcoin@raspibolt:~ $ ps aux | grep lightningd
bitcoin   4652  3.8  0.2  21928  9820 pts/3    D    19:36   0:03 lightningd --conf=/home/bitcoin/.lightningmobile/lightningd.conf --lightning-dir=/home/bitcoin/.lightningmobile
bitcoin   5814  6.1  2.2 100256 88640 ?        Ds   17:25   8:04 lightningd --conf=/home/bitcoin/.lightning/lightningd.conf
bitcoin   6665  0.0  0.0   4916   532 pts/3    S+   19:37   0:00 grep --color=auto lightningd
hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
July 17, 2022, 01:29:01 PM
Or I just use the cat command:
Code:
bitcoin@raspibolt:~ $ sudo cat /home/bitcoin/.lightningmobile/debug.log
2022-07-17T18:07:03.423Z DEBUG   lightningd: Opened log file /home/bitcoin/.lightningmobile/debug.log
2022-07-17T18:07:03.423Z DEBUG   lightningd: Opened log file /home/bitcoin/.lightningmobile/debug.log
2022-07-17T18:07:03.429Z DEBUG   plugin-manager: started(31634) /usr/local/bin/../libexec/c-lightning/plugins/autoclean
2022-07-17T18:07:03.436Z DEBUG   plugin-manager: started(31635) /usr/local/bin/../libexec/c-lightning/plugins/bcli
2022-07-17T18:07:03.442Z DEBUG   plugin-manager: started(31636) /usr/local/bin/../libexec/c-lightning/plugins/fetchinvoice
2022-07-17T18:07:03.450Z DEBUG   plugin-manager: started(31637) /usr/local/bin/../libexec/c-lightning/plugins/funder
2022-07-17T18:07:03.462Z DEBUG   plugin-manager: started(31638) /usr/local/bin/../libexec/c-lightning/plugins/topology
2022-07-17T18:07:03.481Z DEBUG   plugin-manager: started(31639) /usr/local/bin/../libexec/c-lightning/plugins/keysend
2022-07-17T18:07:03.501Z DEBUG   plugin-manager: started(31640) /usr/local/bin/../libexec/c-lightning/plugins/offers
2022-07-17T18:07:03.521Z DEBUG   plugin-manager: started(31641) /usr/local/bin/../libexec/c-lightning/plugins/pay
2022-07-17T18:07:03.541Z DEBUG   plugin-manager: started(31642) /usr/local/bin/../libexec/c-lightning/plugins/txprepare
2022-07-17T18:07:03.561Z DEBUG   plugin-manager: started(31643) /usr/local/bin/../libexec/c-lightning/plugins/spenderp
2022-07-17T18:07:03.705Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_channeld
2022-07-17T18:07:03.723Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_closingd
2022-07-17T18:07:03.741Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_connectd
2022-07-17T18:07:03.759Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_gossipd
2022-07-17T18:07:03.777Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_hsmd
2022-07-17T18:07:03.796Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_onchaind
2022-07-17T18:07:03.814Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_openingd
2022-07-17T18:07:03.833Z DEBUG   hsmd: pid 31651, msgfd 39
2022-07-17T18:07:04.097Z DEBUG   connectd: pid 31652, msgfd 43
2022-07-17T18:07:04.098Z DEBUG   hsmd: new_client: 0
2022-07-17T18:07:04.188Z DEBUG   connectd: Proxy address: 127.0.0.1:9050
2022-07-17T18:07:04.188Z DEBUG   connectd: Created IPv4 listener on port 9835
2022-07-17T18:07:04.188Z DEBUG   connectd: REPLY WIRE_CONNECTD_INIT_REPLY with 0 fds
2022-07-17T18:07:04.191Z DEBUG   gossipd: pid 31653, msgfd 42
2022-07-17T18:07:04.191Z DEBUG   hsmd: new_client: 0
2022-07-17T18:07:05.555Z DEBUG   gossipd: gossip_store_compact_offline: 0 deleted, 22662 copied
2022-07-17T18:07:05.555Z DEBUG   gossipd: Received channel_update for channel 738586x899x1/1 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 738586x1081x1/1 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 739408x2208x0/1 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 731109x938x1/0 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 700393x896x0/0 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 718348x836x0/0 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 737921x1833x0/0 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 724642x918x1/0 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 741095x1108x0/1 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 736890x1413x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 723785x1459x1/0 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 723785x2343x1/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 741095x1126x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 741095x1031x1/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 738602x974x1/0 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 741095x541x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 710043x428x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 738602x969x1/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 731109x1119x0/0 now ACTIVE
2022-07-17T18:07:05.558Z DEBUG   gossipd: Received channel_update for channel 716516x843x0/0 now ACTIVE
2022-07-17T18:07:05.558Z DEBUG   gossipd: REPLY WIRE_GOSSIPD_INIT_REPLY with 0 fds

Doesn't it seem anything wrong in here.

I can't see anything wrong either, so I assume it is working as expected, no?
Can you run any other commands via RPC?

Code:
./lightning-cli getinfo

or something like that?

Try maybe
Code:
./lightning-cli listpeers


Edited;
The cat command will not be useful there when the file gets bigger. But for now, yeah, that's ok!


Edited 2;
Check how each deamon is running with:
Code:
ps aux | grep lightningd

Show the output.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
July 17, 2022, 01:25:45 PM
Or I just use the cat command:
Code:
bitcoin@raspibolt:~ $ sudo cat /home/bitcoin/.lightningmobile/debug.log
2022-07-17T18:07:03.423Z DEBUG   lightningd: Opened log file /home/bitcoin/.lightningmobile/debug.log
2022-07-17T18:07:03.423Z DEBUG   lightningd: Opened log file /home/bitcoin/.lightningmobile/debug.log
2022-07-17T18:07:03.429Z DEBUG   plugin-manager: started(31634) /usr/local/bin/../libexec/c-lightning/plugins/autoclean
2022-07-17T18:07:03.436Z DEBUG   plugin-manager: started(31635) /usr/local/bin/../libexec/c-lightning/plugins/bcli
2022-07-17T18:07:03.442Z DEBUG   plugin-manager: started(31636) /usr/local/bin/../libexec/c-lightning/plugins/fetchinvoice
2022-07-17T18:07:03.450Z DEBUG   plugin-manager: started(31637) /usr/local/bin/../libexec/c-lightning/plugins/funder
2022-07-17T18:07:03.462Z DEBUG   plugin-manager: started(31638) /usr/local/bin/../libexec/c-lightning/plugins/topology
2022-07-17T18:07:03.481Z DEBUG   plugin-manager: started(31639) /usr/local/bin/../libexec/c-lightning/plugins/keysend
2022-07-17T18:07:03.501Z DEBUG   plugin-manager: started(31640) /usr/local/bin/../libexec/c-lightning/plugins/offers
2022-07-17T18:07:03.521Z DEBUG   plugin-manager: started(31641) /usr/local/bin/../libexec/c-lightning/plugins/pay
2022-07-17T18:07:03.541Z DEBUG   plugin-manager: started(31642) /usr/local/bin/../libexec/c-lightning/plugins/txprepare
2022-07-17T18:07:03.561Z DEBUG   plugin-manager: started(31643) /usr/local/bin/../libexec/c-lightning/plugins/spenderp
2022-07-17T18:07:03.705Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_channeld
2022-07-17T18:07:03.723Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_closingd
2022-07-17T18:07:03.741Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_connectd
2022-07-17T18:07:03.759Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_gossipd
2022-07-17T18:07:03.777Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_hsmd
2022-07-17T18:07:03.796Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_onchaind
2022-07-17T18:07:03.814Z DEBUG   lightningd: testing /usr/local/libexec/c-lightning/lightning_openingd
2022-07-17T18:07:03.833Z DEBUG   hsmd: pid 31651, msgfd 39
2022-07-17T18:07:04.097Z DEBUG   connectd: pid 31652, msgfd 43
2022-07-17T18:07:04.098Z DEBUG   hsmd: new_client: 0
2022-07-17T18:07:04.188Z DEBUG   connectd: Proxy address: 127.0.0.1:9050
2022-07-17T18:07:04.188Z DEBUG   connectd: Created IPv4 listener on port 9835
2022-07-17T18:07:04.188Z DEBUG   connectd: REPLY WIRE_CONNECTD_INIT_REPLY with 0 fds
2022-07-17T18:07:04.191Z DEBUG   gossipd: pid 31653, msgfd 42
2022-07-17T18:07:04.191Z DEBUG   hsmd: new_client: 0
2022-07-17T18:07:05.555Z DEBUG   gossipd: gossip_store_compact_offline: 0 deleted, 22662 copied
2022-07-17T18:07:05.555Z DEBUG   gossipd: Received channel_update for channel 738586x899x1/1 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 738586x1081x1/1 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 739408x2208x0/1 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 731109x938x1/0 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 700393x896x0/0 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 718348x836x0/0 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 737921x1833x0/0 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 724642x918x1/0 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 741095x1108x0/1 now ACTIVE
2022-07-17T18:07:05.556Z DEBUG   gossipd: Received channel_update for channel 736890x1413x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 723785x1459x1/0 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 723785x2343x1/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 741095x1126x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 741095x1031x1/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 738602x974x1/0 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 741095x541x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 710043x428x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 738602x969x1/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 731109x1119x0/0 now ACTIVE
2022-07-17T18:07:05.558Z DEBUG   gossipd: Received channel_update for channel 716516x843x0/0 now ACTIVE
2022-07-17T18:07:05.558Z DEBUG   gossipd: REPLY WIRE_GOSSIPD_INIT_REPLY with 0 fds

Doesn't it seem anything wrong in here.
hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
July 17, 2022, 01:21:25 PM
Code:
log-level=debug
I removed the already existent debug.log, ran daemon with --log-level=debug and this is what I get:
Code:
bitcoin@raspibolt:~ $ tail -f /home/bitcoin/.lightningmobile/debug.log
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 723785x2343x1/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 741095x1126x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 741095x1031x1/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 738602x974x1/0 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 741095x541x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 710043x428x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 738602x969x1/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 731109x1119x0/0 now ACTIVE
2022-07-17T18:07:05.558Z DEBUG   gossipd: Received channel_update for channel 716516x843x0/0 now ACTIVE
2022-07-17T18:07:05.558Z DEBUG   gossipd: REPLY WIRE_GOSSIPD_INIT_REPLY with 0 fds

Using screen
What's the difference with screen? I don't have this command.

screen only allows you to use the same ssh session and do other stuff, while if you don't use screen, you can only run that tail command in that ssh session if you want to keep watching the messages going and to do other stuff, you have to run another terminal in your host, start another ssh connection to your device, so that you have another terminal in you device to do other stuff, while the previous session runs the tail command.

That output is not showing anything about when the daemon started.  I think you started that command after you started the daemon. Do the other way around and leave the tail[/i] command running and then, in another terminal, start the daemon and whatch the tail command window. Or, another alternative is you simply start the daemon, let it try to connect, then stop it, and edit the debug file and check when the daemon starts to see what messgaes are there!
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
July 17, 2022, 01:14:39 PM
Code:
log-level=debug
I removed the already existent debug.log, ran daemon with --log-level=debug and this is what I get:
Code:
bitcoin@raspibolt:~ $ tail -f /home/bitcoin/.lightningmobile/debug.log
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 723785x2343x1/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 741095x1126x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 741095x1031x1/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 738602x974x1/0 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 741095x541x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 710043x428x0/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 738602x969x1/1 now ACTIVE
2022-07-17T18:07:05.557Z DEBUG   gossipd: Received channel_update for channel 731109x1119x0/0 now ACTIVE
2022-07-17T18:07:05.558Z DEBUG   gossipd: Received channel_update for channel 716516x843x0/0 now ACTIVE
2022-07-17T18:07:05.558Z DEBUG   gossipd: REPLY WIRE_GOSSIPD_INIT_REPLY with 0 fds

Using screen
What's the difference with screen? I don't have this command.
hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
July 17, 2022, 12:56:19 PM
[...]
I have a little problem with this. It worked, I did setup a second lightning node, I did make it connect with my mobile phone (using zeus), but it has now stopped working.

I run:
Code:
lightningd --conf=/home/bitcoin/.lightningmobile/lightningd.conf --lightning-dir=/home/bitcoin/.lightningmobile

And it just lags. It isn't running, because I run getinfo and this is what I get:
Code:
bitcoin@raspibolt:~ $ lightning-cli --lightning-dir=/home/bitcoin/.lightningmobile getinfo
lightning-cli: Connecting to 'lightning-rpc': Connection refused

I've killed the process, retried, nothing. I've also rebooted. My main node (from the default directory) works fine:
Code:
bitcoin@raspibolt:~ $ lightning-cli getinfo
{
   "id": "03cd32110547654132187f08e217b20e3ce69f49dff5119da5597a5c0f8a2c7a5e",
   "alias": "Lightning Vortex",
   "color": "03cd32",
   "num_peers": 11,
   "num_pending_channels": 0,
   "num_active_channels": 11,
   "num_inactive_channels": 0,
   "address": [
      {
         "type": "torv3",
         "address": "xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion",
         "port": 9735
      }
   ],
   "binding": [
      {
         "type": "ipv4",
         "address": "127.0.0.1",
         "port": 9735
      }
   ],
   "version": "v0.10.2",
   "blockheight": 745385,
   "network": "bitcoin",
   "msatoshi_fees_collected": 16898,
   "fees_collected_msat": "16898msat",
   "lightning-dir": "/home/bitcoin/.lightning/bitcoin"
}

Edit: One thing that's weird is that from above, you can see that it says "num_active_channels": 11, but from RTL, there are 10 active, and 1 inactive, which is right, because my second node is offline.

Edit #2: Whoever helps me fix it gets 9,001 Lightning sats.  Smiley

Before starting your second LN node, add debug to your log-level setting in your config file.

Code:
log-level=debug

Then start the output of that debug by running this command (it will use one ssh session unless you run it with screen or some such. I use screen.
Code:
tail -f /path/to/your/LNnodeFolder/debug.log

Using screen:
Code:
screen -S cl-debug -fa -m tail -f /path/to/your/LNnodeFolder/debug.log

To bring this screen back to the terminal so that you can see what is going on, you run:
Code:
screen -r cl-debug

And to send the screen back to the "background" you hit the following shortcut keys
Code:
CTRL + A + D
You have to press CTRL and hold it, then press A and lift it and then press D and lift it and CTRL.

This way, maybe you can get some more info about the problem!
Then, start your node in a new ssh session, so that you can look to the debug session and see what is going on.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
July 17, 2022, 12:34:50 PM
[...]
I have a little problem with this. It worked, I did setup a second lightning node, I did make it connect with my mobile phone (using zeus), but it has now stopped working.

I run:
Code:
lightningd --conf=/home/bitcoin/.lightningmobile/lightningd.conf --lightning-dir=/home/bitcoin/.lightningmobile

And it just lags. It isn't running, because I run getinfo and this is what I get:
Code:
bitcoin@raspibolt:~ $ lightning-cli --lightning-dir=/home/bitcoin/.lightningmobile getinfo
lightning-cli: Connecting to 'lightning-rpc': Connection refused

I've killed the process, retried, nothing. I've also rebooted. My main node (from the default directory) works fine:
Code:
bitcoin@raspibolt:~ $ lightning-cli getinfo
{
   "id": "03cd32110547654132187f08e217b20e3ce69f49dff5119da5597a5c0f8a2c7a5e",
   "alias": "Lightning Vortex",
   "color": "03cd32",
   "num_peers": 11,
   "num_pending_channels": 0,
   "num_active_channels": 11,
   "num_inactive_channels": 0,
   "address": [
      {
         "type": "torv3",
         "address": "xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion",
         "port": 9735
      }
   ],
   "binding": [
      {
         "type": "ipv4",
         "address": "127.0.0.1",
         "port": 9735
      }
   ],
   "version": "v0.10.2",
   "blockheight": 745385,
   "network": "bitcoin",
   "msatoshi_fees_collected": 16898,
   "fees_collected_msat": "16898msat",
   "lightning-dir": "/home/bitcoin/.lightning/bitcoin"
}

Edit: One thing that's weird is that from above, you can see that it says "num_active_channels": 11, but from RTL, there are 10 active, and 1 inactive, which is right, because my second node is offline.

Edit #2: Whoever helps me fix it gets 9,001 Lightning sats.  Smiley
hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
July 16, 2022, 04:56:00 AM
You just have to adjust some configs and parameters.
I'd use different users for each node, so you don't have to change default locations (maybe only ports) and don't risk accidentally messing up the other installation.

If you need a GUI:
Code:
xhost +SI:localuser:user2; su - user2
As user "user2":
Code:
export DISPLAY=:0.0
I've used this to run several Core clones for Forkcoins, but stopped doing it because dbcache settings eat too much memory.

Indeed, that is probably a good avice as if accidentaly you mess up with channels databases and mix them up and end up having both deamons running at the same time using the same databases, you'll get probably wiped out from your funds of at least one of the nodes! So, be very careful!
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
July 16, 2022, 04:33:09 AM
You just have to adjust some configs and parameters.
I'd use different users for each node, so you don't have to change default locations (maybe only ports) and don't risk accidentally messing up the other installation.

If you need a GUI:
Code:
xhost +SI:localuser:user2; su - user2
As user "user2":
Code:
export DISPLAY=:0.0
I've used this to run several Core clones for Forkcoins, but stopped doing it because dbcache settings eat too much memory.
hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
July 15, 2022, 08:42:44 AM
Is it possible to run more than one Core Lightning node on the same device (Pi)?

You can. You just have to adjust some configs and parameters. Other than that, I think there are no limitations (but hardware) to how many nodes you can run on the same device. Check this link for some tips:

https://bitcoin.stackexchange.com/questions/89832/setting-up-and-running-multiple-c-lightning-nodes-on-same-machine
https://bitcoin.stackexchange.com/questions/83803/is-it-possible-to-run-two-lightning-network-nodes-on-top-of-single-bitcoin-core

This reply is from Rene Pickardt! Can't get much better than that! Smiley
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
July 15, 2022, 08:04:31 AM
Is it possible to run more than one Core Lightning node on the same device (Pi)?
hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
July 12, 2022, 06:29:02 AM
Sorry, you are saying the plug-in works, but doing that manually is still the best options as far as results are concerned?
I believe I never had any success with the automatic method, but also no error messages either.

For Core Lightning users using RTL, manually is still the only way. So, you have to get your hands dirty in the command line for now. Which can only be good, as your learning will be better, in my opinion.
Oh really? Is it documented that lightning-cli rebalanceall simply doesn't work with Core Lightning backend? I had no idea about this.. Cheesy Just started it from time to time in hope it'd do something.
It does also give you an error message if you quickly invoke it again, which makes it seem like it's doing something.

Code:
bitcoin@localhost:~> lightning-cli rebalanceall
{
   "message": "Rebalance started with min rebalancable amount: 50000000msat, feeratio: 0.5"
}
bitcoin@localhost:~> lightning-cli rebalanceall
{
   "message": "Rebalance is already running, this may take a while. To stop it use the cli method 'rebalancestop'."
}

When I said manual rebalances, I meant using the command line other than using web frontends or any other intermediary tools. So, in this sense, the rebalanceall command would also be manual! I mean, it's not that you have some front end, click a few buttons and options and click "Rebalance".

Also, the rebalance plugin needs time to find routes to be able to perform the rebaçance. And when you use the rebalance plugin, there is even one of its parameters where you specify the amount of time the plugin should be working! After that, the attempts of rebalancing stops.

All right; I see. But rebalanceall is essentially the same thing, only without GUI, right?

It's closer to rebalance since you have to specify both channels. The only difference is that it's more convenient as you don't have to install the plugin (GUI supports only LND which does not require any extra software) and copy selected channels' ids manually (you select them from a drop-down menu).

Where did you find those invoices? In lightning-cli listinvoices?

I noticed them in the "Invoices" tab in RTL, but they also appear in the output of that command. Their descriptions follow this pattern: "short_channel_id1 to short_channel_id2".

It looks like I have a bunch of successful rebalancing attempts, but I am quite sure that I performed them manually.


I've also performed a few rebalances at the beginning when I started my node. But it's been long time that I don't try the plugin, mostly because as my node is quite small and not very active, I easily end up spending more sats in rebalancing than with forwarding payments! Never used the rebalanceall, though!
legendary
Activity: 1876
Merit: 3139
July 11, 2022, 08:00:28 PM
All right; I see. But rebalanceall is essentially the same thing, only without GUI, right?

It's closer to rebalance since you have to specify both channels. The only difference is that it's more convenient as you don't have to install the plugin (GUI supports only LND which does not require any extra software) and copy selected channels' ids manually (you select them from a drop-down menu).

Where did you find those invoices? In lightning-cli listinvoices?

I noticed them in the "Invoices" tab in RTL, but they also appear in the output of that command. Their descriptions follow this pattern: "short_channel_id1 to short_channel_id2".

It looks like I have a bunch of successful rebalancing attempts, but I am quite sure that I performed them manually.
hero member
Activity: 910
Merit: 5935
not your keys, not your coins!
July 11, 2022, 07:24:26 PM
Oh really? Is it documented that lightning-cli rebalanceall simply doesn't work with Core Lightning backend? I had no idea about this.. Cheesy Just started it from time to time in hope it'd do something.

BlackHatCoiner was referring to RTL's "Circular rebalance"; not the rebalanceall command. Still, I have used it a couple of times and it generated a few invoices, but all of them failed to be paid.
All right; I see. But rebalanceall is essentially the same thing, only without GUI, right?
Where did you find those invoices? In lightning-cli listinvoices?
legendary
Activity: 1876
Merit: 3139
July 11, 2022, 07:19:48 PM
Oh really? Is it documented that lightning-cli rebalanceall simply doesn't work with Core Lightning backend? I had no idea about this.. Cheesy Just started it from time to time in hope it'd do something.

BlackHatCoiner was referring to RTL's "Circular rebalance"; not the rebalanceall command. Still, I have used it a couple of times and it generated a few invoices, but all of them failed to be paid.
Pages:
Jump to: