java.lang.IllegalStateException: Server does not respond as TS3 server!
Closed this issue · 14 comments
I am getting this error when connecting from Docker image to TS3 Server:
teamspeakbot_1 | Botname: Unable to connect to Teamspeak 3 server at teamspeak!
teamspeakbot_1 | Botname: java.lang.IllegalStateException: Server does not respond as TS3 server!
teamspeakbot_1 | Botname: Reconnecting in 65 seconds...
Is this an error of the docker image?
Which image version are you using? You can get the image version by running: docker images quay.io/galexrt/sinusbot:latest
and/or if using the Docker image from Docker Hub docker images galexrt/sinusbot:latest
.
I am using docker-compose and I pull the image in Dockerfile via FROM galexrt/jts3servermod:latest
.
@kill0rz Are you modifying the galexrt/jts3servermod:latest
Docker image in the Dockerfile
you mentioned?
Are you also sure that the image is up to date (docker pull galexrt/jts3servermod:latest
)?
Well I am actually not using this sinusbot image (afaik sinusbot is for playing music, right?) I am talking about the jts3servermod-Image. I am not modifying anything, Image is up to date (pulled it today).
@kill0rz Sorry, yes I meant jts3servermod
image.
Why are you having in the Dockerfile the line FROM galexrt/jts3servermod:latest
in it?
You can directly use this image without having to build another image first.
I guess the compose file would be useful ;)
teamspeak:
build: './teamspeak/'
volumes:
- '../_data/teamspeak/:/data/'
ports:
- '9987:9987/udp'
- '30033:30033'
- '10011:10011'
- '41144:41144'
restart: always
teamspeakbot:
#build: './teamspeakbot/'
image: galexrt/jts3servermod
volumes:
- './teamspeakbot/config/:/jts3servermod/config'
restart: always
depends_on:
- 'teamspeak'
ports:
- 8087:8087
Sorry about the wait, I will look into this on Sunday.
Have you already tried connecting to another TeamsSpeak3 server and see if the same issue appears?
This may be related to teamspeak
(your other container) not being a DNS name (or /etc/hosts) for some reason in the container.
No problem, take your time.
docker-compose exec teamspeakbot bash
-->
root@0c1d7b9010ea:/# nslookup teamspeak
Server: 127.0.0.11
Address: 127.0.0.11#53
Non-authoritative answer:
Name: teamspeak
Address: 172.18.0.6
cat JTS3ServerMod_server.cfg
-->
# Config file of the JTS3ServerMod
# http://www.stefan1200.de
# This file must be saved with the encoding ISO-8859-1!
# Teamspeak 3 server address
ts3_server_address = teamspeak
...
Furthermore I can connect via TS3 client to the serrver without problems.
@kill0rz You said that you "can connect via TS3 client to the server without problems", but are you using the DNS entry teamspeak
or the IP of the container to connect via the TS3 client?
For connecting via TS3 client I use the IP address of the host server. This works from my home PC.
For connecting from the Bot to the TS3 server I use the containers name as an alias of its IP.
I emptied the query_ip_whitelist of the TS3 server and the bot got flood banned. This means that a connection between the containers and server<-->bot is possible.
So the question is now: where to investigate the problem described above? I will set up an instance of the bot outside a docker container and will try to connect to the server. Lets see if this works. I will inform you tomorrow.
Thank you for your help! :)
@kill0rz Any news on your try with the bot outside of the teamspeak servers docker-compose context?
@galexrt Sorry for my late answer. I am still at debugging.
I did not try to connect from an external server, but I tried a web-based TS3 viewer.
Surprise: It cannot connect either! Not a Teamspeak 3 server/bad query port
So I suppose that your image is correct and works properly.
Here is my Dockerfile for the TS3-Server. It has been modified by me, so I can use the latest version of teamspeak.
Original: https://github.com/overshard/docker-teamspeak/blob/master/Dockerfile
# -----------------------------------------------------------------------------
# docker-teamspeak
#
# Builds a basic docker image that can run TeamSpeak
# (http://teamspeak.com/).
#
# Authors: Isaac Bythewood, Jamie Tanna
# Updated: January 6th, 2017
# Require: Docker (http://www.docker.io/)
# -----------------------------------------------------------------------------
# Base system is Ubuntu 16.04
FROM ubuntu:16.04
# Set the Teamspeak version to download
ENV TSV=3.1.0
# Download and install everything from the repos.
RUN DEBIAN_FRONTEND=noninteractive \
apt-get -y update && \
apt-get -y install apt-utils bzip2 less ca-certificates && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
apt-get autoremove -y && \
apt-get clean
# Download and install TeamSpeak 3
ADD http://dl.4players.de/ts/releases/${TSV}/teamspeak3-server_linux_amd64-${TSV}.tar.bz2 ./
RUN tar jxf teamspeak3-server_linux_amd64-$TSV.tar.bz2 && \
mv teamspeak3-server_linux_amd64 /opt/teamspeak && \
rm teamspeak3-server_linux_amd64-$TSV.tar.bz2
# Load in all of our config files.
ADD ./scripts/start /start
# Fix all permissions
RUN chmod +x /start
# /start runs it.
EXPOSE 9987/udp
EXPOSE 30033
EXPOSE 10011
#timezone
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN useradd teamspeak && mkdir /data && chown teamspeak:teamspeak /data
VOLUME ["/data"]
USER teamspeak
CMD ["/start"]
I will create an issue there. Thank you very much for your help. Thanks! =)
Thanks for the feedback! Closing as seems to be an external issue.
Please reopen if it wasn't an issue of the TeamSpeak server.