Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet rejecting connections with lightning client #176

Open
theRescuer opened this issue Mar 28, 2021 · 4 comments
Open

Wallet rejecting connections with lightning client #176

theRescuer opened this issue Mar 28, 2021 · 4 comments

Comments

@theRescuer
Copy link

Hi,
I'm running Spark Wallet with c-lightning 0.9.3.1 in a docker deployment.
Almost every day the connection breaks with Browser exception '502 - Bad Gateway' showing up

Output of 'Docker logs' command
...
HTTP server running on http://0.0.0.0:9737
Lightning client connection closed, reconnecting
Lightning client connection error { Error: connect ECONNREFUSED /etc/lightning/lightning-rpc
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '/etc/lightning/lightning-rpc' }
uncaughtException, stopping process
Error: connect ECONNREFUSED /etc/lightning/lightning-rpc
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
nc: unix connect failed: Connection refused
Using lightningd directory mounted in /etc/lightning... waiting for RPC unix socket...
Starting spark wallet (standalone mode)...
Connected to c-lightning basedon-v0.9.3-1 with id 023808f558a644d786cb9071ea22f2afcd7329326170eded00dd2ce0b4e377ed2f on network bitcoin at /etc/lightning/lightning-rpc
Loading login credentials from /data/.cookie

@shesek
Copy link
Owner

shesek commented Apr 8, 2021

I see that you're using a c-lightning instance that's mounted from the host, can you check its log files for errors when spark gets disconnected from it?

@theRescuer
Copy link
Author

Here it comes

docker logs 6cc7f04bc66a --tail 150

Lightning client connection closed, reconnecting
Trying to reconnect...
Lightning client connection error Error: connect ECONNREFUSED /root/.lightning/lightning-rpc
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '/root/.lightning/lightning-rpc'
}
events.js:291
throw er; // Unhandled 'error' event
^

Error: connect ECONNREFUSED /root/.lightning/lightning-rpc
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
Emitted 'error' event on LightningClient instance at:
at Socket. (/usr/src/app/lightning-client-js.js:71:23)
at Socket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '/root/.lightning/lightning-rpc'
}
Waiting /root/.nbxplorer/btc_fully_synched to be created...
The chain is fully synched
Reading config file
cl-rest state dir: /usr/src/app
Reading config file
--- Starting the cl-rest server ---
Reading SSL cert and key
Reading rootkey for macaroon
--- cl-rest api server is ready and listening on port: 3001 ---
--- cl-rest doc server is ready and listening on port: 4001 ---
Lightning client connection error Error: connect ECONNREFUSED /root/.lightning/lightning-rpc
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '/root/.lightning/lightning-rpc'
}
events.js:291
throw er; // Unhandled 'error' event
^

Error: connect ECONNREFUSED /root/.lightning/lightning-rpc
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
Emitted 'error' event on LightningClient instance at:
at Socket. (/usr/src/app/lightning-client-js.js:71:23)
at Socket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '/root/.lightning/lightning-rpc'
}
Waiting /root/.nbxplorer/btc_fully_synched to be created...
The chain is fully synched
Reading config file
cl-rest state dir: /usr/src/app
Reading config file
--- Starting the cl-rest server ---
Reading SSL cert and key
Reading rootkey for macaroon
--- cl-rest api server is ready and listening on port: 3001 ---
--- cl-rest doc server is ready and listening on port: 4001 ---
Lightning client connection error Error: connect ECONNREFUSED /root/.lightning/lightning-rpc
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '/root/.lightning/lightning-rpc'
}
events.js:291
throw er; // Unhandled 'error' event
^

Error: connect ECONNREFUSED /root/.lightning/lightning-rpc
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
Emitted 'error' event on LightningClient instance at:
at Socket. (/usr/src/app/lightning-client-js.js:71:23)
at Socket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '/root/.lightning/lightning-rpc'
}
Waiting /root/.nbxplorer/btc_fully_synched to be created...
The chain is fully synched
Reading config file
cl-rest state dir: /usr/src/app
Reading config file
--- Starting the cl-rest server ---
Reading SSL cert and key
Reading rootkey for macaroon
--- cl-rest api server is ready and listening on port: 3001 ---
--- cl-rest doc server is ready and listening on port: 4001 ---
Lightning client connected

@shesek
Copy link
Owner

shesek commented Apr 9, 2021

Oh, I see it's part of a BTCPay setup, it helps to know that.

The errors in your last comment don't originate from Spark Wallet, they're from RTL's c-lightning-rest. This suggests that c-lightning is generally malfunctioning, and that it's not a Spark-specific issue.

I would suggest to try asking in the BTCPay support chat.

@theRescuer
Copy link
Author

Ok, thanks.
I'll ask them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants