Reinstall Tor - non tor apt-get

I have an error where my tor.default.service won’t start. So I can’t use tor on whonix.
I’m wondering if there is a way around reinstalling the entire system.
I want to reinstall only tor and it’s related components, but for any apt commands involving downloads (for instance of a fresh tor software) I can’t connect to the tor-sock and hence the download won’t initiate since I can’t connect to internet from the command prompt.

I’m noticing though, that I can surf on the web just fine on firefox inside whonix. So ultimately, is there any way I can access the internet to locate the relevant packages from the command prompt not through tor but using the same node as I access the internet with when on firefox? There is a lot of talk about everything on whonix going through tor, and it’s the all tor operating system and yada yada, but apparently firefox works without being connected to tor even in whonix.

So I’m wondering, is there any special command that will let me manually choose method of connection from the command prompt to locate the tor packages using the same connection as firefox successfully uses, deactivating the automatic Socks5 connect to 127.0.01 tor proxy, just to retrieve one package?

I’m not the only one for whom tor breaks and would need a reinstall.

http://qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/doc/how-to-reinstall-a-template/

This seems confusing. Please confirm you’re talking about Tor and not Tor Browser. Please don’t shortcut writing Tor when you’re having issues with Tor Browser.

Because what you’re describing seems either grave user error or impossible due to sloppy terminology.

1 thing at a time. Please post a high quality bug report.

Which virtualizer? Which VM? Steps for reproduction? Error messages, log output?

“a way around” means “without”. Without reinstalling.

Also user didn’t indicate being a Qubes user?

My bad, not only one mistake but two. I thought I saw this in the Qubes section and the question was a full reinstall.

I’m sorry that my terminology is sloppy, I’m not so tech savvy.
I’m not sure whether my issue is only with torbrowser, but I don’t think it is only the browser.
I’ll try to give the facts:
Yesterday when starting up whonix workstation I got an error flashing by that tor@default.service Failed to start.
I don’t get this error anymore at startup, but issues remain.

When starting up my torbrowser I get the error “Tor Browser could not connect to Tor”

When trying to download a package using apt-get in the terminal the process freezes at “0% [Connecting to SOCKS5h proxy (socks5h://127.0.0.1:9050)]”

Interestingly, when I run “sudo journalctl -f -b --output cat --no-pager -u tor -u tor@default -u vanguards”

I get the output:

"NOTICE[Tue Sep 26 14:29:14 2023]: Tor needs descriptors: Cannot read /var/lib/tor/cached-microdesc-consensus: [Errno 2] No such file or directory: ‘/var/lib/tor/cached-microdesc-consensus’. Trying again…

I am not using Qubes OS

related:

(Whonix is based on Kicksecure.)

I hope it’s not needed to go this route. While possible in theory, it’s for developers only.

At that stage it’s better to simply to a factory reset and not a footgun.

This wasn’t ever required to my knowledge in 11 years of user support so probably nothing to worry about.

In theory you could use apt-offline but please don’t ask me how to use it and I am not using it and it should be completely unspecific to Whonix.

Could be done as per:

This isn’t the real Tor. It’s something else.
(anon-ws-disable-stacked-tor)
If this is happening again, please report this separately in a new forum thread.

See Troubleshooting - Whonix chapter Daemon Log View in Whonix wiki.

sudo journalctl -b --no-pager -u tor@default.service

Either a non-issue (upstream bug is that vanguards starts before Tor) or a follow-up issue.

The root issue could be that Tor on the gateway doesn’t start due to user changes to the Tor configuration. In this case:
Tor Documentation for Whonix Users chapter Configuration Check in Whonix wiki

Generally for these cases there’s this wiki page:

Start with making sure that Whonix-Gateway is functional.

systemcheck --ip-test

Then the same in Whonix-Workstation.

If that isn’t giving enough leads, refer back to the Troubleshooting wiki page which contains the next steps.

Thank you! That’s many leads to follow up, I’ll get started. Interesting to learn in case the same thing happens again, even if I would have to factory reset the entire system this time. I’m curious to find out what this tor@default.service actually is if it is not the real tor. People say it is related to the torrc-file…

Anyway, I tried ```
sudo journalctl -b --no-pager -u tor@default.service
``
the log is saying" Sep 26 15:14:47 host Tor[956]: 783 connections died in state handshaking (TLS) with SSL state error in HANDSHAKE
Sep 26 15:14:47 host Tor[956]: 148 connections died in state handshaking (TLS) with SSL state SSLv3/TLS write client hello in HANDSHAKE
Sep 26 15:14:47 host Tor[956]: 1 connections died in state handshaking (Tor, v3 handshake) with SSL state SSL negotiation finished successfully in CLOSED
Sep 26 15:14:47 host Tor[956]: 1 connections died in state handshaking (Tor, v3 handshake) with SSL state error in OPEN
"
Will keep investigating this.
Much appreciated that you took the time

Yeah. You need to fix Tor on the gateway.

In the gateway it’s the real Tor.

In the workstation it’s a dummy Tor. anon-ws-disable-stacked-tor

1 Like

Okay! So how do I fix it?

1 Like