tor relay issue on windows 10

Hi all, So I am attempting to start a new relay on Windows Server 2019. The issue is though for an unspecified reason, the tor process just quits when starting the relay: Here is the log file: [image: image.png] And then once it gets to "now checking if qr port is reachable from the outside" the tor process suddenly quits. Im running it as administrator I am wondering why the process would suddenly stop for no apparent reason on reaching this? Here is the torrc, though it seems to read that no issue: SocksPort 0 ORPort 4555 Nickname testrelay ContactInfo kk@gmail.com Log notice file c:\notices.log ControlPort 9051 ExitPolicy reject *:* Though it seems to read the torrc file without any issue. Thanks. --Keifer

On 4/7/21 23:15, Keifer Bly wrote:
Hi all,
So I am attempting to start a new relay on Windows Server 2019. The issue is though for an unspecified reason, the tor process just quits when starting the relay:
Here is the log file:
image.png
And then once it gets to "now checking if qr port is reachable from the outside" the tor process suddenly quits. Im running it as administrator I am wondering why the process would suddenly stop for no apparent reason on reaching this? Here is the torrc, though it seems to read that no issue:
SocksPort 0 ORPort 4555 Nickname testrelay ContactInfo kk@gmail.com <mailto:kk@gmail.com> Log notice file c:\notices.log ControlPort 9051 ExitPolicy reject *:*
Though it seems to read the torrc file without any issue. Thanks. --Keifer
Hi I'm not a windows user, and especially not a run-things-as-a-service-on-windows user. My first thought was you somehow unknowingly had RunAsDaemon set to 1. But after reading the man page[0] and checking your command line in the picture, I don't think this is it. But in the same spirit of the above: are you *sure* tor isn't successfully running in the background? You could check by seeing if anything is listening on its ORPort, by checking if the log file is getting newer lines than the console, and by the process explorer or whatever. (Aside: consider adding a "Log notice stdout" for debugging) What's the DataDirectory that Tor is trying to use? Maybe it's unable to create it and failing silently? I think silent failure would be considered a bug. Maybe set DataDirectory in the torrc. Finally, the last thing that stood out to me is the GeoIP lines in the log output. I've never seen "<default>" and I'm guessing C:\Users\Administrator\<default> doesn't exist. Perhaps there's a bad bug where Tor crashes (silently?) if the GeoIP files don't exist. It would be crazy if that existed, IMO, but maybe less crazy if it's a bug on Windows systems only. Running little-t tor manually--as a client or even as a relay--is much less common on Windows. The thing to try here is to specify GeoIPFile and GeoIPv6File in the torrc with the paths to the GeoIP files tor ships with (don't try getting a random database off the Internet: tor has its own format). Hope something here was helpful. Matt [0]: RunAsDaemon 0|1 If 1, Tor forks and daemonizes to the background. This option has no effect on Windows; instead you should use the --service command-line option. Can not be changed while tor is running. (Default: 0)

