0

I executed tor.exe after completing all the tasks in the bridge setup manual and, although it stablishes all the connections, after no time it closes with an error: enter preformatted text hereReading config failed--see warnings above`.

config file:

Log notice file C:\Users\<user>\AppData\Roaming\tor\notice.log
GeoIPFile C:\Users\<user>\AppData\Roaming\tor\geoip
GeoIPv6File C:\Users\<user>\AppData\Roaming\tor\geoip6
BridgeRelay 1
BridgeDistribution none
ORPort 9061
ServerTransportPlugin obfs4 exec C:\Users\<user>\AppData\Roaming\tor\obfs4proxy.exe
ServerTransportListenAddr obfs4 0.0.0.0:9059
ExtORPort auto
ContactInfo [email protected]
Nickname mybridge
SOCKSPort 9060 # Default: Bind to localhost:9060 for local connections.
AvoidDiskWrites 1
HashedControlPassword 16:xxx

full program output:

Oct 03 10:39:49.458 [notice] Tor 0.4.5.10 (git-fd74f7628eba2525) running on Windows 8 [or later] with Libevent 2.1.12-stable, OpenSSL 1.1.1l, Zlib 1.2.11, Liblzma N/A, Libzstd N/A and Unknown N/A as libc.
Oct 03 10:39:49.459 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Oct 03 10:39:49.476 [notice] Read configuration file "C:\Users\nesto\AppData\Roaming\tor\torrc".
Oct 03 10:39:49.478 [notice] Based on detected system memory, MaxMemInQueues is set to 2048 MB. You can override this by setting MaxMemInQueues by hand.
Oct 03 10:39:49.479 [notice] Opening Socks listener on 127.0.0.1:9060
Oct 03 10:39:49.479 [notice] Opened Socks listener connection (ready) on 127.0.0.1:9060
Oct 03 10:39:49.479 [notice] Opening OR listener on 0.0.0.0:9061
Oct 03 10:39:49.480 [notice] Opened OR listener connection (ready) on 0.0.0.0:9061
Oct 03 10:39:49.480 [notice] Opening OR listener on [::]:9061
Oct 03 10:39:49.480 [notice] Opened OR listener connection (ready) on [::]:9061
Oct 03 10:39:49.480 [notice] Opening Extended OR listener on 127.0.0.1:0
Oct 03 10:39:49.480 [notice] Extended OR listener listening on port 54221.
Oct 03 10:39:49.480 [notice] Opened Extended OR listener connection (ready) on 127.0.0.1:54221
Oct 03 10:39:49.000 [warn] Couldn't open file for 'Log notice file C:\Users\<user>\AppData\Roaming\tor\notice.log': Invalid argument
Oct 03 10:39:49.000 [notice] Closing partially-constructed Socks listener connection (ready) on 127.0.0.1:9060
Oct 03 10:39:49.000 [notice] Closing partially-constructed OR listener connection (ready) on 0.0.0.0:9061
Oct 03 10:39:49.000 [notice] Closing partially-constructed OR listener connection (ready) on [::]:9061
Oct 03 10:39:49.000 [notice] Closing partially-constructed Extended OR listener connection (ready) on 127.0.0.1:54221
Oct 03 10:39:49.000 [warn] Failed to parse/validate config: Failed to init Log options. See logs for details.
Oct 03 10:39:49.000 [err] Reading config failed--see warnings above.

If I see the warnings, as the error says, what I understand is that not being able to write logs caused a fatal problem (I don't know why it isn't able to write if I the folder isn't limited as far as I know). However, if I stick to the error, I'd say the problem is in the config file. How would you solve this?

1 Answer 1

0

Well, first of all - it looks like the Log line is correct, but in Windows you need to try a combo of the following - and not just in Tor, it happens everywhere:

  • Try to make a double slashes, i.e. use \\ instead of \ - it's a libC related implementation bug: a single slash is a shielding symbol for the next character, so if the config value is not processed properly - you have to use a double ones
  • As you do have whitespaces in your full path or non-english characters like in username - try to use double quotes for the whole path string, like "c:\file.log" instead of c:\file.log
  • Service folders like AppData do have permissions auto-reset from time to time, especially during windows update - so I do recommend you to use a folder like c:\tor - english-only, less than 8 symbols, on the root level of the drive - works bulletproof for me for years
3
  • 1
    Changing the path of the folder did the trick Commented Oct 3, 2021 at 15:30
  • @NéstorLlop It usually does, and - actually - I'm still wondering why the user's service subfolders are becoming write-protected for this user from time to time: it makes no sense at all even from the security point of view. So - in Windows I'm using a first-level or just-english folder names no longer than 8 characters each and keeping the line shorter than 64 symbols - looks like the roots of this problem is very deep to the MsDOS times...
    – Alexey Vesnin
    Commented Oct 3, 2021 at 17:04
  • I'm glad that it fixed your problem! Keep in mind an opportunity to use a separate user for Tor running as a service under totally unprivileged user and locking the folder to this user only except the folders with the read-only objects like an executables and libraries, so only a data folder and a log folder should be writable - it takes like a 5 minutes to do only once but it adds security and convinience
    – Alexey Vesnin
    Commented Oct 3, 2021 at 17:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .