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

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Join Date
    November 2014
    Location
    Ciudad Real, Spain
    Posts
    41

    Query Notification stops after 60 seconds inactivity

    This was solved in post #20


    Hello, i'm new around here I'm not a native speaker.

    I'm programming a TS3 bot coded in python (quite complete, honestly. It has been working for a while with many many features... oops, off-topic) and I have a bug that it's getting me crazy. Right now my bot is working "fine" with a workaround, but that shouldn't happen.

    The issue
    Once it connects as serverquery, it will notifyregister for channel texts, however, if there is no activity in 75 seconds (sometimes around 60-75 seconds) the ServerQuery will still be connected BUT the notifications won't get to me.

    Tests
    1: I tried to notifyregister once again but the answer was that I was already registered. That's odd since I don't get any notification.
    2: I asked the bot to say "hi" each 50 seconds, notifications will always get to me. (but it's annoying as hell).
    3: I tested several time with many people that if we keep chatting and don't stop for at least 60 seconds, the notificacions still get to me.
    4: This is my actual workaround: I force the bot to leave the channel and join again each 50 seconds. It works but leaving a channel can mess around my code for events when someone joins and leaves the channel (no matter how fast the bot is leaving and joining back, he shouldn't leave in the first place).

    Telnet commands used in order (just in case you want to replicate it)
    login(client_login_name=USER, client_login_password=PASS)
    use(sid=SID)
    clientupdate(client_nickname="Bot")
    channelfind(For the 1st channel to join)
    channelfind(For a 2nd channel to leave and come back)
    whoami(to get my info)
    clientmove(to join the 1st channel)
    servernotifyregister(textchannel and channel)

    So...
    Am I missing something here or the notifications stop after a while if there is no channel activity in there? Is there any way to fix this problem?
    Last edited by dante696; November 21st, 2014 at 07:20 AM. Reason: merged

  2. #2
    Join Date
    January 2010
    Location
    El Prat de Llobregat (Barcelona, Spain)
    Posts
    2,698
    Quote Originally Posted by Saelyth View Post
    Am I missing something here or the notifications stop after a while if there is no channel activity in there? Is there any way to fix this problem?
    What server version are you using?

    It seems this issue is resolved in server 3.0.11.1, as it's said here:
    http://forum.teamspeak.com/showthrea...889#post392889

  3. #3
    Join Date
    November 2014
    Location
    Ciudad Real, Spain
    Posts
    41
    Quote Originally Posted by PotaBlava View Post
    What server version are you using?

    It seems this issue is resolved in server 3.0.11.1, as it's said here:
    http://forum.teamspeak.com/showthrea...889#post392889
    Doh!
    I am using Version:3.0.10.3
    Thank you for the answer!

  4. #4
    Join Date
    November 2014
    Location
    Ciudad Real, Spain
    Posts
    41
    I will update here to say that it's not fixed. My bot keeps not getting channel notifications after 60 seconds if there is nobody chatting in the channel. Tested in version 3.0.11.1

  5. #5
    Join Date
    June 2008
    Posts
    18,513
    We can not reproduce this anymore.
    Please tell us your how to without 3rd Party software. Which commands does he use etc.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  6. #6
    Join Date
    November 2014
    Location
    Ciudad Real, Spain
    Posts
    41
    Here's an screenshot of the telnet commands used and a chat proof that it stops after 60 seconds (more or less) since last message: Click image for larger version. 

Name:	sSC0MqX.png 
Views:	126 
Size:	70.9 KB 
ID:	11610

    The code used to read notifications is written on python this way:
    Code:
            while True:
                answer = self.ts3conn.telnet_conn.read_until(b'\r\n', 1).strip()
    And the connection itself is saved as this:
    Code:
    self.ts3conn = ts3.query.TS3Connection(HOST, PORT)
    It uses this API: http://py-ts3.readthedocs.org/en/latest/api/query.html

    If you want, I can provide of a demo bot with no features but the connection itself so you can check how it actually works. No software needed except python 3.4.1 itself.

  7. #7
    Join Date
    December 2009
    Location
    Germany
    Posts
    2,360
    Quote Originally Posted by dante696 View Post
    We can not reproduce this anymore.
    Please tell us your how to without 3rd Party software. Which commands does he use etc.
    Well... ;-)

    Quote Originally Posted by Saelyth View Post
    Telnet commands used in order (just in case you want to replicate it)
    login(client_login_name=USER, client_login_password=PASS)
    use(sid=SID)
    clientupdate(client_nickname="Bot")
    channelfind(For the 1st channel to join)
    channelfind(For a 2nd channel to leave and come back)
    whoami(to get my info)
    clientmove(to join the 1st channel)
    servernotifyregister(textchannel and channel)

  8. #8
    Join Date
    June 2008
    Posts
    18,513
    We tried this and nothing bad happend....

    And we do not understand this part and why it was used to be in channel 1.
    Code:
    channelfind(For the 1st channel to join)
    channelfind(For a 2nd channel to leave and come back)
    whoami(to get my info)
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  9. #9
    Join Date
    November 2014
    Location
    Ciudad Real, Spain
    Posts
    41
    That was tied to my workaround to bypass this bug. My bot won't get notifications if there is no channel activity for at least 60 seconds, so it leaves the channel (joining a 2nd one) and re-enters the 1st channel (the one where it's reading notifications). That forces activity (i guess) even if nobody is chatting and it keeps getting notifications forever. However, it's annoying to have to leave and re-join each 60 seconds instead of just staying inside and get notifications all the time. That's the reason to get the ID of a 2nd channel, no needed to at all to replicate the bug and i'm sorry to include the 2nd channel line in there, makes no sense unless you read the workaround part.

    Do you want me to send you a private message with a link to the script file (totally safe) of a DemoBot that i've already prepared, so you can try to figure out where the bug is? I've been stuck with this issue for at least 2 months now and at first I though it was a bug from my API but now I think it's TeamSpeak related.
    Last edited by Saelyth; November 19th, 2014 at 01:01 PM.

  10. #10
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,368
    Can we please stop "thinking" whose error it is? Make a Wireshark file and everything will be alright.

  11. #11
    Join Date
    November 2014
    Location
    Ciudad Real, Spain
    Posts
    41
    Ok... I don't even know what wireshark is. I'm completely newbie at programming except for python so i'll give it a try.

    5 minutes later: I just installed it and noticed it captures packages for everything. I don't feel "safe" to share the wireshark files here just in case it captured any of my passwords. What should i'll be looking for, a TDP or UDP stream? And anyway, for me there's no way to know what the package says. All I can see is not parsed and really hard for me to understand.

    A few minutes later...
    Edit: Trying to decode the UDP stream that I guess it's the communication between me and the teamspeak server, I see the option to decode as TeamSpeak2, but not as TS3, thought i'm not sure if that would change anything. TS3 is not supported to be decoded by wireshark?

    I'm honestly sorry for making it hard for you.
    Last edited by Saelyth; November 20th, 2014 at 08:36 AM.

  12. #12
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,368
    Why the hell are you looking at UDP? This thread is about Telnet, which is simply another name for raw TCP.

    And yes, sharing the data means revealing the password. Simply change it afterwards.

  13. #13
    Join Date
    June 2008
    Posts
    18,513
    We also like to fix this, if there is a server bug. But currently we did not reproduce anything on server 3.0.11.1

    The question stays:
    - Is this reproducable without any 3rd party QueryTool (Expect Telnet & Putty)?

    In case it is, please tell us the OS and the exact commands and all additional informations (time, server db etc).
    We don't want to waste men power for tools we did not provide and support.
    Last edited by dante696; November 20th, 2014 at 11:03 AM.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  14. #14
    Join Date
    November 2014
    Location
    Ciudad Real, Spain
    Posts
    41
    I'm sorry to give you such a big headache, dante696, I'm doing my best to provide accurate information. I don't know how to check the teamspeak server db, but I'll ask to the TeamSpeak administrator where i'm doing my tests. About your question:

    - Is this reproducable without any 3rd party QueryTool (Except Telnet & Putty)?
    YES. I just downloaded Putty and I tried myself. BUG appeared again. I knew it should be able to be replicated with just telnet, since (as you can see later in the wireshark log) all what python does is just to send Telnet commands. I didn't tried on different servers or computers but the bug is easily replicated in my computer also with just PuTTY.

    This is a PuTTY test that I have done a few minutes ago. Notice how after the delay of 60 seconds where i say "funcionas", the next texts are not received by PuTTY:
    Click image for larger version. 

