bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
9.03k stars 9.22k forks source link

mediawiki pod gets in to crashloopbackoff #8341

Closed Sai05091990 closed 2 years ago

Sai05091990 commented 2 years ago

Which chart:

Mediawiki version 12.4.4

Describe the bug

It was simple deployment of mediwiki/mariadb using helm chart, the deployment is configured using gitlab pipeline. Mariadb pod is up and running and ready for accepting connections as below but the Mediawiki pod is not working.

│ mariadb 12:27:00.42 INFO  ==> Initializing mariadb database                                                                                    │
│ mariadb 12:27:00.44 WARN  ==> The mariadb configuration file '/opt/bitnami/mariadb/conf/my.cnf' is not writable. Configurations based on envir │
│ mariadb 12:27:00.44 INFO  ==> Installing database                                                                                              │
│ mariadb 12:27:02.30 INFO  ==> Starting mariadb in background                                                                                   │
│ mariadb 12:27:04.33 INFO  ==> Configuring authentication                                                                                       │
│ mariadb 12:27:04.49 INFO  ==> Running mysql_upgrade                                                                                            │
│ mariadb 12:27:06.93 INFO  ==> Stopping mariadb                                                                                                 │
│ mariadb 12:27:07.95 INFO  ==> ** MariaDB setup finished! **                                                                                    │
│ mariadb 12:27:07.98 INFO  ==> ** Starting MariaDB **                                                                                           │
│ 2021-12-08 12:27:08 0 [Note] /opt/bitnami/mariadb/sbin/mysqld (mysqld 10.5.13-MariaDB) starting as process 1 ...                               │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: Uses event mutexes                                                                                        │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: Compressed tables use zlib 1.2.11                                                                         │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: Number of pools: 1                                                                                        │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions                                                                      │
│ 2021-12-08 12:27:08 0 [Note] mysqld: O_TMPFILE is not supported on /opt/bitnami/mariadb/tmp (disabling future attempts)                        │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: Using Linux native AIO                                                                                    │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728                                  │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: Completed initialization of buffer pool                                                                   │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: 128 rollback segments are active.                                                                         │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: Creating shared tablespace for temporary tables                                                           │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...                  │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.                                                                        │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: 10.5.13 started; log sequence number 45106; transaction id 20                                             │
│ 2021-12-08 12:27:08 0 [Note] Plugin 'FEEDBACK' is disabled.                                                                                    │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: Loading buffer pool(s) from /bitnami/mariadb/data/ib_buffer_pool                                          │
│ 2021-12-08 12:27:08 0 [Note] InnoDB: Buffer pool(s) load completed at 211208 12:27:08                                                          │
│ 2021-12-08 12:27:08 0 [Note] Server socket created on IP: '0.0.0.0'.                                                                           │
│ 2021-12-08 12:27:08 0 [Warning] 'proxies_priv' entry '@% root@mediawiki-mariadb-0' ignored in --skip-name-resolve mode.                        │
│ 2021-12-08 12:27:08 0 [Note] Reading of all Master_info entries succeeded                                                                      │
│ 2021-12-08 12:27:08 0 [Note] Added new Master_info '' to hash table                                                                            │
│ 2021-12-08 12:27:08 0 [Note] /opt/bitnami/mariadb/sbin/mysqld: ready for connections.                                                          │
│ Version: '10.5.13-MariaDB'  socket: '/opt/bitnami/mariadb/tmp/mysql.sock'  port: 3306  Source distribution 

Mediawiki pod is going in to crashloopbackoff , due to below error from pod logs:

mediawiki 12:30:36.44                                                                                                                          │
│ mediawiki 12:30:36.45 Welcome to the Bitnami mediawiki container                                                                               │
│ mediawiki 12:30:36.45 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-mediawiki                             │
│ mediawiki 12:30:36.45 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-mediawiki/issues                         │
│ mediawiki 12:30:36.45                                                                                                                          │
│ mediawiki 12:30:36.46 INFO  ==> ** Starting MediaWiki setup **                                                                                 │
│ realpath: /bitnami/apache/conf: No such file or directory                                                                                      │
│ mediawiki 12:30:36.51 INFO  ==> Configuring PHP options                                                                                        │
│ mediawiki 12:30:36.53 INFO  ==> Validating settings in MYSQL_CLIENT_* env vars                                                                 │
│ mediawiki 12:30:36.57 WARN  ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes. For safety reasons, do not use this flag in a produ │
│ mediawiki 12:30:36.64 INFO  ==> Configuring file permissions for MediaWiki                                                                     │
│ mediawiki 12:30:36.64 INFO  ==> Trying to connect to the database server                                                                       │
│ mediawiki 12:30:36.67 INFO  ==> Running MediaWiki install script 

after a threshold, the pod log error shows with localsettings.php is not found and maybe the installation of mediawiki plugins are not happening with in time and goes in to crash, we have tried adding more timeout and it resolved but when we add extra params in the values.yml it doesn't work

Sai05091990 commented 2 years ago

instead of using values.yml file, i tried to pass parameters using --set then also the pod crashes.

helm upgrade --install -n ${KUBE_NAMESPACE} mediawiki bitnami/mediawiki --set mediawikiUser=admin,mediawikiPassword=password,mariadb.mariadbRootPassword=password,mediawikiHost=${APP_HOSTNAME},readinessProbe.failureThreshold=20

If i install using below command, then there is no crash in the pod, not sure how can i customize the parameters without values.yml or --set option as these ways are giving crash errors.

helm upgrade --install -n ${KUBE_NAMESPACE} mediawiki bitnami/mediawiki 
juan131 commented 2 years ago

Hi @Sai05091990

I think the problem is that you're setting mediawikiPassword=password which doesn't comply with the minimal length for Mediawiki password, see:

Could you try uninstalling your chart and installing it again with a longer password? Please don't forget to remove the existing PVC(s) to avoid the new installation to reuse the all data (find more info about this in our Troubleshooting Guideline).

Sai05091990 commented 2 years ago

Thanks Juan for the pointing that, i somehow missed that min length requirement and trying with normal password and doing deployments.

deployed again with minimum length password and boom it worked.

Appreciate your help.

Closing this issue now !!