Skip to content

"transport: Error while dialing dial tcp 127.0.0.1:10009: connect: connection refused #6554

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

Closed
Dottishy opened this issue May 19, 2022 · 2 comments

Comments

@Dottishy
Copy link

Background

Unable to create wallet with LND and Bitcoin Core in testnet configuration. Am I missing any configurations or logs in this issue? Tell me and I will try my best to get it quickly.

Your environment

lnd version 0.14.3-beta commit=v0.14.3-beta
Bitcoin Core version v22.0
Linux debian 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64 GNU/Linux

bitcoin.conf.txt
lnd.conf.txt

Bitcoind running:

lnd@debian:~$ bitcoin-cli --getinfo
{
  "version": 220000,
  "blocks": 2226195,
  "headers": 2226195,
  "verificationprogress": 0.9999993975596485,
  "timeoffset": 0,
  "connections": {
    "in": 0,
    "out": 10,
    "total": 10
  },
  "proxy": "",
  "difficulty": 55580658.55098472,
  "chain": "test",
  "relayfee": 0.00001000,
  "warnings": "Unknown new rules activated (versionbit 28)"

UFW Configuration:

lnd@debian:~$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere
9735                       ALLOW       Anywhere
10009                      ALLOW       Anywhere
OpenSSH (v6)               ALLOW       Anywhere (v6)
9735 (v6)                  ALLOW       Anywhere (v6)
10009 (v6)                 ALLOW       Anywhere (v6)

System is running in a VM in Virtual Box.

Steps to reproduce

Following this guide https://github.com/alexbosworth/run-lnd to install and set up Tor, Bitcoin Core, Go and LND with dependencies.
Remove/comment mainnet configuration and set to testnet.

The installation in this issue is without Tor/Onion in case that might have caused the issue. Same issue persist in Tor configuration as well.

Expected behaviour

RPC connection should not be refused and wallet should be created.

Actual behaviour

lnd@debian:~$ lncli create
Input wallet password:
Confirm password:

Do you have an existing cipher seed mnemonic or extended master root key you want to use?
Enter 'y' to use an existing cipher seed mnemonic, 'x' to use an extended master root key
or 'n' to create a new seed (Enter y/x/n): n

Your cipher seed can optionally be encrypted.
Input your passphrase if you wish to encrypt it (or press enter to proceed without a cipher seed passphrase):

Generating fresh cipher seed...

[lncli] unable to generate seed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:10009: connect: connection refused"
@guggero
Copy link
Collaborator

guggero commented May 19, 2022

Did you start lnd before running lncli create?

@Dottishy
Copy link
Author

lnd@debian:~$ lnd
2022-05-19 11:08:58.234 [INF] LTND: Version: 0.14.3-beta commit=v0.14.3-beta, build=production, logging=default, debuglevel=CNCT=debug,CRTR=debug,HSWC=debug,NTFN=debug,RPCS=debug
2022-05-19 11:08:58.234 [INF] LTND: Active chain: Bitcoin (network=testnet)
2022-05-19 11:08:58.235 [INF] RPCS: RPC server listening on 0.0.0.0:10009
2022-05-19 11:08:58.236 [INF] RPCS: gRPC proxy started at 127.0.0.1:8080
2022-05-19 11:08:58.236 [INF] LTND: Opening the main database, this might take a few minutes...
2022-05-19 11:08:58.236 [INF] LTND: Opening bbolt database, sync_freelist=true, auto_compact=true
2022-05-19 11:08:58.236 [INF] CHDB: Not compacting database file at /home/lnd/.lnd/data/graph/testnet/channel.db, it was last compacted at 2022-05-18 23:02:05.666815958 +0100 BST (12h6m52s ago), min age is set to 168h0m0s
2022-05-19 11:08:58.236 [INF] CHDB: Not compacting database file at /home/lnd/.lnd/data/chain/bitcoin/testnet/macaroons.db, it was last compacted at 2022-05-18 23:02:05.670358801 +0100 BST (12h6m52s ago), min age is set to 168h0m0s
2022-05-19 11:08:58.237 [INF] CHDB: Not compacting database file at /home/lnd/.lnd/data/graph/testnet/sphinxreplay.db, it was last compacted at 2022-05-18 23:02:05.673287199 +0100 BST (12h6m52s ago), min age is set to 168h0m0s
2022-05-19 11:08:58.237 [INF] LTND: Creating local graph and channel state DB instances
2022-05-19 11:08:58.241 [INF] CHDB: Checking for schema update: latest_version=24, db_version=24
2022-05-19 11:08:58.241 [INF] LTND: Database(s) now open (time_to_open=5.139882ms)!
2022-05-19 11:08:58.241 [ERR] LTND: Shutting down because error in main method: error creating wallet config: wallet unlock password file was specified but wallet does not exist; initialize the wallet before using auto unlocking
2022-05-19 11:08:58.243 [INF] LTND: Shutdown complete

error creating wallet config: wallet unlock password file was specified but wallet does not exist; initialize the wallet before using auto unlocking

I had not really considered that to be the issue, I thought the problem would be at Bitcoin Core, as I thought lnd would need a wallet to start. But after commenting out the auto unlocking in lnd.conf I was able to start lnd.

#wallet-unlock-password-file=/path/password

After attempting to create again:

lnd successfully initialized!

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