SRV Record is not working correctly

Hello, my dears,

I have a tiny problem that I might need your help with. A long time ago I made an SRV record in my DNS settings:

SRV _ts3._udp.mydomain.de 0 5 9987 ts 86400

For this I found the following entry in the client protocol:

08/04/2021 14:44:09 ClientUI Info Connect to server: ts.mydomain.de
08/04/2021 2:44:09 PM ClientUI Info Trying to resolve ts.mydomain.de
04.08.2021 14:44:09 TSDNS Info A / AAAA DNS resolve successful, "ts.mydomain.de" = (h: 2a01: 4f8: xxxx: xxxx :: 1 p: 0), (h: xxx.xxx. xxx.xx p: 0)
04.08.2021 14:44:09 TSDNS Info A / AAAA DNS resolve for possible TSDNS successful, "ts.mydomain.de" = (h: 2a01: 4f8: xxxx: xxxx :: 1 p: 0), (h: xxx .xxx.xxx.xx p: 0)
04.08.2021 14:44:09 TSDNS Info A / AAAA DNS resolve for possible TSDNS successful, "mydomain.de" = (h: 2a01: 4f8: xxxx: xxxx :: 1 p: 0), (h: xxx.xxx .xxx.xx p: 0)
04.08.2021 14:44:09 TSDNS Info SRV DNS resolve unsuccessful, "_tsdns._tcp.mydomain.de" DNS server returned answer with no data
04.08.2021 14:44:09 TSDNS Info SRV DNS resolve unsuccessful, "_ts3._udp.ts.mydomain.de" Domain name not found
04.08.2021 14:44:11 TSDNS Info TSDNS queried unsuccessfully 2a01: 4f8: xxxx: xxxx :: 1: 41144
04.08.2021 14:44:11 TSDNS Info TSDNS queried unsuccessfully 2a01: 4f8: xxxx: xxxx :: 1: 41144
04.08.2021 14:44:13 TSDNS Info TSDNS queried unsuccessfully xxx.xxx.xxx.xx: 41144
08/04/2021 14:44:13 TSDNS Info No TSDNS found
04.08.2021 14:44:13 TSDNS Info TSDNS queried unsuccessfully xxx.xxx.xxx.xx: 41144
08/04/2021 14:44:13 TSDNS Info No TSDNS found

This morning I changed the SRV entry to:

SRV _ts3._udp.mydomain.de 0 5 9987 ts.mydomain.de. 86400

Unfortunately nothing has changed in the client protocol, the same errors are still there. Can you tell me or write where my mistake is? Oh, server is operated by Hetzner when it is important.

Forget: The A and AAAA records are set correctly and refer to the IP of the server.

Thanks

It seems like you misunderstand the usage of the SRV record.
Let’s take your SRV record as example:

SRV _ts3._udp.mydomain.de 0 5 9987 ts.mydomain.de. 86400
  • the record has been created for the hostname mydomain.de
  • UDP port 9987
  • the target A(AAA) record to resolve the IP address is ts.mydomain.de
  • a TTL (time to live) value of 86400 (1 day)

As the client log says you’re trying to connect to the hostname ts.mydomain.de.
This hostname isn’t the hostname of your SRV record but it is it’s target.
You have set mydomain.de as hostname of the SRV record not ts.mydomain.de.

Your TeamSpeak client successfully resolves the hostname to get it’s IP address.
It does not find a SRV record with the hostname ts.mydomain.de because no record exists with that name.

If you wan’t to connect to your TeamSpeak server using the SRV record you will have to connect to:

mydomain.de

If you somehow want to connect to the server using the same hostname as your A(AAA) record you will have to change your SRV record to:

SRV _ts3._udp.ts.mydomain.de. 0 5 9987 ts.mydomain.de. 86400

You can also create multiple SRV record with the same target, for example:

SRV _ts3._udp.mydomain.de. 0 5 9987 ts.mydomain.de. 86400
SRV _ts3._udp.ts.mydomain.de. 0 5 9987 ts.mydomain.de. 86400
SRV _ts3._udp.ts3.mydomain.de. 0 5 9987 ts.mydomain.de. 86400

In this example you’re able to connect to your TeamSpeak server by using all 3 hostnames - mydomain.de, ts.mydomain.de and ts3.mydomain.de.


Another tip

Change and lower the TTL value of your SRV record significantly.
As I mentioned a value of 86400 means DNS resolvers other than the authoritative nameserver will cache the value for ~ 24 hours (86400 seconds).
That means changing your records can take up to 24 hours (or longer sometimes) to be processed by all DNS resolvers worldwide.

Depending on how often you gonna change this record a TTL of 3600 (1 hour) or less if changes to the record happen frequently is recommended.

4 Likes

Ahhh, now I understand. Very good explanation from you :slight_smile:

if I only get the _ts3._udp.ts.mydomain.de. then the “route” to ts.mydomain.de is correct. The way I have it now, of course, it explains why the client connects faster to the server under mydomain.de than with ts.mydomain.de. Right?

Thank you for the very detailed explanation!

I just looked again: At home I can actually connect to our server at “the speed of light”. Goil!

But if I enter ts.mydomain.de via Google dig, it says Record not found.

I’m sure that the Google name servers are faster than Telekom’s :slight_smile:

1 Like

Yes, resolving the SRV record will take a little bit longer than just resolving the A(AAA) record.

If you don’t have a more complex domain name system or need multiple aliases (SRV records with different hostnames) targeting your A(AAA) record, SRV records don’t really make sense. They will just cause a delay.

If ts.mydomain.de is the target of your SRV record and is a valid A(AAA) record, Google should be able to find it.
If not they may block your authoritative nameserver or due a high TTL of the record or zone refresh it hasn’t be pushed to the Google DNS resolvers yet.


To test if your records got pushed already, you can use the following tool:
(of course replacing the hostname with the actual one)

https://dnschecker.org/#SRV/_ts3._udp.ts.mydomain.de

2 Likes

Good Morning,

it all worked like you said I thank you for the help and especially for the detailed explanation :slight_smile:

1 Like
twitch instagram twitter facebook