一键安装choerodon myssql创建超时

  • Choerodon平台版本: 0.8.0

  • 遇到问题的执行步骤:
    sh choerodon-install.sh values.sh

  • 文档地址:
    http://choerodon.io/zh/docs/installation-configuration/steps/choerodon/

  • 环境信息(如:节点信息):
    部署到一台测试服务器

  • 报错日志:
    [Step 9]: create database for Choerodon …
    Error: timed out waiting for the condition
    ?create database failed

  • 原因分析:

    提出您分析问题的过程,以便我们能更准确的找到问题所在
    一键安装choerodon,执行脚本的时候第九步一直超时,我重试了无数次,还是这个错误,是否要设置mysql超时连接时间,需要到怎么设置。

  • 疑问:

    提出您对于遇到和解决该问题时的疑问
    超时,要如何设置呢?

如果你之前安装失败 或执行过分布安装 请根据文档中关于安装失败的步骤进行数据清理和还原。

执行过无所次了,也删除过数据重新执行,还是报这个错

同样的错误。试过很多遍了。错误依然存在。请问下有什么解决办法?

是否已经创建了 MYSQL_DIR 中定义的目录?

创建了。
NAME: choerodon-mysql
LAST DEPLOYED: Wed Aug 29 15:44:26 2018
NAMESPACE: liantai-devops-ofc
STATUS: DEPLOYED

RESOURCES:
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
choerodon-mysql-7ff6f6d496-pvg6p 0/2 Pending 0 9m

==> v1/ConfigMap
NAME DATA AGE
choerodon-mysql-config 1 9m

==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
choerodon-mysql ClusterIP 10.68.81.143 3306/TCP 9m

==> v1beta1/Deployment
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
choerodon-mysql 1 0 0 0 9m

:heavy_check_mark: Success of install Mysql for Choerodon.

[Step 8]: checking Mysql ready …
➜ choerodon-mysql not ready,sleep 5s,check it.
➜ choerodon-mysql not ready,sleep 5s,check it.
:heavy_check_mark: Mysql is ready.

[Step 9]: create database for Choerodon …
Error: Job failed: DeadlineExceeded
:heavy_multiplication_x: create database failed

[root@ofcdeploy choerodon]# kubectl get all -n choerodon-devops-prod
NAME READY STATUS RESTARTS AGE
pod/choerodon-mysql-7ff6f6d496-pvg6p 2/2 Running 0 23m

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/choerodon-mysql ClusterIP 10.68.81.143 3306/TCP 23m

NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deployment.apps/choerodon-mysql 1 1 1 1 23m

NAME DESIRED CURRENT READY AGE
replicaset.apps/choerodon-mysql-7ff6f6d496 1 1 1 23m

NAME DESIRED SUCCESSFUL AGE
job.batch/create-choerodon-databases 1 0 23m

[root@ofcdeploy choerodon]# kubectl get pvc -n choerodon-devops-prod
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
choerodon-mysql-pvc Bound choerodon-mysql-pv 3Gi RWO

看job日志。最后一条有关系吗?

  SQL_SCRIPT:  CREATE DATABASE IF NOT EXISTS devops_service DEFAULT CHARACTER SET utf8;           CREATE DATABASE IF NOT EXISTS gitlab_service DEFAULT CHARACTER SET utf8;           CREATE DATABASE IF NOT EXISTS iam_service DEFAULT CHARACTER SET utf8;           CREATE DATABASE IF NOT EXISTS manager_service DEFAULT CHARACTER SET utf8;           CREATE DATABASE IF NOT EXISTS agile_service DEFAULT CHARACTER SET utf8;           CREATE DATABASE IF NOT EXISTS test_manager_service DEFAULT CHARACTER SET utf8;           CREATE DATABASE IF NOT EXISTS asgard_service DEFAULT CHARACTER SET utf8;           CREATE DATABASE IF NOT EXISTS notify_service DEFAULT CHARACTER SET utf8;           GRANT ALL PRIVILEGES ON devops_service.* TO devops@'%';           GRANT ALL PRIVILEGES ON gitlab_service.* TO devops@'%';           GRANT ALL PRIVILEGES ON iam_service.* TO devops@'%';           GRANT ALL PRIVILEGES ON manager_service.* TO devops@'%';           GRANT ALL PRIVILEGES ON agile_service.* TO devops@'%';           GRANT ALL PRIVILEGES ON test_manager_service.* TO devops@'%';           GRANT ALL PRIVILEGES ON asgard_service.* TO devops@'%';           GRANT ALL PRIVILEGES ON notify_service.* TO devops@'%';           FLUSH PRIVILEGES;
Mounts:        <none>

Volumes:
Events:
Type Reason Age From Message


Normal SuccessfulCreate 25m job-controller Created pod: create-choerodon-databases-2jqj9
Normal SuccessfulDelete 23m job-controller Deleted pod: create-choerodon-databases-2jqj9
Warning DeadlineExceeded 23m (x2 over 23m) job-controller Job was active longer than specified deadline

执行过无所次了,也删除过数据重新执行,还是报这个错?

你的服务器是哪个服务商? 使用哪种方式部署的k8s

