stakwork / sphinx-relay

Node.js wrapper for communication between sphinx client and lightning node.
MIT License
249 stars 71 forks source link

Never connecting #133

Open rufus88 opened 3 years ago

rufus88 commented 3 years ago

Hello there when i run: npm run prod

nodeapp@1.0.0 prod /home/rafa/LN-EXTRA/sphinx-relay cp config/app.json dist/config/app.json && cp config/config.json dist/config/config.json && env NODE_ENV=production node dist/app.js

=> env: production => [db] starting setup... => [db] done syncing => [db] setup done => 2020-12-19 12:20:17 [lnd] reconnecting... attempt #1 Node listening on 3001. (node:13085) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead => 2020-12-19 12:20:19 [lnd] reconnecting... attempt #2 14 UNAVAILABLE: failed to connect to all addresses => 2020-12-19 12:20:21 [lnd] reconnecting... attempt #3 => 2020-12-19 12:20:23 [lnd] reconnecting... attempt #4 => 2020-12-19 12:20:25 [lnd] reconnecting... attempt #5 => 2020-12-19 12:20:27 [lnd] reconnecting... attempt #6 => 2020-12-19 12:20:29 [lnd] reconnecting... attempt #7 => 2020-12-19 12:20:31 [lnd] reconnecting... attempt #8

It stays there retrying forever and in the LND log i can see the following:

[ERR] BTCN: Can't accept connection: unable to accept connection from 192.168.1.8:57880: act one: invalid handshake version: 22, only 0 is valid

Thanks to any help provide it. Best Regards

Rafael

Evanfeenstra commented 3 years ago

What are your LND logs? u are sure its running?

Make sure to set the macaroon_location, tls_location, lnd_ip, and lnd_port to point to your LND

rufus88 commented 3 years ago

my production section from app.json

"production": { "senza_url": "https://staging.senza.us/api/v2/", "macaroon_location": "/home/kosmos/.lnd/data/chain/bitcoin/mainnet/admin.macaroon", "tls_location": "/home/kosmos/.lnd/tls.cert", "lnd_log_location": "/home/kosmos/.lnd/logs/bitcoin/mainnet/lnd.log", "node_ip": "192.168.1.8", "lnd_ip": "192.168.1.8", "node_http_protocol": "https", "node_http_port": "3001", "lnd_port": "9735", "hub_api_url": "https://hub.sphinx.chat/api/v1", "hub_url": "https://hub.sphinx.chat/ping", "hub_invite_url": "https://hub.sphinx.chat/invites", "hub_check_invite_url": "https://hub.sphinx.chat/check_invite", "media_host": "memes.sphinx.chat", "tribes_host": "tribes.sphinx.chat", "public_url": "192.168.1.8", "ssl": { "enabled": false, "save": true, "port": "80" } } }

yes, my LND server is running i juts check my channels status over cli and the external ip, is running fine. Yes ports and ip are configured properly whit the LND server. my ln node is accessible trough my external ip i also put the flag on lnd.conf for accept-keysend=true still no fix.