Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when starting container #155

Closed
zqxqt opened this issue May 13, 2024 · 3 comments
Closed

Error when starting container #155

zqxqt opened this issue May 13, 2024 · 3 comments

Comments

@zqxqt
Copy link

zqxqt commented May 13, 2024

Hi, i got error when tried to start container

`user:/www/folder/TelegramApiServer$ docker compose pull
[+] Pulling 2/2
✔ api Pulled 1.5s
✔ mysql Pulled 1.5s
user:
/www/folder/TelegramApiServer$ docker compose run --rm api
[+] Creating 2/2
✔ Network telegramapiserver_default Created 0.3s
✔ Container telegramapiserver-mysql-1 Created 0.2s
[+] Running 1/1
✔ Container telegramapiserver-mysql-1 Started 0.8s
[INFO wait] --------------------------------------------------------
[INFO wait] docker-compose-wait 2.9.0
[INFO wait] ---------------------------
[DEBUG wait] Starting with configuration:
[DEBUG wait] - Hosts to be waiting for: [mysql:3306]
[DEBUG wait] - Paths to be waiting for: []
[DEBUG wait] - Timeout before failure: 30 seconds
[DEBUG wait] - TCP connection timeout before retry: 5 seconds
[DEBUG wait] - Sleeping time before checking for hosts/paths availability: 0 seconds
[DEBUG wait] - Sleeping time once all hosts/paths are available: 0 seconds
[DEBUG wait] - Sleeping time between retries: 1 seconds
[DEBUG wait] --------------------------------------------------------
[INFO wait] Checking availability of host [mysql:3306]
[INFO wait] Host [mysql:3306] not yet available...
[INFO wait] Host [mysql:3306] is now available!
[INFO wait] --------------------------------------------------------
[INFO wait] docker-compose-wait - Everything's fine, the application can now start!
[INFO wait] --------------------------------------------------------
[2024-05-13 18:36:46] [warning]
Starting MadelineProto...

[2024-05-13 18:36:52] [error] An error occurred while trying to create the database: Connecting to the MySQL server failed: Connection to tcp://mysql:3306 failed after 3 attempts; previous attempts: DNS resolution for mysql failed: All query attempts failed for mysql..: Name 'mysql..' could not be processed for IDN., Name 'mysql..' could not be processed for IDN., DNS resolution for mysql failed: All query attempts failed for mysql..: Name 'mysql..' could not be processed for IDN., Name 'mysql..' could not be processed for IDN.`

env.docker

VERSION=1

SERVER_ADDRESS=0.0.0.0
SERVER_PORT=9503
REAL_IP_HEADER=

MEMORY_LIMIT=256M
TIMEZONE=UTC

REQUESTS_BULK_INTERVAL=0.5

IP_WHITELIST=127.0.0.1,other_ips

PASSWORDS={}

TELEGRAM_API_ID=my_id
TELEGRAM_API_HASH=my_hash
LOGGER_LEVEL=2

TELEGRAM_PROXY_ADDRESS=
TELEGRAM_PROXY_PORT=
TELEGRAM_PROXY_USERNAME=
TELEGRAM_PROXY_PASSWORD=

DB_TYPE=mysql
DB_HOST=mysql
DB_PORT=3306
DB_USER=root
DB_PASSWORD=
DB_DATABASE=MadelineProto
DB_MAX_CONNECTIONS=10
DB_IDLE_TIMEOUT=60

DB_CACHE_TTL="+5 minutes"
DB_SERIALIZER=serialize
DB_ENABLE_MIN_DATABASE=0
DB_ENABLE_FILE_REFERENCE_DATABASE=0

docker-compose.yml

services:
api:
extends:
file: docker-compose.base.yml
service: base-api
ports:
- "127.0.0.1:9503:9503"
command:
- "-s=session"
networks:
- default
mysql:
extends:
file: docker-compose.base.yml
service: base-mysql
ports:
- "127.0.0.1:9507:3306"
networks:
- default

@xtrime-ru
Copy link
Owner

Hi! This is the issue with latest docker version:

Name 'mysql..' could not be processed for IDN

Here are commands for debian/ubuntu: remove current docker, install docker 25 and lock docker version from upgrading future.

apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh --version 25
apt-mark hold docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin

@zqxqt
Copy link
Author

zqxqt commented May 15, 2024

thats helped, thx

@zqxqt zqxqt closed this as completed May 15, 2024
@xtrime-ru
Copy link
Owner

I forgot to send update on this issue.
Latest version of TelegramApiServer now supports docker v26+. I was able to find a bug in one of core libraries and fix it: amphp/dns#118

You can update to latest version of docker and TelegramApiServer like this:

cd TelegramApiServer;
docker compose down
git pull
rm -rf vendor/
apt-mark unhold docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
docker compose pull
docker compose up -d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants