使用 Helm 图表的 Kubernetes 上的 MariaDB 错误

如何解决使用 Helm 图表的 Kubernetes 上的 MariaDB 错误

我正在尝试使用 Helm 图表在我的 Kubernetes 集群上为 matomo 服务部署 MariaDB,其中包含我在下面添加文件。 但 pod 卡在 CrashLoopBackOff 上,并显示以下日志:

2021-05-03 09:07:00+00:00 [Note] [Entrypoint]: Entrypoint script for MysqL Server 1:10.5.9+maria~focal started.
2021-05-03 09:07:01+00:00 [Note] [Entrypoint]: Switching to dedicated user 'MysqL'
2021-05-03 09:07:01+00:00 [Note] [Entrypoint]: Entrypoint script for MysqL Server 1:10.5.9+maria~focal started.
2021-05-03  9:07:02 0 [Note] MysqLd (MysqLd 10.5.9-MariaDB-1:10.5.9+maria~focal) starting as process 1 ...
2021-05-03  9:07:03 0 [Note] InnoDB: Uses event mutexes
2021-05-03  9:07:03 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-05-03  9:07:03 0 [Note] InnoDB: Number of pools: 1
2021-05-03  9:07:03 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2021-05-03  9:07:03 0 [Note] MysqLd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2021-05-03  9:07:03 0 [Note] InnoDB: Using Linux native AIO
2021-05-03  9:07:03 0 [Note] InnoDB: Initializing buffer pool,total size = 134217728,chunk size = 134217728
2021-05-03  9:07:03 0 [Note] InnoDB: Completed initialization of buffer pool
2021-05-03  9:07:03 0 [Note] InnoDB: If the MysqLd execution user is authorized,page cleaner thread priority can be changed. See the man page of setpriority().
2021-05-03  9:07:03 0 [Warning] InnoDB: Retry attempts for reading partial data Failed.
2021-05-03  9:07:03 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2021-05-03  9:07:03 0 [ERROR] InnoDB: The error means MysqLd does not have the access rights to the directory.
2021-05-03  9:07:03 0 [ERROR] [FATAL] InnoDB: Tried to read 65536 bytes at offset 38400,but was only able to read 0.Cannot read from file. OS error number 13.
210503  9:07:03 [ERROR] 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.

To report this bug,see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem,but since we have already crashed,something is definitely wrong and this may fail.

Server version: 10.5.9-MariaDB-1:10.5.9+maria~focal
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that MysqLd Could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467864 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 = 0x0 thread_stack 0x49000
MysqLd(my_print_stacktrace+0x32)[0x5580060f8af2]
Printing to addr2line Failed
MysqLd(handle_fatal_signal+0x485)[0x558005b4e6f5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7fbde3b0f3c0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7fbde361618b]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7fbde35f5859]
MysqLd(+0x62dd5b)[0x558005810d5b]
MysqLd(+0x610d02)[0x5580057f3d02]
MysqLd(+0xcdd9c6)[0x558005ec09c6]
MysqLd(+0xcc8d7b)[0x558005eabd7b]
MysqLd(+0xccdc4b)[0x558005eb0c4b]
MysqLd(+0xcd1f49)[0x558005eb4f49]
MysqLd(+0xcd2570)[0x558005eb5570]
MysqLd(+0x6264eb)[0x5580058094eb]
MysqLd(+0xc65d59)[0x558005e48d59]
MysqLd(_Z24ha_initialize_handlertonP13st_plugin_int+0x82)[0x558005b51792]
MysqLd(+0x76c2aa)[0x55800594f2aa]
MysqLd(_Z11plugin_initPiPPci+0x965)[0x558005950585]
MysqLd(+0x68b6ab)[0x55800586e6ab]
MysqLd(_Z11MysqLd_mainiPPc+0x455)[0x558005874275]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fbde35f70b3]
MysqLd(_start+0x2e)[0x55800586901e]
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-MysqLd/ contains
information that should help you find out what is causing the crash.
Writing a core file...
Working directory at /var/lib/MysqL
Resource Limits:
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds   
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            8388608              unlimited            bytes     
Max core file size        unlimited            unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             unlimited            unlimited            processes 
Max open files            1048576              1048576              files     
Max locked memory         67108864             67108864             bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       63912                63912                signals   
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0                    
Max realtime priority     0                    0                    
Max realtime timeout      unlimited            unlimited            us        
Core pattern: |/usr/share/apport/apport %p %s %c %d %P %E

Fatal signal 11 while backtracing

values.yaml:

name: mariadb # e.g. - Box-model
image: mariadb:latest # e.g. bsmchacr.azurecr.io/helloworld:50
deployment:
  extraEnvs:
    - name: MysqL_DATABASE
      value: db
    - name: MysqL_ROOT_PASSWORD
      value: password
    - name: MysqL_USER
      value: matomo
    - name: MysqL_PASSWORD
      value: password
  replicas: 1
  strategy: RollingUpdate
  imagePullPolicy: IfNotPresent
  containerPort: 3306 # May need to override
  volumeMounts:
    mountPath: /var/lib/MysqL
    name: db-data
  restartPolicy: Always
  nodeselectorOs: linux
  annotations:
    fluxcdautomated: "true"
ingress:
  host: # e.g. - Box-model.it.bsmch.net
service:
  type: ClusterIP
volumes:
  pvc:
    name: db-data
    storageClassName: azurefile
  accessModes:
    - ReadWriteMany
  storage: 2Gi
secrets:
  MysqL_DATABASE:
    name: MysqL_DATABASE
    key: db
  MysqL_ROOT_PASSWORD:
    name: MysqL_ROOT_PASSWORD
    key: password
  MysqL_USER:
    name: MysqL_USER
    key: matomo
  MysqL_PASSWORD:
    name: MysqL_PASSWORD
    key: password  
  keyvaultName: # Fill in key vault name
  backendType: azurekeyvault
  extraSecrets: 
  # - env: MY_SECRET_KEY   // the environment variable
  #   name: my-secret-key  // The name of the secret created inside the cluster
  #   key: my-secret-value // The name of the key vault secret
configMap:
  enabled: false # override if configMap is required
  data: # Fill configuration data in release
  subPath: config.js # filename,may need to override
  mountPath: /usr/share/Nginx/html/config.js # May need to override

mariadb.yaml(发布文件):

apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
Metadata:
  name: mariadb
  namespace: devteam
spec:
  releaseName: mariadb
  chart:
    git: ssh://git@gitlab.it.bsmch.net:222/mitkan/kubernetes.git
    ref: master
    path: charts/mariadb
  values:
    image: mariadb:latest
    name: mariadb
    ingress:
      host: mariadb.aks-test.bsmch.net
    secrets:
      keyvaultName: BASMACH-TEST-DEVTEAM-KV
    deployment:
      extraEnvs:
        - name: MysqL_DATABASE
          value: db
        - name: MysqL_ROOT_PASSWORD
          value: password
        - name: MysqL_USER
          value: matomo
        - name: MysqL_PASSWORD
          value: password

我尝试将图像标签版本更改为 10.4.12 和 10.3.16,但它给了我其他错误

我尝试添加值为“1”的 MysqL_INITDB_SKIP_TZINFO 环境变量,但它甚至无法启动。

如果有人知道我可以做些什么,我将不胜感激。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?