Post
Topic
Board Bitcoin Technical Support
Merits 2 from 1 user
Re: Lnd.exe error: 'loadConfig: Failed to create lnd directory: mkdir ...'
by
nefIndustries
on 03/12/2018, 23:16:52 UTC
⭐ Merited by BitCryptex (2)
(renaming the file to lnd.conf from lnd.conf.txt will do the trick once you change that setting)

This worked great, got rid of the warning! Thanks!

Your machine refuses the connection at port 9051.

Can you verify that the tor service is running at this port ?

I believe the standard port for tor is 9001 and 9051. But this can be freely changed. It is just important that you connect to the same port where tor is listening.

I got it working!

Here is what I did in case anybody in the future runs into the same issues that I do  Grin



I was able to confirm my tor service was running by launching run and typing 'services.msc'. I then scrolled down to confirm that 'Tor Win32 Service' was running.

Tor is running. Is my port open? Let's see!

I launched cmd as Administrator and ran the command
Code:
netstat -anb

I confirmed the port was open by scrolling up to my desired port number (127.0.0.1:9051) and ensuring the port's state was set to 'LISTENING'

So I confirmed the port was listening properly, so why was I still getting this error?

Code:
2018-12-02 18:14:38.452 [INF] LTND: Shutdown complete
unable to connect to Tor server: dial tcp 127.0.0.1:9051: connectex: No connection could be made because the target machine actively refused it.

I launched my Bitcoin Core Full Node launch using run with the commands/flags:

"C:\Program Files\Bitcoin\bitcoin-qt.exe" -txindex=1 -zmqpubrawblock=tcp://127.0.0.1:9051 -zmqpubrawtx=tcp://127.0.0.1:18504 -rpcuser=ezra -rpcpassword=Bignoodles -server=1 -rpcallowip=127.0.0.1

I then launched Powershell as administrator and started lnd.exe using this command with flags:

.\lnd.exe --bitcoin.active --bitcoin.mainnet --bitcoin.node=bitcoind --bitcoind.rpchost=127.0.0.1 --bitcoind.rpcuser=ezra --bitcoind.rpcpass=Bignoodles --bitcoind.zmqpubrawblock=tcp://127.0.0.1:9051 --bitcoind.zmqpubrawtx=tcp://127.0.0.1:18504 --debuglevel=info --rpclisten=localhost:10012


I can now connect to the Lightning Network & connect to peers!

However, lncli freezes when I try to open a channel with a peer. I believe this is due to the fact that I didn't receive a 'Uris' ID

To fix this, I went into %localappdata% and found my lnd.conf, and added the flag:

Code:
externalip=7p70tghbgasedo0.onion

MyIP is the same as my Bitcoin Core Full Node's IP address

Unfortunately at this point my lncli through Powershell would not be able to open a channel and would freeze every time I attempted.
I went over to the LND dev Slack, and they let me know I should be using Command Line instead of Powershell, and guess what!

It WORKS!



I started this journey to a Lightning Node on November 24th, and now have a fully working Lnd Node running over the Tor network! I had never used Tor before. Because of Lightning and the Bitcoin Core Full Node I learned so much about my computer (I thought I knew so much, I now know how much I have to learn Shocked) Thank you to @bob123 & @BitCryptex for helping me out, you are great! Also couldn't have done it without the LND Slack or Pierre Rochard on Twitter