Please help: Tor failed to start Error code 1

I am using Whonix on VM. Recently Whonix asked to run an update, and immediately after doing so I start getting a “failed to start Tor” message in Whonix Gateway. My error report looks like that:

ERROR: Tor Config Check Result:
Your Tor config file contains at least one error.

(Tor exit code: 1)

Tor concise reports (below warns and errors must be fixed before you can use Tor):
Apr 23 11:22:38.459 [warn] Option ‘DisableNetwork’ used more than once; all but the last value will be ignored.
Apr 23 11:22:38.459 [warn] Failed to parse/validate config: Unknown option ‘’. Failing.
Apr 23 11:22:38.459 [err] Reading config failed–see warnings above.

Tor full reports:
Apr 23 11:22:38.457 [notice] Tor 0.4.7.13 running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1n, Zlib 1.2.11, Liblzma 5.2.5, Libzstd 1.4.8 and Glibc 2.31 as libc.
Apr 23 11:22:38.457 [notice] Tor can’t help you if you use it wrong! Learn how to be safe at torproject
Apr 23 11:22:38.457 [notice] Read configuration file “/etc/tor/torrc”.
Apr 23 11:22:38.458 [notice] Processing configuration path “/etc/torrc.d/.conf" at recursion level 1.
Apr 23 11:22:38.458 [notice] Including configuration file “/etc/torrc.d/60_network.conf”.
Apr 23 11:22:38.458 [notice] Including configuration file “/etc/torrc.d/65_gateway.conf”.
Apr 23 11:22:38.458 [notice] Including configuration file “/etc/torrc.d/65_leak_tests.conf”.
Apr 23 11:22:38.458 [notice] Including configuration file “/etc/torrc.d/70_workstation.conf”.
Apr 23 11:22:38.458 [notice] Processing configuration path “/usr/share/tor/tor-service-defaults-torrc.anondist” at recursion level 2.
Apr 23 11:22:38.458 [notice] Including configuration file “/usr/share/tor/tor-service-defaults-torrc.anondist”.
Apr 23 11:22:38.458 [notice] Including configuration file “/etc/torrc.d/95_whonix.conf”.
Apr 23 11:22:38.458 [notice] Processing configuration path "/usr/local/etc/torrc.d/
.conf” at recursion level 2.
Apr 23 11:22:38.458 [notice] Including configuration file “/usr/local/etc/torrc.d/40_tor_control_panel.conf”.
Apr 23 11:22:38.458 [notice] Including configuration file “/usr/local/etc/torrc.d/50_user.conf”.
Apr 23 11:22:38.459 [warn] Option ‘DisableNetwork’ used more than once; all but the last value will be ignored.
Apr 23 11:22:38.459 [warn] Failed to parse/validate config: Unknown option ‘’. Failing.
Apr 23 11:22:38.459 [err] Reading config failed–see warnings above.

Try to look at this report yourself by running. Start Menu → System → Terminal

sudo -u debian-tor tor --verify-config

To try to fix this, please open your Tor config file.

Start Menu → System → Torrc
or in Terminal: sudo nano /usr/local/etc/torrc.d/50_user.conf

Please restart Tor after fixing this error.

Start Menu → System → Restart Tor
or in Terminal: sudo service tor@default restart

Restart systemcheck after fixing this error.

Start Menu → System → System Check
or in Terminal: systemcheck

If you know what you are doing, feel free to disable this check. Create a file /etc/systemcheck.d/50_user.conf and add:

systemcheck_skip_functions+=" check_tor_config "

I have tried to fix this running the sugested comands but not helping.
Command “sudo service tor@default restart” keeps failing:
Job for tor@default.service failed because the control process exited with error code.
See “systemctl status tor@default.service” and “journalctl -xe” for details.
Comand “sudo nano /usr/local/etc/torrc.d/50_user.conf” needs something else to be done there which I dont understand and can not find any information about it.
Please help.

Seems like you edited /usr/local/etc/torrc.d/50_user.conf and added a mistake there? A double quote " somewhere in that file?

In case you open the file and cannot see the issue, then just delete all contents from the file:

echo "" | sudo tee /usr/local/etc/torrc.d/50_user.conf

Then perhaps re-add any missing settings from scratch. This only applies if you made any changes to that file previously. If not, then there’s no need for that file to have any contents. You could even delete the file.

sudo rm /usr/local/etc/torrc.d/50_user.conf

No, I did not make any change to /usr/local/etc/torrc.d/50_user.conf. I only used command sudo nano /usr/local/etc/torrc.d/50_user.conf which opened text editor and closed it immideatily after as I could not understand what should I change there.

Anyway I have tried to use now

echo "" | sudo tee /usr/local/etc/torrc.d/50_user.conf

and

sudo rm /usr/local/etc/torrc.d/50_user.conf

which did not help unfortunately. Now it says that there is no such file or directory (/usr/local/etc/torrc.d/50_user.conf) but the error is still the same when try to connect.

When I try to run tor in tor control panel i receive a message:

Tor controller cannot be constructed.This is very likely because you have a “DisableNetwork 1” line in some torrc file(s).
Please manually remove or comment those lines and then run anon-connection-wizard or restart Tor.

In the same panel when I click on ‘Logs’ and then ‘torrc’ it says:

# Do not edit this file!
# Please add modifications to the following file instead:
# /usr/local/etc/torrc.d/50_user.conf
DisableNetwork 0

Then I tried to use again command

sudo nano /usr/local/etc/torrc.d/50_user.conf

And it still opens text editor despite the fact that I have recently removed that file completely:

# Tor user specific configuration file
#
# Add user modifications below this line:
############################################

                            [ Read 4 lines ]

^G Help ^O Write Out ^W Where Is ^K Cut ^T Execute ^C Location
^X Exit ^R Read File ^\ Replace ^U Paste ^J Justify ^_ Go To Line

sudo touch /usr/local/etc/torrc.d/50_user.conf

That’s the wrong interpretation. See this:

sudo nano ~/example1
sudo nano ~/example2
sudo nano ~/non-existing-file

All of these files don’t exist either but the same happens.

nano isn’t the idea tool to test of file existence or non-existence. For that, use ls.

Yes. To try that. To explain what that does, it creates an empty file. And that should be enough to fix this issue.

Nowadays /etc/torrc.d/95_whonix.conf uses %include /usr/local/etc/torrc.d/*.conf so even if /usr/local/etc/torrc.d/50_user.conf doesn’t exist, that shouldn’t result in any issues.

In the past existence of that file was mandatory. Not anymore. Are you using a very old version of Whonix and/or didn’t update?

If /etc/torrc.d/95_whonix.conf looks different for you, then that’s the issue.