Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Possible Bug? Are we backing up HashedControlPassword in tor/torrc-core? #52

Closed
WilliamConnatser opened this issue Jun 7, 2022 · 4 comments

Comments

@WilliamConnatser
Copy link

Posting this one behalf of a user:

My issue is that HashedControlPassword in tor/torrc-core is empty/no pass. i don't know why. but i managed for now to get around it by modifying the docker-compose to point to my own torrc-core file. i generated a HashedControlPassword using "tor —hashed-password [password here]" using the tor.password from the lnd/lnd.conf and put that as the password and it works for now. Not ideal but finally came up after 3 days of being stuck

https://logs.runcitadel.space/b386bb9f9b80f7b4083f59eae739dd9f

I just thought it would be good to double check we are backing this up properly. I will try to figure it out if I have time later. I just posting this here as a reminder, but ya'lls thoughts would be appreciated too! @AaronDewes @pwltr 🙏🙏

@jcr0ss
Copy link

jcr0ss commented Jun 8, 2022

This issue is from me. This is on WSL 2.0 using both Ubuntu and then later on Fedora. After installing on both everything came up besides lightning and bitcoin 100% synced. The error I was seeing in the logs was

lightning | unable to initialize tor controller: unable to connect to Tor server: dial tcp 10.21.21.11:29051: connect: connection refused

Later I was able to see the logs of tor using 'docker compose logs tor' from the citadel directory and at the top I finally saw some helpful clue. It said:

tor | Jun 07 22:25:42.845 [warn] You have a ControlPort set to accept unauthenticated connections from a non-local address. This means that programs not running on your computer can reconfigure your Tor, without even having to guess a password. That's so bad that I'm closing your ControlPort for you. If you need to control your Tor remotely, try enabling authentication and using a tool like stunnel or ssh to encrypt remote access.

At first I thought I needed to do something with 'ip tables' but that wasn't it. Later I keyed in on the part about "without even having to guess a password" and then I saw in tor/torrc-core the HashedControlPassword didn't have a password and I felt like that must be it. After some googling I found that I could type 'tor --hash-password [password]' to generate a hashed password. Then I figured on checking in lnd/lnd.conf to see if it contained a password and it did so I tried with that and generated some hashed password. Then I needed a way to use my new HashedControlPassword but if I modified tor/torrc-core I knew it would get replaced when i restarted citadel. So I decided to try pointing the docker-compose to a torrc-core file outside of citadel that I had control of where the only change I made was giving the HashedControlPassword the value generated for the tor --hashed-password command. Then I restarted citadel and it worked.

Docker containers

NAMES STATUS
nginx Up About an hour
middleware Up About an hour
manager Up About an hour
redis Up About an hour
app-2-tor Up About an hour
app-3-tor Up About an hour
lightning Up About an hour
app-tor Up About an hour
electrum Up About an hour
dashboard Up About an hour
bitcoin Up About an hour
tor Up About an hour

Writing all this incase anyone else tries with WSL 2.0 and has the same issue. This was my only issue bringing up citadel.

I hope there can be some fix to get HashedControlPassword populated on start up but if not this is my workaround

@AaronDewes
Copy link
Member

The password is normally generated by the configure script. If it's missing, the configure script did not run properly, probably because you did not install the required dependencies that are mentioned on our website.

We should improve the error messages in this case, but this does not seem to be a bug.

@AaronDewes AaronDewes closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2022
@jcr0ss
Copy link

jcr0ss commented Jun 10, 2022

@AaronDewes

I ran
curl -fsSL https://get.docker.com | sh
sudo apt -y install fswatch jq rsync curl
sudo apt -y install python3-jsonschema python3-dacite python3-semver python3-requests python3-yaml

On both ubuntu and fedora it could not find python3-dacite, not sure why, so i used
pip install dacite to get it

maybe that is causing it? Other than that everything was the same as the guide says.

@AaronDewes
Copy link
Member

AaronDewes commented Jun 10, 2022

python3-dacite only exists on Ubuntu 22.04, which the guide mentions as minimum version. You are using an OS which is too old.

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

No branches or pull requests

3 participants