Closed d4amenace closed 2 years ago
Hi, can you try to remove one bind-addr
from the conf?
Hello, I just redid an install on a new container. I have ensured lightning functions up to the tor install point. I then did a tor setup and was checking external ip and internal ip for matching for Case 2. I have done the full setup. I get one peculiar result when I check the internal ip with: ip route get 1 | awk '{print $NF;exit}'
I return: 0.
While the check for external ip address: curl ipinfo.io/ip ....returns my proper external ip address.
(1) Could this be the problem? I am creating the container inside proxmox. (ip routing needed?)
(2) I am running through a home router and isp. Do I need to open ports 9050 and 9051 on my router for tor?
(2a) And....if this is the issue, this means each container would need its own tor ports...so wouldn't it make sense to be able to deploy a single tor onion service on a container and do ip routing to it to retrieve ip addresses for all other c-lightning containers needing tor onion addresses (since I intend on running multiple c-lightning containers and each would need it's own lightning address)....or do some sort of nfs server since c-lightning requires a tor installed (all c-llightning instances could reference the central containers tor).
Current config:
alias=
bind-addr=0.0.0.0:9800
announce-addr=(my_ip):9800
network=bitcoin
log-file=lightning.log
bitcoin-rpcconnect=192.168.1.135
bitcoin-rpcport=8336
bitcoin-rpcuser=nextlayer
bitcoin-rpcpassword=J_fZOsGNQIQDKJYxxxxxxxxxxxxxxxxx
plugin=/root/c-lightning-events/websocket-events.js
websocket-events=all
websocket-port=8100
bind-addr=127.0.0.1:9800
announce-addr=lfhvju6mzqakansfvet2x65j27gypwvokkvj6erx2pn7un$
proxy=127.0.0.1:9050
addr=statictor:127.0.0.1:9051
always-use-proxy=true
bind-addr=192.168.1.177:9800
Current error msg from lightning log:
2022-03-05T18:17:14.009Z INFO connectd: Static Tor service onion address: "oxb6llpgh6ayzswzhwevdvk45dcsyd7snvbgyhwp4b2g42curhgg2rid.onion:9735,0.0.0.0:9800" bound $
2022-03-05T18:17:14.569Z INFO plugin-bcli: bitcoin-cli initialized and connected to bitcoind.
2022-03-05T18:17:15.952Z **BROKEN** connectd: Failed to listen on socket 127.0.0.1:9800: Address already in use
Current error msg from inline print:
root@V ~# lightningd
Reading JSON input: Connection reset by peerReading JSON input: Connection reset by peer
Lost connection to the RPC socket.
Lost connection to the RPC socket.Reading JSON input: Connection reset by peer
Reading JSON input: Connection reset by peer
Reading JSON input: Connection reset by peer
root@V ~# node:events:505
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:160:15)
at writeGeneric (node:internal/stream_base_commons:151:3)
at Socket._writeGeneric (node:net:796:11)
at Socket._write (node:net:808:8)
at writeOrBuffer (node:internal/streams/writable:390:12)
at _write (node:internal/streams/writable:331:10)
at Socket.Writable.write (node:internal/streams/writable:335:10)
at Plugin._write (/root/c-lightning-events/node_modules/clightningjs/src/plugin.js:40:25)
at Plugin._writeJsonrpcResponse (/root/c-lightning-events/node_modules/clightningjs/src/plugin.js:116:16)
at Plugin._mainLoop (/root/c-lightning-events/node_modules/clightningjs/src/plugin.js:201:22)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:164:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
Node.js v17.6.0
UPDATE: I have removed all tor related information to make troubleshooting easier. I can get the node to connect to the bitcoind in the other container (via local NAT address ONLY, lightningd cannot remotely rpc connect to bitcoin through external ip address) but I cannot download any blocks ....so the getinfo call shows "0" blocks forever.....
root@V ~# lightning-cli getinfo
{
"id": "0382cccccccc",
"alias": " ^ccccc",
"color": "0382d5",
"num_peers": 0,
"num_pending_channels": 0,
"num_active_channels": 0,
"num_inactive_channels": 0,
"address": [
{
"type": "ipv4",
"address": "73.36.65.41",
"port": 9800
}
],
"binding": [
{
"type": "ipv4",
"address": "0.0.0.0",
"port": 9800
}
],
"version": "v0.10.2-399-gb5a1715",
"blockheight": 0,
"network": "bitcoin",
"msatoshi_fees_collected": 0,
"fees_collected_msat": "0msat",
"lightning-dir": "/root/.lightning/bitcoin",
"warning_lightningd_sync": "Still loading latest blocks from bitcoind.",
"our_features": {
"init": "08026aa2",
"node": "80000008026aa2",
"channel": "",
"invoice": "024200"
}
}
My current config file:
announce-addr=[external_ip]:9800
network=bitcoin
log-file=lightning.log
bitcoin-rpcconnect=192.168.1.135
bitcoin-rpcport=8336
bitcoin-rpcuser=xxxx
bitcoin-rpcpassword=xxxxxxx
plugin=/root/c-lightning-events/websocket-events.js
websocket-events=all
websocket-port=8100
bind-addr=0.0.0.0:9800
I am still under the belief it has something to do with ip forwarding in proxmox due to:
".....when I check the internal ip with: ip route get 1 | awk '{print $NF;exit}'
I return: 0."
Any help would be greatly appreciated.
Hi, can you try to remove one
bind-addr
from the conf?
I figured it would be easier to just remove tor and see if the problem had nothing to do with tor, which seems to be the case.
I have a freshly installed lighting node in a container that points to a seperate container that it uses to connect to bitcoind. I have setup Tor as well and I think my configuration might be incorrect.
Conf file:
This is the error I get from logs:
Where am I going wrong?