我是在自己的服务器上部署的。k8s用二进制方式部署的。1.11.1版本

我们暂时仅在 1.8.5 和 1.9.9中测试,1.11暂未测试,你在部署的时候 可以另起一个窗口 跟踪pod信息, 当出现 create-choerodon-databases-xxx 这个pod时跟踪它的日志。

2018-08-29T07:35:08.036734Z 0 [Note] mysqld (mysqld 5.7.22) starting as process 1 …
2018-08-29T07:35:08.056832Z 0 [Warning] InnoDB: Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
2018-08-29T07:35:08.057328Z 0 [Note] InnoDB: PUNCH HOLE support available
2018-08-29T07:35:08.057367Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-08-29T07:35:08.057382Z 0 [Note] InnoDB: Uses event mutexes
2018-08-29T07:35:08.057408Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-08-29T07:35:08.057420Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-08-29T07:35:08.057432Z 0 [Note] InnoDB: Using Linux native AIO
2018-08-29T07:35:08.059387Z 0 [Note] InnoDB: Number of pools: 1
2018-08-29T07:35:08.060658Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-08-29T07:35:08.067729Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-08-29T07:35:08.090888Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-08-29T07:35:08.099249Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-08-29T07:35:08.220479Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-08-29T07:35:08.439140Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-08-29T07:35:08.450553Z 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12 MB. Physically writing the file full; Please wait …
2018-08-29T07:35:08.948882Z 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12 MB.
2018-08-29T07:35:08.975180Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2018-08-29T07:35:08.975275Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2018-08-29T07:35:08.979403Z 0 [Note] InnoDB: 5.7.22 started; log sequence number 12360107
2018-08-29T07:35:08.981170Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2018-08-29T07:35:08.981351Z 0 [Note] Plugin ‘FEDERATED’ is disabled.
2018-08-29T07:35:09.179995Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2018-08-29T07:35:09.185626Z 0 [Warning] CA certificate ca.pem is self signed.
2018-08-29T07:35:09.189307Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180829 7:35:09
2018-08-29T07:35:09.193628Z 0 [Note] Server hostname (bind-address): ‘*’; port: 3306
2018-08-29T07:35:09.193802Z 0 [Note] IPv6 is available.
2018-08-29T07:35:09.193866Z 0 [Note] - ‘::’ resolves to ‘::’;
2018-08-29T07:35:09.194613Z 0 [Note] Server socket created on IP: ‘::’.
2018-08-29T07:35:09.199889Z 0 [Warning] Insecure configuration for --pid-file: Location ‘/var/run/mysqld’ in the path is accessible to all OS users. Consider choosing a different directory.
2018-08-29T07:35:09.253221Z 0 [Warning] ‘user’ entry ‘root@localhost’ ignored in --skip-name-resolve mode.
2018-08-29T07:35:09.253366Z 0 [Warning] ‘user’ entry ‘mysql.session@localhost’ ignored in --skip-name-resolve mode.
2018-08-29T07:35:09.253407Z 0 [Warning] ‘user’ entry ‘mysql.sys@localhost’ ignored in --skip-name-resolve mode.
2018-08-29T07:35:09.253552Z 0 [Warning] ‘db’ entry ‘performance_schema mysql.session@localhost’ ignored in --skip-name-resolve mode.
2018-08-29T07:35:09.253587Z 0 [Warning] ‘db’ entry ‘sys mysql.sys@localhost’ ignored in --skip-name-resolve mode.
2018-08-29T07:35:09.253674Z 0 [Warning] ‘proxies_priv’ entry ‘@ root@localhost’ ignored in --skip-name-resolve mode.
2018-08-29T07:35:09.337764Z 0 [Warning] ‘tables_priv’ entry ‘user mysql.session@localhost’ ignored in --skip-name-resolve mode.
2018-08-29T07:35:09.337853Z 0 [Warning] ‘tables_priv’ entry ‘sys_config mysql.sys@localhost’ ignored in --skip-name-resolve mode.
2018-08-29T07:35:09.513301Z 0 [Note] Event Scheduler: Loaded 0 events
2018-08-29T07:35:09.514038Z 0 [Note] mysqld: ready for connections.
Version: ‘5.7.22’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 MySQL Community Server (GPL)

从日志上看还是比较正常的。

不是mysql的 是create-choerodon-databases-xxx 这个

应该跟istio自动注入有关系。关掉就可以了。 启用istio自动注入,job就不跑了。。。

大佬,一键部署遇到以下问题没,
2019/02/21 10:28:56 [INFO] Checking gitlab-mysql is running
2019/02/21 10:28:56 [DEBUG] checking gitlab-mysql:3306
2019/02/21 10:28:58 [DEBUG] check health failed with msg: dial tcp 10.233.60.80:3306: i/o timeout retry…

我看到服务EXTERNAL-IP为none,不知道一键部署这个是不是正常的。
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
gitlab-mysql ClusterIP 10.233.60.80 3306/TCP 6m
mysql ClusterIP 10.233.7.97 3306/TCP 6m
redis ClusterIP 10.233.10.44 6379/TCP 6m

这个一般是mysql没有启动成功