一键部署过程中Mysql报错

  • Choerodon平台版本: 1.0.0

  • 遇到问题的执行步骤:昨天装成功了一次,今天安装另一个域名时出现了报错。
    部署到platform的db-init-db的job会导致mysql报错

  • 报错日志:
    mysql日志:

init-db日志

  • 原因分析:

    是不是nfs持久化的问题啊,这种错误我用c7n/mysql的chart安装启动都报错,也是上面的错误。
    后来我自己安装了一个mysql,将lables都加上了c7n那些,现在启动很顺路,但是一执行platform的db-init操作就会报错

  • 疑问:

    为什么会出现这个错误呢 硬盘也没满啊

现在mysql自己又重启了,看着也启动成功了

内存还有10G啊,

我换了台全新的服务器,执行一键安装,mysql还是直接报错。下面是kubectl logs看到的日志,pod没创建成功也进不去。

[root@bogon ~]# kubectl logs -p  -n c7n-system c7n-mysql-67bf9bfb79-z5gmw
2022-03-17T07:51:44.280585Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-03-17T07:51:44.297310Z 0 [Note] mysqld (mysqld 5.7.23) starting as process 1 ...
2022-03-17T07:51:44.300367Z 0 [Note] InnoDB: PUNCH HOLE support available
2022-03-17T07:51:44.300383Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-03-17T07:51:44.300385Z 0 [Note] InnoDB: Uses event mutexes
2022-03-17T07:51:44.300388Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2022-03-17T07:51:44.300390Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2022-03-17T07:51:44.300391Z 0 [Note] InnoDB: Using Linux native AIO
2022-03-17T07:51:44.300821Z 0 [Note] InnoDB: Number of pools: 1
2022-03-17T07:51:44.300891Z 0 [Note] InnoDB: Using CPU crc32 instructions
2022-03-17T07:51:44.301802Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2022-03-17T07:51:44.307135Z 0 [Note] InnoDB: Completed initialization of buffer pool
2022-03-17T07:51:44.308267Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2022-03-17T07:51:44.324544Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2022-03-17T07:51:44.326015Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 49472
2022-03-17T07:51:44.348336Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 2588005
2022-03-17T07:51:44.351281Z 0 [Note] InnoDB: Database was not shutdown normally!
2022-03-17T07:51:44.351301Z 0 [Note] InnoDB: Starting crash recovery.
2022-03-17T07:51:44.364060Z 0 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
2022-03-17T07:51:44.892256Z 0 [Note] InnoDB: Apply batch completed
2022-03-17T07:51:45.013107Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2022-03-17T07:51:45.013129Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-03-17T07:51:45.013747Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-03-17T07:51:45.049187Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2022-03-17T07:51:45.050037Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2022-03-17T07:51:45.050047Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2022-03-17T07:51:45.050354Z 0 [Note] InnoDB: Waiting for purge to start
2022-03-17T07:51:45.100436Z 0 [Note] InnoDB: 5.7.23 started; log sequence number 2588005
2022-03-17T07:51:45.100647Z 0 [Note] Plugin 'FEDERATED' is disabled.
2022-03-17T07:51:45.100787Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2022-03-17T07:51:45.102804Z 0 [Note] InnoDB: Buffer pool(s) load completed at 220317 15:51:45
2022-03-17T07:51:45.103863Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2022-03-17T07:51:45.104021Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2022-03-17T07:51:45.104045Z 0 [Note] IPv6 is available.
2022-03-17T07:51:45.104050Z 0 [Note]   - '::' resolves to '::';
2022-03-17T07:51:45.104060Z 0 [Note] Server socket created on IP: '::'.
2022-03-17T07:51:45.143111Z 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.
2022-03-17T07:51:45.145555Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2022-03-17T07:51:45.145579Z 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2022-03-17T07:51:45.145587Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2022-03-17T07:51:45.145599Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2022-03-17T07:51:45.145602Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2022-03-17T07:51:45.145607Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2022-03-17T07:51:45.148557Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2022-03-17T07:51:45.148569Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2022-03-17T07:51:45.193695Z 0 [Note] Event Scheduler: Loaded 0 events
2022-03-17T07:51:45.193865Z 0 [Note] mysqld: ready for connections.
Version: '5.7.23'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
2022-03-17T07:51:46.050414Z 0 [ERROR] [FATAL] InnoDB: fsync() returned EIO, aborting.
2022-03-17 15:51:46 0x7f85acff1700  InnoDB: Assertion failure in thread 140212109776640 in file ut0ut.cc line 942
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
07:51:46 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=0
max_threads=1500
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 604254 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x40000
mysqld(my_print_stacktrace+0x2c)[0x55df9100fa6c]
mysqld(handle_fatal_signal+0x479)[0x55df9093b709]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7f85ca7ba0c0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf)[0x7f85c8f46fff]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f85c8f4842a]
mysqld(+0x628c7b)[0x55df90911c7b]
mysqld(_ZN2ib5fatalD1Ev+0x12d)[0x55df911df07d]
mysqld(_Z18os_file_flush_funci+0x1e5)[0x55df910ce455]
mysqld(_Z9fil_flushm+0x248)[0x55df91293dd8]
mysqld(_Z15log_write_up_tomb+0xb51)[0x55df910a2ff1]
mysqld(_Z29log_buffer_sync_in_backgroundb+0x10e)[0x55df910a3e2e]
mysqld(srv_master_thread+0xac9)[0x55df91181e39]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7494)[0x7f85ca7b0494]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f85c8ffcacf]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
[root@bogon ~]# 

spec:
  mountOptions:
    - hard
    - intr
    - nfsvers=4.0

也加了

全清了,升级了配置,再装一次

能不能成功全看运气吗

jaing将服务器内存升级到32G,共享目录加了500G空间,mysql初始化看着是好了,不确定后面执行脚本能不能行

我的妈呀。。果然得一边发帖一边部署才能成功吗。。platform-init-db过了。。

我的妈呀。platform部署了。。

但是不知道日志里报错有没有影响

admin好像也成功了。。

asgard和gateway也成了。。。哈哈哈哈哈哈

for r in `helm list -n c7n-system | grep c7n-system | awk '{ print $1}'`;
do
    helm get values $r -n c7n-system > $r.yaml
done
kubectl delete ns c7n-system

感觉之前删除的不干净,这次删除执行的Vista大哥给的命令

fiel、swagger、monitor成了,坐等oauth

oauth、iam、message也好了

gitlab-service和devops-service好像成功了,但是后来有报错


没有管上面的报错,直接又执行了一边安装命令。
好像继续进行了。。

哈哈哈 到前端了,周一那次前端还要单独部署,这次看来不用了

成了?