Thanks will try. I know the tor process is not running as it never writes anything to the log file well over 30 minutes later. I tried checking if the tor process is running via cmd it is not. Is there a tor command to generate the geoip files? Thanks very much. On Thu, Apr 8, 2021, 5:17 AM Matt Traudt <pastly@torproject.org> wrote:
On 4/7/21 23:15, Keifer Bly wrote:
Hi all,
So I am attempting to start a new relay on Windows Server 2019. The issue is though for an unspecified reason, the tor process just quits when starting the relay:
Here is the log file:
image.png
And then once it gets to "now checking if qr port is reachable from the outside" the tor process suddenly quits. Im running it as administrator I am wondering why the process would suddenly stop for no apparent reason on reaching this? Here is the torrc, though it seems to read that no issue:
SocksPort 0 ORPort 4555 Nickname testrelay ContactInfo kk@gmail.com <mailto:kk@gmail.com> Log notice file c:\notices.log ControlPort 9051 ExitPolicy reject *:*
Though it seems to read the torrc file without any issue. Thanks. --Keifer
Hi
I'm not a windows user, and especially not a run-things-as-a-service-on-windows user.
My first thought was you somehow unknowingly had RunAsDaemon set to 1. But after reading the man page[0] and checking your command line in the picture, I don't think this is it.
But in the same spirit of the above: are you *sure* tor isn't successfully running in the background? You could check by seeing if anything is listening on its ORPort, by checking if the log file is getting newer lines than the console, and by the process explorer or whatever. (Aside: consider adding a "Log notice stdout" for debugging)
What's the DataDirectory that Tor is trying to use? Maybe it's unable to create it and failing silently? I think silent failure would be considered a bug. Maybe set DataDirectory in the torrc.
Finally, the last thing that stood out to me is the GeoIP lines in the log output. I've never seen "<default>" and I'm guessing C:\Users\Administrator\<default> doesn't exist. Perhaps there's a bad bug where Tor crashes (silently?) if the GeoIP files don't exist. It would be crazy if that existed, IMO, but maybe less crazy if it's a bug on Windows systems only. Running little-t tor manually--as a client or even as a relay--is much less common on Windows. The thing to try here is to specify GeoIPFile and GeoIPv6File in the torrc with the paths to the GeoIP files tor ships with (don't try getting a random database off the Internet: tor has its own format).
Hope something here was helpful.
Matt
[0]:
RunAsDaemon 0|1 If 1, Tor forks and daemonizes to the background. This option has no effect on Windows; instead you should use the --service command-line option. Can not be changed while tor is running. (Default: 0)
_______________________________________________ tor-relays mailing list tor-relays@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays

On 4/8/21 17:36, Keifer Bly wrote:
Is there a tor command to generate the geoip files? Thanks very much.
No. Assuming you are using the Windows Expert Bundle[0], the GeoIP files are Data/Tor/geoip and Data/Tor/geoip6 in the .zip. Even if you're not using the expert bundle, that's a way to get the files. Matt [0]: https://www.torproject.org/download/tor/

Thanks. Even with the geoip files, it still happens. --Keifer On Fri, Apr 9, 2021 at 5:03 AM Matt Traudt <pastly@torproject.org> wrote:
On 4/8/21 17:36, Keifer Bly wrote:
Is there a tor command to generate the geoip files? Thanks very much.
No.
Assuming you are using the Windows Expert Bundle[0], the GeoIP files are Data/Tor/geoip and Data/Tor/geoip6 in the .zip.
Even if you're not using the expert bundle, that's a way to get the files.
Matt
[0]: https://www.torproject.org/download/tor/ _______________________________________________ tor-relays mailing list tor-relays@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays

Hi, first of all, don't run it as admin, create a dedicated user and strip privileges. Usually if something goes horribly wrong, i.e. an app crashes, Windows will write to the event log (Windows Logs -> Application). Look for events with an event source of "Application Error" such as: "Faulting application name: <binary>, version: <version>, time stamp: <stamp>" If such an entry is created, please include the following four fields in your reply: Exception code, Fault offset, Faulting application path, Faulting module path. If no such entry is created and the process closes anyway, then you might have to debug it yourself - I'll explain how once you confirmed it's not crashing. - William On 09/04/2021, Keifer Bly <keifer.bly@gmail.com> wrote:
Thanks. Even with the geoip files, it still happens. --Keifer
On Fri, Apr 9, 2021 at 5:03 AM Matt Traudt <pastly@torproject.org> wrote:
On 4/8/21 17:36, Keifer Bly wrote:
Is there a tor command to generate the geoip files? Thanks very much.
No.
Assuming you are using the Windows Expert Bundle[0], the GeoIP files are Data/Tor/geoip and Data/Tor/geoip6 in the .zip.
Even if you're not using the expert bundle, that's a way to get the files.
Matt
[0]: https://www.torproject.org/download/tor/ _______________________________________________ tor-relays mailing list tor-relays@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays

I got it running. Thanks very much On Mon, Apr 12, 2021, 3:23 AM William Kane <ttallink@googlemail.com> wrote:
Hi,
first of all, don't run it as admin, create a dedicated user and strip privileges.
Usually if something goes horribly wrong, i.e. an app crashes, Windows will write to the event log (Windows Logs -> Application).
Look for events with an event source of "Application Error" such as:
"Faulting application name: <binary>, version: <version>, time stamp: <stamp>"
If such an entry is created, please include the following four fields in your reply:
Exception code, Fault offset, Faulting application path, Faulting module path.
If no such entry is created and the process closes anyway, then you might have to debug it yourself - I'll explain how once you confirmed it's not crashing.
- William
On 09/04/2021, Keifer Bly <keifer.bly@gmail.com> wrote:
Thanks. Even with the geoip files, it still happens. --Keifer
On Fri, Apr 9, 2021 at 5:03 AM Matt Traudt <pastly@torproject.org> wrote:
On 4/8/21 17:36, Keifer Bly wrote:
Is there a tor command to generate the geoip files? Thanks very much.
No.
Assuming you are using the Windows Expert Bundle[0], the GeoIP files are Data/Tor/geoip and Data/Tor/geoip6 in the .zip.
Even if you're not using the expert bundle, that's a way to get the files.
Matt
[0]: https://www.torproject.org/download/tor/ _______________________________________________ tor-relays mailing list tor-relays@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
_______________________________________________ tor-relays mailing list tor-relays@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays

So why don't you tell the list what the issue was? -William On 12/04/2021, Keifer Bly <keifer.bly@gmail.com> wrote:
I got it running. Thanks very much
On Mon, Apr 12, 2021, 3:23 AM William Kane <ttallink@googlemail.com> wrote:
Hi,
first of all, don't run it as admin, create a dedicated user and strip privileges.
Usually if something goes horribly wrong, i.e. an app crashes, Windows will write to the event log (Windows Logs -> Application).
Look for events with an event source of "Application Error" such as:
"Faulting application name: <binary>, version: <version>, time stamp: <stamp>"
If such an entry is created, please include the following four fields in your reply:
Exception code, Fault offset, Faulting application path, Faulting module path.
If no such entry is created and the process closes anyway, then you might have to debug it yourself - I'll explain how once you confirmed it's not crashing.
- William
On 09/04/2021, Keifer Bly <keifer.bly@gmail.com> wrote:
Thanks. Even with the geoip files, it still happens. --Keifer
On Fri, Apr 9, 2021 at 5:03 AM Matt Traudt <pastly@torproject.org> wrote:
On 4/8/21 17:36, Keifer Bly wrote:
Is there a tor command to generate the geoip files? Thanks very much.
No.
Assuming you are using the Windows Expert Bundle[0], the GeoIP files are Data/Tor/geoip and Data/Tor/geoip6 in the .zip.
Even if you're not using the expert bundle, that's a way to get the files.
Matt
[0]: https://www.torproject.org/download/tor/ _______________________________________________ tor-relays mailing list tor-relays@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
_______________________________________________ tor-relays mailing list tor-relays@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
participants (3)
-
Keifer Bly
-
Matt Traudt
-
William Kane