lapicidae / vdr-epg-daemon

VDR EPG Daemon docker image based on ubuntu
GNU General Public License v2.0
0 stars 0 forks source link

vdr-epg-daemon cannot connect to mysql #6

Open tobiasfaust opened 2 years ago

tobiasfaust commented 2 years ago

Hi, with below docker compose file the vdr-epg-daemon throws following error: SQL-Error in 'connecting to database' - Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2) (2002) Do you have any idea where is the problem?

`version: '2.0' services: vdr-epg-daemon: image: 'lapicidae/vdr-epg-daemon:latest' container_name: vdr-epg-daemon volumes:

volumes: db_data: epgd_cache: epgd_channellogos: epgd_epgimages: epgd_config: `

tobiasfaust commented 2 years ago

Hi, partially solved. I added a new volume to mysql docker and vdr-epg-daemon docker and this problem is now solved. var_run:/run/mysqld:rw

but now, the docker container is not able to establish network connections epgd: Error: Getting URL failed; Couldn't resolve host name (6); http code was (0) [thetvdb.com/api/E9DBB94CA50832ED/mirrors.xml]

I tested the container by docker exec -u0 -it vdr-epg-daemon bash

root@ee99e7ef35f4:/epgd# apt install wget
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package wget
root@ee99e7ef35f4:/epgd#

and i tested the mysql container:

root@1a3a7936e6dc:/tmp# apt install wget
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  wget
0 upgraded, 1 newly installed, 0 to remove and 51 not upgraded.
Need to get 348 kB of archives.
After this operation, 1.012 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 wget amd64 1.20.3-1ubuntu2 [348 kB]
Fetched 348 kB in 0s (1.145 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package wget.
(Reading database ... 10797 files and directories currently installed.)
Preparing to unpack .../wget_1.20.3-1ubuntu2_amd64.deb ...
Unpacking wget (1.20.3-1ubuntu2) ...
Setting up wget (1.20.3-1ubuntu2) ...
root@1a3a7936e6dc:/tmp#

Are you able to imagine whats wrong with vdr-epg-daemon image?

docker-compose.yml.txt my docker-compose file

lapicidae commented 2 years ago

I have absolutely no idea what is going wrong 😕

First of all... I assume that the latest epgd docker image version is used.

You can test the internet connection by: timeout 2 bash -c "</dev/tcp/google.com/80" && echo "online" || echo "offline" or if you want to use apt, then use apt update first, since apt may not have been initialized yet.

Can other containers connect to your database? (for example phpMyAdmin)

Possibly you could try a virgin database/epgd docker container.

My compose file contains:

version: '2.4'
services:
  mysqld:
    image: 'lapicidae/mariadb-epglv:latest'
    container_name: mariadb-epglv
    volumes:
      - '/srv/Docker/MySQL:/var/lib/mysql:rw'
    environment:
      - EPGD_RECOMMEND=yes
      - LANG=de_DE.UTF-8
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes
      - TZ=Europe/Berlin
    network_mode: bridge
    ports:
      - '3306:3306'
    restart: unless-stopped
  vdr-epg-daemon:
    image: 'lapicidae/vdr-epg-daemon:latest'
    container_name: vdr-epg-daemon
    depends_on:
      - mysqld
    volumes:
      - '/srv/Docker/epgd/cache:/epgd/cache:rw'
      - '/srv/Docker/epgd/epgimages:/epgd/epgimages:rw'
      - '/srv/Docker/epgd/config:/epgd/config:rw'
    environment:
      - LANG=de_DE.UTF-8
      - PUID=666
      - PGID=990
      - RESTART_EPGD=true
      - TZ=Europe/Berlin
    network_mode: bridge
    ports:
      - '9999:9999'
    restart: unless-stopped