StarRocks / starrocks

StarRocks, a Linux Foundation project, is a next-generation sub-second MPP OLAP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics, and ad-hoc queries.
https://starrocks.io
Apache License 2.0
8.63k stars 1.74k forks source link

Docker images fail to restart after being stopped #47048

Closed MrCreosote closed 1 month ago

MrCreosote commented 2 months ago

Steps to reproduce the behavior (Required)

~/temp/test_starrocks$ curl -O -s https://raw.githubusercontent.com/StarRocks/demo/master/documentation-samples/quickstart/docker-compose.yml
~/temp/test_starrocks$ docker-compose up -d
Creating network "test_starrocks_default" with the default driver
Creating minio ... done
Creating test_starrocks_minio_mc_1 ... done
Creating starrocks-fe              ... done
Creating starrocks-cn              ... done
~/temp/test_starrocks$ docker compose logs starrocks-fe
~/temp/test_starrocks$ docker compose logs starrocks-cn
~/temp/test_starrocks$ docker compose stop
[+] Running 4/4
 ✔ Container starrocks-cn               Stopped                                           10.5s 
 ✔ Container test_starrocks_minio_mc_1  Stopped                                            0.0s 
 ✔ Container starrocks-fe               Stopped                                            1.0s 
 ✔ Container minio                      Stopped                                            0.5s 
~/temp/test_starrocks$ docker-compose up -d
Starting minio ... done
Starting test_starrocks_minio_mc_1 ... done
Starting starrocks-fe              ... done
Starting starrocks-cn              ... done
~/temp/test_starrocks$ docker compose logs starrocks-fe
~/temp/test_starrocks$ docker compose logs starrocks-cn
~/temp/test_starrocks$ docker compose stop
[+] Running 4/4
 ✔ Container test_starrocks_minio_mc_1  Stopped                                            0.0s 
 ✔ Container starrocks-cn               Stopped                                            1.5s 
 ✔ Container starrocks-fe               Stopped                                            0.9s 
 ✔ Container minio                      Stopped                                            0.4s 
~/temp/test_starrocks$ docker-compose up -d
Starting minio ... done
Starting test_starrocks_minio_mc_1 ... done
Starting starrocks-fe              ... done
Starting starrocks-cn              ... done
~/temp/test_starrocks$ docker compose logs starrocks-fe
~/temp/test_starrocks$ docker compose logs starrocks-cn
starrocks-cn  | ERROR 2003 (HY000): Can't connect to MySQL server on 'starrocks-fe:9030' (111)
starrocks-cn  | Backend running as process 1. Stop it first.

Expected behavior (Required)

The container starts normally.

Real behavior (Required)

The container fails to start on the 2nd restart. I've seen this happen for the FE and CN, but for the example above I only saw it for the CN, and only after at least 1 prior restart. The failure is mostly reliable - I didn't keep an exact count but probably 4/5 times it fails.

StarRocks version (Required)

3.2.8

Related tickets

https://github.com/StarRocks/demo/issues/39

kevincai commented 1 month ago

It is known issue that there is a staled be.pid/fe.pid resident there if directly start/stop the container.