Post
Topic
Board Bitcoin Technical Support
Re: Lnd.exe error: 'loadConfig: Failed to create lnd directory: mkdir ...'
by
nefIndustries
on 02/12/2018, 22:27:54 UTC

I was not, I have been using the browser meaning the browser had to be open for traffic to be routed, which is not recommended according to @cellard from this post (6th reply)

So, you are trying to use the bundled Tor from Tor Browser rather than a dedicated Tor daemon?  This is not recommended.

IIRC, the default TCP port for Tor Browser’s Tor’s SOCKSPort is 127.0.0.1:9150, which explains why Bitcoin could not connect to port 9050.  On Linux, at least, recent versions of Tor Browser may even use a UNIX domain socket rather than a TCP socket.  But I’m not even sure what it does by default, since I use Tor Browser with an external Tor daemon on a network-isolating gateway.  I would need to search—I recommend that you do so, if you really want to use Tor Browser’s Tor.

If you want to add another SOCKSPort to Tor Browser, look for Browser/TorBrowser/Data/Tor/torrc.  See the Tor manual page for documentation of SOCKSPort.  Be aware that this will probably (?) be wiped out when you upgrade Tor Browser.

It is strongly recommended that you set up a separate Tor daemon for your Bitcoin.  I recommend doing so on a gateway which isolates the internal network; this affirmatively prevents all leaks of your “real” IP address, whether malicious or accidental.  Many applications leak horribly, doing direct DNS lookups even when they purport to accept SOCKS proxy settings.  You can set up a Tor gateway on a cheap computer with two Ethernet ports, or using VMs within the same physical machine.  On FreeBSD, the jail subsystem provides a lightweight means to achieve this.  N.b. that if you use a separate Tor daemon with Tor Browser, it requires some muttered incantations to disable Tor Browser’s bundled Tor; and you must do this to avoid “Tor-over-Tor”, which will harm your anonymity as well as killing performance.


I followed the guide you linked, and my method was a little bit different than in the guide. I had to open up command prompt as administrator, and change directory to my Tor file
Code:
cd C:\Users\Ezra\Desktop\Tor Browser\Browser\TorBrowser\Tor

and THEN I was able to create the tor service
Code:
tor.exe -install service

For me it did not work unless I was running cmd as administrator

Don't forget to actually run tor.exe before launching the Full Node

Thank you for the link, that helped me solve a problem I would eventually run into.

Are you running the commands with an administrator account?
It can't find lnd.exe because it is not in the current directory. Navigate to the directory where the .exe is placed (seems to be C:\Users\Ezra\), then try it again.

Lol, duh. Thank you Smiley Helped me fix that pretty quickly. Running Powershell as admin, and going to the correct directory got rid of all the mkdir issues I was getting.

New Errors

So it seems my initial two errors are fixed. Now I have one error and a warning that I am worried about

Currently I am hung up on this error

My lnd.exe command with flags:

Code:
.\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:18503 --bitcoind.zmqpubrawtx=tcp://127.0.0.1:18504 --debuglevel=info --listen=localhost --tor.active --tor.streamisolation --tor.v3 listen=localhost

It catches up to the block hashes fine, but when (what I assume is) getting Lightning Network channel information, it gets hung up with the error message:

Code:
2018-12-02 16:50:39.861 [ERR] SRVR: unable to start server: 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 haven't looked into it too much, I will start googling after this post, just wanna update with the progress you guys are helping with.

The warning message happens in the lnd.exe console right after I press Enter using these flags:
Code:
.\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:18503 --bitcoind.zmqpubrawtx=tcp://127.0.0.1:18504 --debuglevel=info --listen=localhost --tor.active --tor.streamisolation --tor.v3 listen=localhost

The warning message is:
Code:
2018-12-02 16:46:16.575 [WRN] LTND: open C:\Users\Ezra\AppData\Local\Lnd\lnd.conf: The system cannot find the file specified.


I went into that directory and created a new txt file named 'lnd.conf', But I believe the computer saves it as lnd.conf.txt, resulting in this warning. Unfortunate because it would be great to have a log of all this crap  Grin

I'm off to try and find a solution, when I find one I will update the thread Smiley