Closed alberttwong closed 1 year ago
Cannot add PV. If you create the PV, use it and then try to reattach again, SR doesn't start up
atwong@Alberts-MBP ~ % docker volume create starrocks-storage-be
docker volume create starrocks-storage-fe
docker run -p 9030:9030 -p 8030:8030 -p 8040:8040 -itd --name=starrocks -v starrocks-storage-be:/data/deploy/starrocks/be/storage -v starrocks-storage-fe:/data/deploy/starrocks/fe/meta registry.starrocks.io/starrocks/allin1-ubuntu
starrocks-storage-be
starrocks-storage-fe
3242eedacb36b21b4e6c20692f56a6ed19b275a2690393580d19ef538c7561e9
atwong@Alberts-MBP ~ % docker stop starrocks
starrocks
atwong@Alberts-MBP ~ % docker rm starrocks
starrocks
atwong@Alberts-MBP ~ %
docker run -p 9030:9030 -p 8030:8030 -p 8040:8040 -itd --name=starrocks -v starrocks-storage-be:/data/deploy/starrocks/be/storage -v starrocks-storage-fe:/data/deploy/starrocks/fe/meta registry.starrocks.io/starrocks/allin1-ubuntu
bf93284966d773d7aa9d6888f5493c43a8fe005d2872fad6988211d2a23582e4
atwong@Alberts-MBP ~ % mysql -P9030 -h127.0.0.1 -uroot --prompt="StarRocks > "
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Cannot add PV. If you create the PV, use it and then try to reattach again, SR doesn't start up
atwong@Alberts-MBP ~ % docker volume create starrocks-storage-be docker volume create starrocks-storage-fe docker run -p 9030:9030 -p 8030:8030 -p 8040:8040 -itd --name=starrocks -v starrocks-storage-be:/data/deploy/starrocks/be/storage -v starrocks-storage-fe:/data/deploy/starrocks/fe/meta registry.starrocks.io/starrocks/allin1-ubuntu starrocks-storage-be starrocks-storage-fe 3242eedacb36b21b4e6c20692f56a6ed19b275a2690393580d19ef538c7561e9 atwong@Alberts-MBP ~ % docker stop starrocks starrocks atwong@Alberts-MBP ~ % docker rm starrocks starrocks atwong@Alberts-MBP ~ % docker run -p 9030:9030 -p 8030:8030 -p 8040:8040 -itd --name=starrocks -v starrocks-storage-be:/data/deploy/starrocks/be/storage -v starrocks-storage-fe:/data/deploy/starrocks/fe/meta registry.starrocks.io/starrocks/allin1-ubuntu bf93284966d773d7aa9d6888f5493c43a8fe005d2872fad6988211d2a23582e4 atwong@Alberts-MBP ~ % mysql -P9030 -h127.0.0.1 -uroot --prompt="StarRocks > " ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Probably because of the IP changed... You need to either enable FQDN or give it a static IP
https://github.com/StarRocks/starrocks/blob/main/docker/dockerfiles/allin1/start_fe_be.sh looks like FQDN is enabled.
https://github.com/StarRocks/starrocks/blob/main/docker/dockerfiles/allin1/start_fe_be.sh looks like FQDN is enabled.
You are right, let me take another look....
Tried
docker network create --subnet=172.20.0.0/16 customnetwork
docker run -p 9030:9030 -p 8030:8030 -p 8040:8040 -itd --name=starrocks -v starrocks-storage-be:/data/deploy/starrocks/be/storage -v starrocks-storage-fe:/data/deploy/starrocks/fe/meta --ip 172.20.0.10 --net customnetwork registry.starrocks.io/starrocks/allin1-ubuntu
Doesn't matter if static or dynamic IP.
The issue is: If you're "docker rm starrocks", you can't reattach the the PV storage anymore. You can have to delete all resources. If you want to use the storage again and again to persist the data between restarts, you need to "docker stop starrocks" and "docker run starrocks".
This "kind of" works per above comment.
this will not be an issue since our 3.1 allin1 container. we use fixed 127.0.0.1
to register the services inside container.
Enhancement