Discussion:
[tor-relays] tor relay issue on windows 10
Keifer Bly
2021-04-08 03:15:49 UTC
Permalink
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 ***@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
Matt Traudt
2021-04-08 12:17:25 UTC
Permalink
Post by Keifer Bly
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
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
SocksPort 0
ORPort 4555
Nickname testrelay
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)
Keifer Bly
2021-04-08 21:36:56 UTC
Permalink
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.
Post by Matt Traudt
Post by Keifer Bly
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
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
SocksPort 0
ORPort 4555
Nickname testrelay
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
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
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
Matt Traudt
2021-04-09 12:03:34 UTC
Permalink
Post by Keifer Bly
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/
Keifer Bly
2021-04-09 21:04:46 UTC
Permalink
Thanks. Even with the geoip files, it still happens.
--Keifer
Post by Matt Traudt
Post by Keifer Bly
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
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
William Kane
2021-04-10 19:22:44 UTC
Permalink
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
Post by Keifer Bly
Thanks. Even with the geoip files, it still happens.
--Keifer
Post by Matt Traudt
Post by Keifer Bly
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
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
Keifer Bly
2021-04-12 18:49:06 UTC
Permalink
I got it running. Thanks very much
Post by William Kane
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).
"Faulting application name: <binary>, version: <version>, time stamp: <stamp>"
If such an entry is created, please include the following four fields
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
Post by Keifer Bly
Thanks. Even with the geoip files, it still happens.
--Keifer
Post by Matt Traudt
Post by Keifer Bly
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
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
_______________________________________________
tor-relays mailing list
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
William Kane
2021-04-13 11:55:07 UTC
Permalink
So why don't you tell the list what the issue was?

-William
Post by Keifer Bly
I got it running. Thanks very much
Post by William Kane
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).
"Faulting application name: <binary>, version: <version>, time stamp: <stamp>"
If such an entry is created, please include the following four fields
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
Post by Keifer Bly
Thanks. Even with the geoip files, it still happens.
--Keifer
Post by Matt Traudt
Post by Keifer Bly
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
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
_______________________________________________
tor-relays mailing list
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
Loading...