# Docker upgrade from 4.0.0 to 4.0.1 or 4.0.2 fails with mysql error

**URL:** https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997
**Category:** CMS Installation
**Created:** [September 12, 2023, 4:21pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997 "2023-09-12T16:21:24Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![pp\_browser](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pp\_browser](https://community.xibo.org.uk/u/pp_browser)
#### Post date: [September 12, 2023, 3:12pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/1 "2023-09-12T15:12:35Z")

</div>

Hello,  
upgrade from Xibo 4.0.0 (docker) to 4.0.1 or from 4.0.0 to 4.0.2 doesn’t work. Mysql is not reachable  
 ![image](https://community.xibo.org.uk/uploads/default/original/2X/9/99dc0b016ce3af928f1219a025c804a13d51dc5e.png)  
No error during the upgrade process

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [September 12, 2023, 4:21pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/2 "2023-09-12T16:21:24Z")

</div>

Hi,

In the `docker-compose.yml` file we create a link between the `cms-db` container, and name it `mysql` so that docker should map that host inside the `cms-web` container.

It’s this bit:

```yml
        links:
            - cms-db:mysql

```

It isn’t clear why that would not work for you. Are you using the standard docker compose files we provide?

---

<div class="post-metadata">

### Author: ![pp\_browser](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pp\_browser](https://community.xibo.org.uk/u/pp_browser)
#### Post date: [September 12, 2023, 4:38pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/3 "2023-09-12T16:38:23Z")

</div>

Hi,  
I have been updating Xibo regularly since version 1.7.5 without any problems  
It is since the transition from version 4.0.0 to 4.0.1 or 4.0.2 that the problem occured.  
I use the standard docker compose files that you provide.

I will test again and check if the docker-compose.yml file contains the indicated link

---

<div class="post-metadata">

### Author: ![pp\_browser](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pp\_browser](https://community.xibo.org.uk/u/pp_browser)
#### Post date: [September 12, 2023, 4:50pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/4 "2023-09-12T16:50:41Z")

</div>

Hi,

Here the details (I removed the links. 2 only allowed)

```auto
root@s001linux03:~# cd /opt/xibo
root@s001linux03:/opt/xibo# docker-compose stop
Stopping xibo_cms-web_1 ... done
Stopping xibo_cms-xmr_1 ... done
Stopping xibo_cms-db_1 ... done
Stopping xibo_cms-memcached_1 ... done
Stopping xibo_cms-quickchart_1 ... done
root@s001linux03:/opt/xibo# wget ***
--2023-09-12 18:41:51-- https://github.com/xibosignage/xibo-cms/releases/download/4.0.2/xibo-docker.tar.gz
Resolving github
Connecting to github|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: following]
--2023-09-12 18:41:51--  
Resolving objects
Connecting to objects.
HTTP request sent, awaiting response... 200 OK
Length: 16064 (16K) [application/octet-stream]
Saving to: ‘xibo-docker.tar.gz.1’

xibo-docker.tar.gz.1 100%[=====================================================================================================================================>] 15,69K --.-KB/s in 0,001s

2023-09-12 18:41:51 (14,3 MB/s) - ‘xibo-docker.tar.gz.1’ saved [16064/16064]

root@s001linux03:/opt/xibo# tar --strip 1 -zxvf xibo-docker.tar.gz
xibo-docker-4.0.0/.gitignore
xibo-docker-4.0.0/LICENSE
xibo-docker-4.0.0/README.md
xibo-docker-4.0.0/cms_custom-ports.yml.template
xibo-docker-4.0.0/cms_remote-mysql.yml
xibo-docker-4.0.0/config.env.template
xibo-docker-4.0.0/config.env.template-remote-mysql
xibo-docker-4.0.0/docker-compose.yml
root@s001linux03:/opt/xibo# nano docker-compose.yml
root@s001linux03:/opt/xibo# nano cms_remote-mysql.yml
root@s001linux03:/opt/xibo# nano docker-compose.yml
root@s001linux03:/opt/xibo# nano cms_remote-mysql.yml
root@s001linux03:/opt/xibo# docker-compose -f cms_custom-ports.yml up -d
WARNING: Found orphan containers (xibo_cms-memcached_1, xibo_cms-quickchart_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Recreating xibo_cms-xmr_1 ... done
Recreating xibo_cms-db_1 ... done
Recreating xibo_cms-web_1 ... done
root@s001linux03:/opt/xibo# docker-compose up -d
Recreating xibo_cms-db_1 ... done
Recreating xibo_cms-xmr_1 ... done
Starting xibo_cms-memcached_1 ... done
Starting xibo_cms-quickchart_1 ... done
Recreating xibo_cms-web_1 ... done
root@s001linux03:/opt/xibo# docker exec -ti xibo_cms-web_1 bash
root@1b178e50101f:/# mysql -u cms -h mysql -p *************
ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-3)

```

 ![image](https://community.xibo.org.uk/uploads/default/original/2X/6/6266bca0980a7812ad6260a3aae06a37c1a43dec.png)

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [September 12, 2023, 5:20pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/5 "2023-09-12T17:20:15Z")

</div>

I wonder if the database isn’t able to start for some reason - or it starts and then stops.

We updated the MySQL container to 8.0 in 4.0.0, but you say that version is working, its just the 4.0.0 → 4.0.1/2 that doesn’t work. If there was a problem with MySQL I would have expected it to fail when you went from 3.3.7 to 4.0.0

Please can you get the output of:

```auto
docker-compose ps

```

And then:

```auto
docker-compose logs -f cms-db

```

---

<div class="post-metadata">

### Author: ![pp\_browser](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pp\_browser](https://community.xibo.org.uk/u/pp_browser)
#### Post date: [September 13, 2023, 12:54pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/6 "2023-09-13T12:54:10Z")

</div>

Hi,  
Here the results :  
**root@s001linux03:/opt/xibo# docker-compose ps**

Name Command State Ports  
xibo\_cms-db\_1 docker-entrypoint.sh mysqld Up 3306/tcp, 33060/tcp  
xibo\_cms-memcached\_1 docker-entrypoint.sh memca … Up 11211/tcp  
xibo\_cms-quickchart\_1 yarn start Up 3400/tcp  
xibo\_cms-web\_1 /entrypoint.sh Up 0.0.0.0:8080-\>80/tcp,:::8080-\>80/tcp  
xibo\_cms-xmr\_1 docker-php-entrypoint /ent … Up 50001/tcp, 0.0.0.0:9505-\>9505/tcp,:::9505-\>9505/tcp

**docker-compose logs -f cms-db**  
**(returns many lines like these)**

cms-db\_1 | 2023-09-11T04:53:54.536445Z 67143 [Warning] [MY-013360] [Server] Plugin mysql\_native\_password reported: ‘‘mysql\_native\_password’ is deprecated and will be removed in a future release. Please use caching\_sha2\_password instead’  
cms-db\_1 | 2023-09-11T04:53:55.136175Z 67144 [Warning] [MY-013360] [Server] Plugin mysql\_native\_password reported: ‘‘mysql\_native\_password’ is deprecated and will be removed in a future release. Please use caching\_sha2\_password instead’

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [September 13, 2023, 2:54pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/7 "2023-09-13T14:54:29Z")

</div>

So the `cms-db` container is up 😕 I see no reason why it wouldn’t be linked.

```auto
docker exec -ti xibo_cms-web_1 bash

```

Does the host ping?

```auto
ping mysql
ping cms-db

```

I guess you could open up your `config.env` file and change the MySQL host to use the unlinked name

```auto
MYSQL_HOST=cms-db

```

And then `up -d` the whole lot.

---

<div class="post-metadata">

### Author: ![pp\_browser](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pp\_browser](https://community.xibo.org.uk/u/pp_browser)
#### Post date: [September 13, 2023, 3:22pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/8 "2023-09-13T15:22:43Z")

</div>

I tried this in 4.0.0  
ping mysql : ok  
ping cms-db : ok

I added MYSQL\_HOST=cms-db to config.env then upgraded to 4.0.2  
ping mysql : ok  
ping cms-db : KO

root@c97185c2bcb0:/# ping cms-db  
ping: cms-db: Temporary failure in name resolution

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [September 13, 2023, 3:41pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/9 "2023-09-13T15:41:37Z")

</div>

> [@pp\_browser](#):
>
> ping mysql : ok  
> ERROR 2005 (HY000): Unknown MySQL server host ‘mysql’ (-3)

So after upgrading to 4.0.2 you can ping the host, but you can’t connect to the host via the `mysql` client, but the `mysql` container is up.

I’ve never seen anything like this before.

@alex any ideas?

---

<div class="post-metadata">

### Author: ![alex](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/alex/32/5782_2.png) [@alex](https://community.xibo.org.uk/u/alex)
#### Post date: [September 13, 2023, 4:08pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/10 "2023-09-13T16:08:03Z")

</div>

You’re downloading the new docker files but they’re being saved as `xibo-docker.tar.gz.1` since `xibo-docker.tar.gz` already exists, and then you’re extracting `xibo-docker.tar.gz` so you’re not getting any new files there.

You also have orphan containers. I would down the stack, remove the orphans as the help text suggests, and then bring it up cleanly with the 4.0.2 containers. I would remove the MYSQL\_HOST you added to config.env as that shouldn’t be necessary.

---

<div class="post-metadata">

### Author: ![pp\_browser](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pp\_browser](https://community.xibo.org.uk/u/pp_browser)
#### Post date: [September 14, 2023, 8:00am UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/11 "2023-09-14T08:00:34Z")

</div>

xibo-docker.tar.gz is removed systematically before each upgrade.  
I have been applying this procedure since version 1.7.5  
i will check orphan containers and remove MYSQL\_HOST from config.env  
I will get back to you as soon as possible.

Indeed, in the screenshots that I posted it refers to xibo-docker.tar.gz.1

---

<div class="post-metadata">

### Author: ![pp\_browser](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pp\_browser](https://community.xibo.org.uk/u/pp_browser)
#### Post date: [September 14, 2023, 4:29pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/12 "2023-09-14T16:29:46Z")

</div>

I tried an upgrade with remove- orphans option from 4.0.0 to 4.0.2 and same result

docker-compose -f cms\_custom-ports.yml up -d --remove-orphans

root@f01f1972e218:/# ping cms-db  
PING cms-db (172.18.0.4) 56(84) bytes of data.  
64 bytes from xibo\_cms-db\_1.xibo\_default (172.18.0.4): icmp\_seq=1 ttl=64 time=0.075 ms  
64 bytes from xibo\_cms-db\_1.xibo\_default (172.18.0.4): icmp\_seq=2 ttl=64 time=0.064 ms  
64 bytes from xibo\_cms-db\_1.xibo\_default (172.18.0.4): icmp\_seq=3 ttl=64 time=0.061 ms

root@f01f1972e218:/# ping mysql  
ping: mysql: Temporary failure in name resolution

root@f01f1972e218:/# mysql -u cms -h mysql -p\*\*\*\*\*\*\*\*\*  
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘mysql’ (115)

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [September 15, 2023, 10:47am UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/13 "2023-09-15T10:47:44Z")

</div>

Can you try downing the containers so that they get recreated from scratch?

```auto
docker-compose down

```

```auto
docker-compose -f cms_custom-ports.yml up -d

```

I am not sure if this is useful, but it perhaps explains why we’re scratching our heads. This is the difference between 4.0.0 and 4.0.2: [Comparing 4.0.0...4.0.2 · xibosignage/xibo-docker · GitHub](https://github.com/xibosignage/xibo-docker/compare/4.0.0...4.0.2)

And this is the difference between 3.3.8 and 4.0.2: [Comparing 3.3.8...4.0.2 · xibosignage/xibo-docker · GitHub](https://github.com/xibosignage/xibo-docker/compare/3.3.8...4.0.2) (click on “Files Changed”)

As you can see, not a whole lot of changes in there, and nothing which could explain the issue you’re facing here.

---

<div class="post-metadata">

### Author: ![pp\_browser](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pp\_browser](https://community.xibo.org.uk/u/pp_browser)
#### Post date: [September 15, 2023, 11:26am UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/14 "2023-09-15T11:26:56Z")

</div>

Thank you for this tip. I will try to upgrade once more asap.  
Regards

---

<div class="post-metadata">

### Author: ![pp\_browser](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pp\_browser](https://community.xibo.org.uk/u/pp_browser)
#### Post date: [September 15, 2023, 3:50pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/15 "2023-09-15T15:50:30Z")

</div>

I tried with  
docker-compose down  
docker-compose -f cms\_custom-ports.yml up -d  
Then upgraded 4.0.0 to 4.0.2 and same result :

Recreating xibo\_cms-db\_1 … done  
Recreating xibo\_cms-xmr\_1 … done  
Creating xibo\_cms-quickchart\_1 … done  
Creating xibo\_cms-memcached\_1 … done  
Recreating xibo\_cms-web\_1 … done  
root@s001linux03:/opt/xibo# docker exec -ti xibo\_cms-web\_1 bash  
root@f39c25c31604:/# mysql -u cms -h mysql -p\*\*\*\*\*\*\*\*  
**ERROR 2005 (HY000): Unknown MySQL server host ‘mysql’ (-3)**  
root@f39c25c31604:/# ping mysql  
PING mysql (172.18.0.3) 56(84) bytes of data.  
64 bytes from xibo\_cms-db\_1.xibo\_default (172.18.0.3): icmp\_seq=1 ttl=64 time=0.110 ms  
64 bytes from xibo\_cms-db\_1.xibo\_default (172.18.0.3): icmp\_seq=2 ttl=64 time=0.061 ms  
64 bytes from xibo\_cms-db\_1.xibo\_default (172.18.0.3): icmp\_seq=3 ttl=64 time=0.071 ms  
^C  
— mysql ping statistics —  
8 packets transmitted, 3 received, 62.5% packet loss, time 7126ms  
rtt min/avg/max/mdev = 0.061/0.080/0.110/0.021 ms

root@f39c25c31604:/# ping cms-db  
**ping: cms-db: Temporary failure in name resolution**

---

<div class="post-metadata">

### Author: ![pp\_browser](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pp\_browser](https://community.xibo.org.uk/u/pp_browser)
#### Post date: [September 26, 2023, 4:46pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/16 "2023-09-26T16:46:17Z")

</div>

Hello,  
same issue when upgrading from 4.0.0 to 4.0.3  
**ping: cms-db: Temporary failure in name resolution**  
or  
**ping: mysql: Temporary failure in name resolution**

---

<div class="post-metadata">

### Author: ![natasha](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/natasha/32/18270_2.png) [@natasha](https://community.xibo.org.uk/u/natasha)
#### Post date: [September 29, 2023, 10:04am UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/17 "2023-09-29T10:04:33Z")

</div>

Hi, could you provide logs from the MySQL container?

---

<div class="post-metadata">

### Author: ![pp\_browser](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pp\_browser](https://community.xibo.org.uk/u/pp_browser)
#### Post date: [September 29, 2023, 10:30am UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/18 "2023-09-29T10:30:46Z")

</div>

Hi,  
I will make another attempt to upgrade 4.0.0 to 4.0.3 and will send you the mysql logs as soon as possible

---

<div class="post-metadata">

### Author: ![pp\_browser](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pp\_browser](https://community.xibo.org.uk/u/pp_browser)
#### Post date: [September 29, 2023, 11:38am UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/19 "2023-09-29T11:38:51Z")

</div>

> [@pp\_browser](#):
>
> **ping: cms-db: Temporary failure in name resolution**  
> or  
> **ping: mysql: Temporary failure in name resolution**

Could you please tell me where are mysql logs ?

 ![image](https://community.xibo.org.uk/uploads/default/original/2X/a/ab20fcb0cab6c036ed468fae2a88bda7eb15189e.png)  
I can find mysqld.log but the file is empty  
I can’t find error.log.

---

<div class="post-metadata">

### Author: ![natasha](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/natasha/32/18270_2.png) [@natasha](https://community.xibo.org.uk/u/natasha)
#### Post date: [September 29, 2023, 12:31pm UTC](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997/20 "2023-09-29T12:31:29Z")

</div>

`docker-compose logs cms-db`

[Next page](https://community.xibo.org.uk/t/docker-upgrade-from-4-0-0-to-4-0-1-or-4-0-2-fails-with-mysql-error/29997.md?page=2)
