Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Results 1 to 6 of 6
  1. #1
    Join Date
    June 2015
    Posts
    41

    SRV entry needs connecting twice

    Hello,
    I've a teamspeak server running behind my website, redirected via SRV DNS Entry.

    Most of the time (80%) its the case I need to connect twice to my teamspeak server, as the first attempt fails.

    I replaced all IP Addresses and servernames for security reasons.

    Domain: yourservername.de
    SRV Entry: points to ts.yourservername.de

    Clientlog file:
    Code:
    04.04.2016 18:01:43	ClientUI	Info	Qt version: 5.5.1	
    04.04.2016 18:01:43	ClientUI	Info	Using configuration location: C:\Users\XeroX\AppData\Roaming\TS3Client\settings.db	
    04.04.2016 18:01:44	ClientUI	Info	Last update check was: So Apr 3 17:36:37 2016	
    04.04.2016 18:01:44	ClientUI	Info	Checking for update	
    04.04.2016 18:01:44	Update	Info	Checking for updates...	
    04.04.2016 18:01:45	Newsticker	Info	Newsticker next check: So Apr 3 02:38:14 2016	
    04.04.2016 18:01:46	ClientUI	Info	Connect to server: yourservername.de	
    04.04.2016 18:01:46	ClientUI	Info	Trying to resolve yourservername.de	
    04.04.2016 18:01:46	Update	Info	Check license version: 1	
    04.04.2016 18:01:46	Update	Info	Check client version: 3.0.19 1459504131	
    04.04.2016 18:01:46	Update	Info	Update check, my version: 1459504131, latest version: 1459504131	
    04.04.2016 18:01:46		Info	Statistics report: Not yet, next report on Sa Apr 9 20:56:28 2016	
    04.04.2016 18:01:46	Newsticker	Info	Newsticker received for language en, expires on Mo Apr 4 20:31:46 2016, next check in 1800 seconds	
    04.04.2016 18:01:46	TSDNS	Info	DNS resolve successful, "yourservername.de"=85.xx.xx.xx	
    04.04.2016 18:01:46	ClientUI	Info	Lookup finished: 85.xx.xx.xx9987 yourservername.de 0 0	
    04.04.2016 18:01:46	ClientUI	Info	Resolve successful: 85.xx.xx.xx:9987	
    04.04.2016 18:01:46	ClientUI	Info	Blacklist check ok	
    04.04.2016 18:01:46	ClientUI	Info	Initiating connection: 85.xx.xx.xx:9987 yourservername.de	
    04.04.2016 18:01:46	TSDNS	Info	SRV DNS resolve successful, "_ts3._udp.yourservername.de"=>"ts.yourservername.de:9987" = 37.xx.xx.xx:9987
    You can clearly see the teamspeak client resolves yourservername.de and tries to connect instead of resolving the srv entry.

    Verification via nslookup:
    Code:
    C:\Users\XeroX>nslookup
    Default Server:  fritz.box
    Address:  192.168.0.1
    
    > set type=all
    > _ts3._udp.yourservername.de
    Server:  net.core
    Address:  192.168.0.1
    
    Non-authoritative answer:
    _ts3._udp.yourservername.de  SRV service location:
              priority       = 10
              weight         = 10
              port           = 9987
              svr hostname   = ts.yourservername.de
    
    > ts.yourservername.de
    Server:  net.core
    Address:  192.168.0.1
    
    Non-authoritative answer:
    ts.yourservername.de internet address = 37.xx.xx.xx
    I would be happy if someone can look into this issue.

    You can contact me to get address to verify.

    Cheers
    XeroX

  2. #2
    Join Date
    February 2012
    Location
    Germany
    Posts
    577
    Unfortunately, the name resolving mechanism of the Teamspeak client isn't the most consistent. There are 3 schemes used by the TS client: An A record in DNS, a SRV record in DNS, and TSDNS. They seem to be queried in parallel, and the first mechanism that responds with an IP address seems to win.

    So if you get different IP addresses behind the same name query from the different schemes, you get varying results.

    Change your naming scheme, so the Teamspeak client never resolves to different IP addresses of the same name!

    Currently, you seem to enter "yourservername.de" in the Teamspeak client. The client now tries 2 resolving paths: It queries for a A record of yourservername.de, and it queries for a SRV record of _ts3._udp.yourservername.de, which points to ts.yourservername.de. So one time you get the IP address of yourservername.de, and one time you get the IP address of ts.yourservername.de.

    You can either change the A record of yourservername.de to return the IP address of your Teamspeak server instead the IP address of your website. Create a new A record for your website named www.yourservername.de and use that name for your website. So, both resolving methods get the same IP address for the TS server.

    Or you use the name ts.yourservername.de instead of yourservername.de to connect to your TS. Remove the old SRV record and add one with the name _ts3._udp.ts.yourservername.de. Like above, you get the same IP address for the TS server. Either from the A record of ts.yourservername.de or from the SRV record with _ts3._udp.ts.yourservername.de.

    There is a third variant. Remove the A record for yourservername.de and add one for www.yourservername.de for your website. Connect to your website with www.yourservername.de. If you try to connect to your TS with yourservername.de, the TS client only finds the SRV record, which points to the IP address of your Teamspeak server and all is fine as well.

  3. #3
    Join Date
    June 2015
    Posts
    41
    Hello,
    thanks for your reply.

    I do know how it works and how the teamspeak client acts.

    Currently, you seem to enter "yourservername.de" in the Teamspeak client. The client now tries 2 resolving paths: It queries for a A record of yourservername.de, and it queries for a SRV record of _ts3._udp.yourservername.de, which points to ts.yourservername.de. So one time you get the IP address of yourservername.de, and one time you get the IP address of ts.yourservername.de.
    Yes, thats the whole purpose of this feature. RFC: https://www.ietf.org/rfc/rfc2782.txt

    You can either change the A record of yourservername.de to return the IP address of your Teamspeak server instead the IP address of your website. Create a new A record for your website named www.yourservername.de and use that name for your website. So, both resolving methods get the same IP address for the TS server.
    Noone is using a toplevel domain for a teamspeak server only.

    Or you use the name ts.yourservername.de instead of yourservername.de to connect to your TS. Remove the old SRV record and add one with the name _ts3._udp.ts.yourservername.de. Like above, you get the same IP address for the TS server. Either from the A record of ts.yourservername.de or from the SRV record with _ts3._udp.ts.yourservername.de.
    You're questioning the whole feature, why implementing this when the client can't handle it correctly. All your "solutions" building around that feature and not using it.

    If I'm going to connect via ts.yourservername.de, why should I add a seperate SRV entry when an A record works out too? Its using the default port.

  4. #4
    Join Date
    February 2012
    Location
    Germany
    Posts
    577
    Quote Originally Posted by X3r0X View Post
    If I'm going to connect via ts.yourservername.de, why should I add a seperate SRV entry when an A record works out too? Its using the default port.
    Then go for the A entry for ts.yourservername.de alone and drop the SRV entry.

    I'm sorry that you are refusing possible workarounds, but ask yourself: do you want to wait until the TS client will be changed, or do you want a working system right now? You may wait as well indefinitely for a change in client behaviour. If you want a working system right now, implement a workaround right now. The workarounds I proposed are not ugly fixes that break other things - they use the DNS as it's intended and they work. You might have to tell your users to connect to a new name, but that's a one-time change and probably better than a connection failure once in a while just because the wrong IP address gets resolved.

    There may be another solution. There's another name resolution system: TSDNS. As far as I know the tsdns daemon, use a config file with such an entry will give you a name resolution that comes before DNS queries:

    yourservername.de=111.222.333.444:9987

    You must install the TSDNS daemon on the machine where the A record of yourservername.de points to. In the tsdns config file, you enter the IP address of your Teamspeak server. But it's an ugly workaround, because you have to configure, start and monitor an additional daemon, open firewall, etc.

  5. #5
    Join Date
    June 2015
    Posts
    41
    Hi,
    I'm really thankful for possible workarounds. Don't get me wrong, I'm not refusing your ideas.

    This thread is intended as a bug report, as I'vent found a proper report right now. For the moment I can live with the situation, as its like this for more than 6 month. I don't want to change the URL right now, as communication to >60 users will take time.

    However thanks for help.

  6. #6
    Join Date
    February 2012
    Location
    Germany
    Posts
    577
    60 users? Depending on the userbase, telling a new servername might be fast. If you have a gaming community, there is always a second path of communication through gaming chat.
    You tell 1 week in advance in the TS server host message that the new TS name is ts.yourservername.de and the old name yourservername.de will be removed soon.

    One week later you remove the SRV entry for yourservername.de for Teamspeak. Now, about half of the users will fail to connect, because they ignored the host message. They either remember the name from the host message or they will ask ingame what the new servername is, and they will definitely get the information. Been there, done this - as ts server admin and as user with foreign ts - this is a often encountered scenario, and as long as you don't change the servername every few months, the users will be fine with this.

    But I would not want to wait for a fix in the Teamspeak client. I don't know if there is anything to fix at all. The current name resolving scheme in the client is not fixable - you have to either completely re-engineer it and every TS admin in the world will have to adapt, or leave it alone. I suppose Teamspeak will leave it alone, because it usually works fine, if you work around the quirks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. My First Entry
    By Dattatray3 in forum Off Topic
    Replies: 1
    Last Post: January 10th, 2012, 09:41 AM
  2. My First Entry
    By Dattatray3 in forum General Questions
    Replies: 1
    Last Post: January 10th, 2012, 09:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •