Just set up a Tor relay on Digital Ocean running Ubuntu 16.04 using tor-relay.co and everything is seemingly going well. However, every so often the relay will cease to work and I'll get the following error:
[notice] Tor has successfully opened a circuit. Looks like client functionality is working.
[notice] Bootstrapped 100%: Done
[notice] Now checking whether ORPort x.x.x.x:9001 and DirPort x.x.x.x:9030 are reachable... (this may take up to 20 minutes -- look for log messages indicating success)
[warn] Your server (x.x.x.x:9030) has not managed to confirm that its DirPort is reachable. Relays do not publish descriptors until their ORPort and DirPort are reachable. Please check your firewalls, ports, address, /etc/hosts file, etc.
So far I've been able to remedy the problem by restarting Tor but soon after I start getting the error again.
Here's /etc/tor/torrc:
DisableDebuggerAttachment 0
ContactInfo blah
ORPort 9001
SocksPort 0
RelayBandwidthBurst 1073741824
ControlPort 9051
Log notice file /var/log/tor/notices.log
ExitPolicy reject *:*
DirPort 9030
RelayBandwidthRate 1073741824
RunAsDaemon 0
Nickname HelloNSA
Output of netstat -lntu:
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 172.16.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:9051 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:9030 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:9001 0.0.0.0:* LISTEN
tcp6 0 0 fcaa::1:53 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
udp 0 0 0.0.0.0:4500 0.0.0.0:*
udp 0 0 0.0.0.0:500 0.0.0.0:*
udp 0 0 127.0.0.1:53 0.0.0.0:*
udp 0 0 172.16.0.1:53 0.0.0.0:*
udp6 0 0 :::4500 :::*
udp6 0 0 :::500 :::*
udp6 0 0 fcaa::1:53 :::*