Name:	Elc50za.png 
Views:	132 
Size:	202.8 KB 
ID:	11621

    I am using Windows 7 Home Premium Service Pack 1 and Python 3.4.1 to send the Telnet Commands.
    The TeamSpeak server is using:
    Build: 1413356791
    Platform: Linux
    Version: 3.0.11.1
    Adress: 37.187.39.202
    Port used to connect: 10011



    Test2

    This is what it looks like as a client:
    Click image for larger version. 

Name:	sjx51AX.png 
Views:	92 
Size:	13.3 KB 
ID:	11620

    And this is what appears in the telnet file with all the TCP that wireshark captured (Thank you numma_cway to let me know about wireshark):
    Code:
    TS3
    Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
    
    login client_login_name=BotDeAens client_login_password=xxxxxxxx
    
    error id=0 msg=ok
    
    use sid=1  
    
    error id=0 msg=ok
    
    channelfind pattern=[Pruebas]\sBots  
    
    cid=9931 channel_name=[Pruebas]\sBots
    
    error id=0 msg=ok
    
    clientupdate client_nickname=TestingBot  
    
    error id=0 msg=ok
    
    whoami   
    
    virtualserver_status=online virtualserver_id=1 virtualserver_unique_identifier=aD9WUddNDWJs6sDsTghzHEV9iX4= virtualserver_port=9987 client_id=146 client_channel_id=1 client_nickname=TestingBot client_database_id=14909 client_login_name=BotDeAens client_unique_identifier=6yj3hyXUCWt0xOUlWIh\/1NpnAWo= client_origin_server_id=1
    
    error id=0 msg=ok
    
    clientmove cid=9931 cpw= clid=146 
    
    error id=0 msg=ok
    
    servernotifyregister id=9931 event=textchannel  
    
    error id=0 msg=ok
    
    servernotifyregister id=9931 event=channel  
    
    error id=0 msg=ok
    
    notifytextmessage targetmode=2 msg=This\sis\sa\stest invokerid=141 invokername=[Rata]Aens\sWindstorm invokeruid=6yj3hyXUCWt0xOUlWIh\/1NpnAWo=
    
    notifytextmessage targetmode=2 msg=!uptime invokerid=141 invokername=[Rata]Aens\sWindstorm invokeruid=6yj3hyXUCWt0xOUlWIh\/1NpnAWo=
    
    sendtextmessage targetmode=2 target=9931 msg=Since\s[color=gray]2014-11-20\s15:50:19[\/color],\si've\sbeen\s[b][color=green]0:00:08\s[\/color][\/b]Hours\/minutes\/seconds\sonline.  
    
    notifytextmessage targetmode=2 msg=Since\s[color=gray]2014-11-20\s15:50:19[\/color],\si've\sbeen\s[b][color=green]0:00:08\s[\/color][\/b]Hours\/minutes\/seconds\sonline. invokerid=146 invokername=TestingBot invokeruid=6yj3hyXUCWt0xOUlWIh\/1NpnAWo=
    
    error id=0 msg=ok
    
    notifytextmessage targetmode=2 msg=perfect invokerid=141 invokername=[Rata]Aens\sWindstorm invokeruid=6yj3hyXUCWt0xOUlWIh\/1NpnAWo=
    
    notifytextmessage targetmode=2 msg=now\si\swait\s60\sseconds\smore\sor\sless invokerid=141 invokername=[Rata]Aens\sWindstorm invokeruid=6yj3hyXUCWt0xOUlWIh\/1NpnAWo=
    I don't get more notifications if I stop sending messages to that channel for at least 60 seconds. The connection is not closed and i can keep using comm past those 60 seconds, so it can't be just that connection got closed. Isn't either the event "servernotifyunregister" or it would appear sent in the wireshark packets log.

    Note: The serverquery client doesn't connect with all the permissions. It has almost no permissions except for a few features (not sure if that would make any difference).
    Last edited by Saelyth; November 20th, 2014 at 04:40 PM.

  15. #15
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,368
    Wireshark thing is alright, except for one line:
    servernotifyregister id=9931 event=textchannel
    There is no id parameter for this. And there has never been any.
    Please post a screenshot of wireshark that shows the end of the list with the last item selected after "following TCP stream" when notifications are no longer sent.

    What type of events end? Channel or textchannel? Did you try it with event=channel id=0?
    To make sure it's not because of permissions, have the bot log in using the account named serveradmin.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [Evaluation] Query stops working
    By numma_cway in forum Bug Reports [EN/DE]
    Replies: 3
    Last Post: September 9th, 2014, 07:15 AM
  2. Replies: 0
    Last Post: January 22nd, 2012, 10:19 AM
  3. TS3_RC1 server stops after a few seconds
    By {PST}Nerd in forum Server Support
    Replies: 9
    Last Post: June 7th, 2011, 03:01 PM

Posting Permissions

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