`sudo: unable to resolve host host: Name or service not known`

Hello,
I think I messed something up and I can’t find solution on my own; tried googling it, but afraid I might mess it even more as most advices are related to ubuntu etc and I’m aware whonix is more complex:

I didn’t change anything, I might shut down terminal while something was running though. I tried updating&upgrading, but won’t fix anything once it’s done. I installed psi-plus from debian repo, rebooted, ran update&upgrade and then problems started. Tor browser is not working (error: failed to execute, input/output error)

sudo: unable to resolve host host: Name or service not known

My assumption was something was still running making apt busy, but after checking:

user@host:~$ ps aux | grep -i apt
user      7907  0.0  0.0   6072   828 pts/0    S+   02:34   0:00 grep -i apt

tried:
sudo killall apt apt-get
Does nothing though. Also I didn’t change ‘hostname’ and when I type it’s to terminal it says ‘host’ as it was by default.

Again, I’ll be thankful for help, I’m really stuck here and afraid to try random solutions I found online in order not to mess anything.

etc/hosts:
GNU nano 3.2 /etc/hosts

127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

hostname
GNU nano 3.2 /etc/hostname

host

You would have to run this with sudo at the moment due to hidepid (users cannot see processes of other users). (See forums and web search for more on hidepid.)

Hosts file should look like this:
https://github.com/Whonix/anon-base-files/blob/master/etc/hosts.anondist

1 Like

@Patrick Running that
ps aux | grep -i apt
as sudo shows same results though.
I replaced the hosts file with default from link you gave me, thank you.
Hosts file looks like that now:

127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
fe00::0         ip6-localnet
ff00::0         ip6-mcastprefix
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters
127.0.0.1 host.localdomain host

My sudo error is gone, but I still can’t run tor-browser:
(error: failed to execute, input/output error)

What’s wrong with my configuration?

Is it possible that installation of some software (psi-plus)from debian repo could mess with something else apart from hosts? As this happened shortly after I installed it.
thank you

EDIT: Just noticed whonixcheck is gone from workstation, can’t use it in terminal too (command not found).
Shared clipboard stopped working, sharing files crashing the VM’s. Seems like everything is messed and I have no clue what I did to cause it.
I did install whonix check (sudo apt-get install whonixcheck), result after installing and running it, says:

user@host:~$ whonixcheck
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 0 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 1 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 2 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 3 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 4 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 5 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 6 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 7 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 8 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 9 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 10 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 11 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 12 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 13 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 14 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 15 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 16 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 17 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 18 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 19 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 20 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 21 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 22 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 23 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 24 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 25 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 26 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 27 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 28 of 30.
[INFO] [whonixcheck] Whonix firewall systemd unit check Result: Waiting 29 of 30.
[ERROR] [whonixcheck] whonix_firewall failed to load!

The whonix_firewall failed to load for some reason. This could be due to the firewall being mis-configured or race-condition. Try restarting the VM to see if this error persists.

Failure file /run/anon-firewall/failed.status does not exist, ok.

output of sudo systemctl status whonix-firewall:

########################################
● whonix-firewall.service
   Loaded: masked (Reason: Unit whonix-firewall.service is masked.)
   Active: inactive (dead)
########################################

output of sudo journalctl --boot -u whonix-firewall:

########################################
-- Logs begin at Sat 2020-03-07 16:43:02 UTC, end at Sat 2020-03-07 17:05:13 UTC. --
-- No entries --
########################################

To see this for yourself...
1. Open a terminal. (Start Menu -> System -> Terminal)
2. Run. sudo systemctl status whonix-firewall
2. Also see. sudo journalctl --boot -u whonix-firewall | cat
3. Try to manually start Whonix firewall. sudo whonix_firewall

If you know what you are doing, feel free to disable this check.
Create a file /etc/whonix.d/50_whonixcheck_user.conf and add:
whonixcheck_skip_functions+=" check_whonix_firewall_systemd_status "
user@host:~$ sudo systemctl status whonix-firewall
● whonix-firewall.service
   Loaded: masked (Reason: Unit whonix-firewall.service is masked.)
   Active: inactive (dead)
user@host:~$ sudo journalctl --boot -u whonix-firewall | cat
-- Logs begin at Sat 2020-03-07 16:43:02 UTC, end at Sat 2020-03-07 17:06:11 UTC. --
-- No entries --
user@host:~$ sudo whonix_firewall
sudo: whonix_firewall: command not found
user@host:~$ sudo apt-get install whonix_firewall
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package whonix_firewall
user@host:~$ sudo whonix_firewall
sudo: whonix_firewall: command not found

Is there a way to bring back system files to default without removing all my data on workstation?