Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Installation] Missing DB after helm deploy. #16

Closed
LaurentDumont opened this issue Apr 13, 2020 · 13 comments
Closed

[Installation] Missing DB after helm deploy. #16

LaurentDumont opened this issue Apr 13, 2020 · 13 comments
Labels
database install Related to installation kind/bug Something isn't working

Comments

@LaurentDumont
Copy link

Describe the bug

  • The DB is missing after a successful Helm install.
  • I'm not sure of it's the root cause, but the UI throws out 500 errors and shows SQL errors in the container logs.

To Reproduce

Steps to reproduce the behavior:

  1. helm upgrade --atomic -i kubevious kubevious/kubevious --version 0.4.24 -n kubevious

image

image

Expected behavior

A clear and concise description of what you expected to happen.

Logs

kubectl get pods -n kubevious                                                                                                                                                                                                                                   
NAME                                READY   STATUS    RESTARTS   AGE
kubevious-5696446b5d-kh4qt          1/1     Running   0          29m
kubevious-mysql-0                   1/1     Running   1          29m
kubevious-parser-5d9f749865-4925d   1/1     Running   0          29m
kubevious-ui-6b56bb7df9-n9krj       1/1     Running   0          29m

Logs from the UI

[2020-04-13 01:49:51.528 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:49:52.531 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:49:53.536 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:49:54.541 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:49:55.548 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:49:56.552 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:49:57.556 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:49:58.559 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:49:59.563 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:00.566 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:01.570 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:02.574 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:03.577 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:04.580 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:05.584 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:06.588 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:07.591 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:08.595 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:09.600 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:10.602 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:11.606 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:12.610 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:13.613 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:14.617 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:15.620 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:16.624 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:17.628 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:18.630 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:19.633 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:20.636 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:21.640 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:22.644 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:23.647 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:24.650 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:25.653 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:26.656 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:27.660 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:28.664 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:29.668 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:30.671 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:31.675 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:50:32.677 +0000] ERROR (MySqlDriver/1 on kubevious-ui-6b56bb7df9-n9krj): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED

Logs from the parser

[2020-04-13 01:50:08.176 +0000] INFO  (Watch/1 on kubevious-parser-5d9f749865-4925d): [_handleChange] HorizontalPodAutoscaler. MODIFIED :: istio-telemetry...
[2020-04-13 01:50:08.199 +0000] INFO  (Watch/1 on kubevious-parser-5d9f749865-4925d): [_handleChange] HorizontalPodAutoscaler. MODIFIED :: gitlab-sidekiq-all-in-1-v1...
[2020-04-13 01:50:08.256 +0000] INFO  (Watch/1 on kubevious-parser-5d9f749865-4925d): [_handleChange] HorizontalPodAutoscaler. MODIFIED :: gitlab-unicorn...
[2020-04-13 01:50:08.368 +0000] ERROR (ReporterTarget/1 on kubevious-parser-5d9f749865-4925d): [request]  Error: Request failed with status code 413
    at createError (/app/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/app/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/app/node_modules/axios/lib/adapters/http.js:236:11)
    at IncomingMessage.emit (events.js:323:22)
    at endReadableNT (_stream_readable.js:1204:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
[2020-04-13 01:50:08.369 +0000] ERROR (ReporterDampener/1 on kubevious-parser-5d9f749865-4925d): [_processJob]  Error: Request failed with status code 413
    at createError (/app/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/app/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/app/node_modules/axios/lib/adapters/http.js:236:11)
    at IncomingMessage.emit (events.js:323:22)
    at endReadableNT (_stream_readable.js:1204:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
[2020-04-13 01:50:08.369 +0000] WARN  (ReporterDampener/1 on kubevious-parser-5d9f749865-4925d): [_tryProcessJob] last job failed
[2020-04-13 01:50:08.370 +0000] INFO  (ReporterDampener/1 on kubevious-parser-5d9f749865-4925d): [_rescheduleProcess]
[2020-04-13 01:50:08.508 +0000] INFO  (Watch/1 on kubevious-parser-5d9f749865-4925d): [_handleChange] ConfigMap. MODIFIED :: controller-leader-election-helper...
[2020-04-13 01:50:08.906 +0000] INFO  (Watch/1 on kubevious-parser-5d9f749865-4925d): [_handleChange] ConfigMap. MODIFIED :: cattle-controllers...
[2020-04-13 01:50:10.141 +0000] INFO  (Watch/1 on kubevious-parser-5d9f749865-4925d): [_handleChange] ConfigMap. MODIFIED :: ingress-controller-leader-nginx...
[2020-04-13 01:50:10.565 +0000] INFO  (Watch/1 on kubevious-parser-5d9f749865-4925d): [_handleChange] ConfigMap. MODIFIED :: controller-leader-election-helper...
[2020-04-13 01:50:10.970 +0000] INFO  (Watch/1 on kubevious-parser-5d9f749865-4925d): [_handleChange] ConfigMap. MODIFIED :: cattle-controllers...
[2020-04-13 01:50:11.115 +0000] INFO  (Watch/1 on kubevious-parser-5d9f749865-4925d): [_handleChange] ConfigMap. MODIFIED :: cert-manager-controller...
[2020-04-13 01:50:11.778 +0000] INFO  (FacadeRegistry/1 on kubevious-parser-5d9f749865-4925d): [_handleConcreteRegistryChange] BEGIN
[2020-04-13 01:50:11.778 +0000] INFO  (LogicProcessor/1 on kubevious-parser-5d9f749865-4925d): [process] BEGIN
[2020-04-13 01:50:11.858 +0000] INFO  (LogicProcessor/1 on kubevious-parser-5d9f749865-4925d): [process] READY
[2020-04-13 01:50:11.859 +0000] INFO  (FacadeRegistry/1 on kubevious-parser-5d9f749865-4925d): [acceptLogicItems] item count: 1334
[2020-04-13 01:50:11.859 +0000] INFO  (FacadeDampener/1 on kubevious-parser-5d9f749865-4925d): [acceptJob] job date: 2020-04-13T01:50:11.859Z. queue size: 1
[2020-04-13 01:50:11.859 +0000] INFO  (FacadeDampener/1 on kubevious-parser-5d9f749865-4925d): [_processJob] BEGIN. Date: 2020-04-13T01:50:11.859Z
[2020-04-13 01:50:11.859 +0000] INFO  (LogicProcessor/1 on kubevious-parser-5d9f749865-4925d): [process] END
[2020-04-13 01:50:11.860 +0000] INFO  (FacadeRegistry/1 on kubevious-parser-5d9f749865-4925d): [_handleConcreteRegistryChange] END
[2020-04-13 01:50:11.860 +0000] INFO  (FacadeRegistry/1 on kubevious-parser-5d9f749865-4925d): [_processItems] Date: 2020-04-13T01:50:11.859Z. item count: 1334
[2020-04-13 01:50:11.860 +0000] INFO  (Reporter/1 on kubevious-parser-5d9f749865-4925d): [acceptLogicItems] item count: 1334
[2020-04-13 01:50:12.293 +0000] INFO  (Reporter/1 on kubevious-parser-5d9f749865-4925d): [acceptLogicItems] obj count: 3298
[2020-04-13 01:50:12.294 +0000] INFO  (ReporterTarget/1 on kubevious-parser-5d9f749865-4925d): [report] date: 2020-04-13T01:50:11.859Z, item count: 3298
[2020-04-13 01:50:12.294 +0000] INFO  (ReporterDampener/1 on kubevious-parser-5d9f749865-4925d): [acceptJob] job date: 2020-04-13T01:50:11.859Z. queue size: 11
[2020-04-13 01:50:12.294 +0000] INFO  (ReporterDampener/1 on kubevious-parser-5d9f749865-4925d): [_processJob] BEGIN. Date: 2020-04-13T01:19:12.811Z
[2020-04-13 01:50:12.295 +0000] INFO  (ReporterTarget/1 on kubevious-parser-5d9f749865-4925d): [_processSnapshot] date: 2020-04-13T01:19:12.811Z, item count: 3299
[2020-04-13 01:50:12.295 +0000] INFO  (ReporterTarget/1 on kubevious-parser-5d9f749865-4925d): [_reportSnapshot] Begin
[2020-04-13 01:50:12.295 +0000] INFO  (SnapshotReporter/1 on kubevious-parser-5d9f749865-4925d): [run] 
[2020-04-13 01:50:12.295 +0000] INFO  (SnapshotReporter/1 on kubevious-parser-5d9f749865-4925d): [_execute]
[2020-04-13 01:50:12.296 +0000] INFO  (SnapshotReporter/1 on kubevious-parser-5d9f749865-4925d): [_reportAsSnapshot]
[2020-04-13 01:50:12.296 +0000] INFO  (SnapshotReporter/1 on kubevious-parser-5d9f749865-4925d): [_createSnapshot]
[2020-04-13 01:50:12.296 +0000] INFO  (FacadeDampener/1 on kubevious-parser-5d9f749865-4925d): [_processJob] END
[2020-04-13 01:50:12.296 +0000] INFO  (FacadeDampener/1 on kubevious-parser-5d9f749865-4925d): [_tryProcessJob] END
[2020-04-13 01:50:12.296 +0000] INFO  (FacadeDampener/1 on kubevious-parser-5d9f749865-4925d): [_tryProcessJob] empty
[2020-04-13 01:50:12.303 +0000] INFO  (SnapshotReporter/1 on kubevious-parser-5d9f749865-4925d): [_createSnapshot] id: 2f8f4ee2-e9ad-43a2-84c9-78146ae65ef4
[2020-04-13 01:50:12.303 +0000] INFO  (SnapshotReporter/1 on kubevious-parser-5d9f749865-4925d): [_publishSnapshotItems]
[2020-04-13 01:50:12.606 +0000] INFO  (Watch/1 on kubevious-parser-5d9f749865-4925d): [_handleChange] ConfigMap. MODIFIED :: controller-leader-election-helper...
[2020-04-13 01:50:13.019 +0000] INFO  (Watch/1 on kubevious-parser-5d9f749865-4925d): [_handleChange] ConfigMap. MODIFIED :: cattle-controllers...


Logs from mysql

kubectl logs kubevious-mysql-0  -n kubevious                                                                                                                                                                                                                    
2020-04-13 01:20:26+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-13 01:20:27+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-04-13 01:20:27+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-13T01:20:28.002382Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2020-04-13T01:20:28.002456Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-04-13T01:20:28.002806Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 1

InnoDB: Progress in percents: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 302020-04-13T01:20:33.443696Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2020-04-13T01:20:33.466591Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
 31 32 33 34 35 36 37 38 39 402020-04-13T01:20:34.059807Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
 41 422020-04-13T01:20:34.101508Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
 43 44 45 462020-04-13T01:20:34.228615Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
 47 48 49 50 51 52 53 54 552020-04-13T01:20:34.445008Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060

Logs from the app

PayloadTooLargeError: request entity too large
    at readStream (/app/node_modules/raw-body/index.js:155:17)
    at getRawBody (/app/node_modules/raw-body/index.js:108:12)
    at read (/app/node_modules/body-parser/lib/read.js:77:3)
    at jsonParser (/app/node_modules/body-parser/lib/types/json.js:135:5)
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
    at /app/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
    at next (/app/node_modules/express/lib/router/index.js:275:10)
    at expressInit (/app/node_modules/express/lib/middleware/init.js:40:5)
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
    at /app/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
    at next (/app/node_modules/express/lib/router/index.js:275:10)
    at query (/app/node_modules/express/lib/middleware/query.js:45:5)
[2020-04-13 01:48:43.886 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:44.890 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:45.894 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:46.898 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:47.901 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:48.904 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:49.906 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:50.910 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:51.914 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:52.918 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:53.922 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:54.925 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:55.927 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:56.931 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED
[2020-04-13 01:48:57.933 +0000] ERROR (MySqlDriver/1 on kubevious-5696446b5d-kh4qt): [_tryConnect] ON ERROR: ER_HOST_NOT_PRIVILEGED

Environment Details:

  • RKE 2.3.3 / Helm 3
  • Chrome 80.0.3987.149
  • Kubevious Helm release 0.4.24
@LaurentDumont
Copy link
Author

After a bit of mucking around, I was able to get the UI to work.

  • I had to manually create the DB inside the mysql container.
  • I had to manually create the schema with the initdb.sql script that was present in the mysql container (but never ran it seems 😢 )
  • I had to allow the root user to login from other network IP + flush privileges.

I'll try to see why the initdb doesn't run.

@rubenhak rubenhak added kind/bug Something isn't working database install Related to installation labels Apr 13, 2020
@rubenhak
Copy link
Collaborator

rubenhak commented Apr 13, 2020

hi @LaurentDumont,
logs from App and Parser are related to some objects being too big. Please try this temporary solution until the version is released in couple of days:

helm repo add kubevious https://helm.kubevious.io
helm upgrade --atomic -i kubevious kubevious/kubevious --version 0.5.1 -n kubevious 

Error 500 is explainable if there is missing DB. Are you upgrading from an earlier version? Seems like mysql crash restarted. Do you have logs from initial launch?

@LaurentDumont
Copy link
Author

I think this was from a clean state. Before manually fixing the issue and letting it run since, I deleted the mysql folder in the pv. It's a bit strange that the mysql container starts up and tries to recover stuff.

Would there be anything else persistent beyond the volume that could play around with the mysql container?

@LaurentDumont
Copy link
Author

LaurentDumont commented Apr 14, 2020

There is something a bit peculiar I saw. I was tailing the logs and it seems that the mysql container "restarts" three times during the helm install process.

Initial logs

kubectl logs kubevious-mysql-0  -n kubevious -f                                                                                                                                                  1216ms  Mon 13 Apr 2020 11:26:40 PM EDT
2020-04-14 03:26:27+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-14 03:26:28+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-04-14 03:26:28+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-14 03:26:28+00:00 [Note] [Entrypoint]: Initializing database files
2020-04-14T03:26:28.394681Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2020-04-14T03:26:28.394705Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-04-14T03:26:28.394871Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.19) initializing of server in progress as process 44
2020-04-14T03:27:08.205053Z 5 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2020-04-14 03:27:31+00:00 [Note] [Entrypoint]: Database files initialized
2020-04-14 03:27:31+00:00 [Note] [Entrypoint]: Starting temporary server
2020-04-14T03:27:32.262156Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2020-04-14T03:27:32.262191Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-04-14T03:27:32.262420Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 267
2020-04-14T03:27:35.488783Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-04-14T03:27:35.570021Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2020-04-14T03:27:35.736483Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server - GPL.
2020-04-14 03:27:35+00:00 [Note] [Entrypoint]: Temporary server started.
2020-04-14T03:27:35.829133Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock'
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.

Logs after a few minutes

2020-04-14 03:28:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-14 03:28:00+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-04-14 03:28:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-14T03:28:00.886794Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2020-04-14T03:28:00.886827Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-04-14T03:28:00.887001Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 1

InnoDB: Progress in percents: 1 2 3 4 5 6 7 8 9 10 112020-04-14T03:28:06.989040Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
 122020-04-14T03:28:07.008363Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
 13 14 15 162020-04-14T03:28:07.282815Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-04-14T03:28:07.331425Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
 172020-04-14T03:28:07.602451Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
 18 19 20 21 222020-04-14T03:28:07.767344Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060

I can see that the PID changed three times to finally settle on 1.

It's a bit strange because inside the volume, I can clearly see some bin files related to the kubevious database.

root@gluster01:/nfs-storage/kubevious/mysql# ls -alh
total 171M
drwsrwsrwt 6  999 root 4.0K Apr 14 03:28 .
drwsrwsrwt 4 root root 4.0K Apr 14 03:26 ..
-rw-r----- 2  999 root   56 Apr 14 03:27 auto.cnf
-rw------- 2  999 root 1.7K Apr 14 03:27 ca-key.pem
-rw-r--r-- 2  999 root 1.1K Apr 14 03:27 ca.pem
-rw-r--r-- 2  999 root 1.1K Apr 14 03:27 client-cert.pem
-rw------- 2  999 root 1.7K Apr 14 03:27 client-key.pem
-rw-r----- 2  999 root 5.4K Apr 14 03:27 ib_buffer_pool
-rw-r----- 2  999 root  12M Apr 14 03:28 ibdata1
-rw-r----- 2  999 root  48M Apr 14 03:28 ib_logfile0
-rw-r----- 2  999 root  48M Apr 14 03:26 ib_logfile1
-rw-r----- 2  999 root  12M Apr 14 03:28 ibtmp1
drwxr-s--- 2  999 root 4.0K Apr 14 03:28 #innodb_temp
-rw-r----- 2  999 root  178 Apr 14 03:27 kubevious-mysql-0-bin.000001
-rw-r----- 2  999 root  911 Apr 14 03:28 kubevious-mysql-0-bin.000002
-rw-r----- 2  999 root  155 Apr 14 03:28 kubevious-mysql-0-bin.000003
-rw-r----- 2  999 root   93 Apr 14 03:28 kubevious-mysql-0-bin.index
drwxr-s--- 2  999 root 4.0K Apr 14 03:27 mysql
-rw-r----- 2  999 root  28M Apr 14 03:28 mysql.ibd
drwxr-s--- 2  999 root 4.0K Apr 14 03:27 performance_schema
-rw------- 2  999 root 1.7K Apr 14 03:27 private_key.pem
-rw-r--r-- 2  999 root  452 Apr 14 03:27 public_key.pem
-rw-r--r-- 2  999 root 1.1K Apr 14 03:27 server-cert.pem
-rw------- 2  999 root 1.7K Apr 14 03:27 server-key.pem
drwxr-s--- 2  999 root 4.0K Apr 14 03:27 sys
-rw-r----- 2  999 root  12M Apr 14 03:28 undo_001
-rw-r----- 2  999 root  10M Apr 14 03:28 undo_002

@LaurentDumont
Copy link
Author

I do believe this might be related to POSIX permissions on the volume? It's a gluster volume without any specific UID set.

2020-04-15 05:06:31+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-15 05:06:34+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-04-15 05:06:34+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-15 05:06:34+00:00 [Note] [Entrypoint]: Initializing database files
2020-04-15T05:06:34.583235Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2020-04-15T05:06:34.583264Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-04-15T05:06:34.583446Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.19) initializing of server in progress as process 43
2020-04-15T05:07:19.800141Z 5 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2020-04-15 05:07:46+00:00 [Note] [Entrypoint]: Database files initialized
2020-04-15 05:07:46+00:00 [Note] [Entrypoint]: Starting temporary server
2020-04-15T05:07:46.569177Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2020-04-15T05:07:46.569214Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-04-15T05:07:46.569433Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 289
2020-04-15T05:07:51.802625Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-04-15T05:07:51.899527Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2020-04-15T05:07:52.128330Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server - GPL.
2020-04-15 05:07:52+00:00 [Note] [Entrypoint]: Temporary server started.
2020-04-15T05:07:52.309720Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock'

#################### MYSQL CONTAINER CRASH AND RESTARTS ####################

This starts the XA crash recovery process

2020-04-15 05:07:57+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-15 05:07:57+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-04-15 05:07:57+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-15T05:07:58.435383Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2020-04-15T05:07:58.435422Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-04-15T05:07:58.435629Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 1

InnoDB: Progress in percents: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 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 1002020-04-15T05:08:02.733315Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2020-04-15T05:08:02.753132Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2020-04-15T05:08:03.292784Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-04-15T05:08:03.354224Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2020-04-15T05:08:03.455339Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
2020-04-15T05:08:03.534051Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060

What is the expected permissions + user/group for the volume?

@rubenhak
Copy link
Collaborator

@LaurentDumont, I think mysql is running as root, and it needs 700 permissions for /var/lib/mysql which is mounted to pvc. If it was caused by invalid permissions, how would the server recover on its own after 3rd restart?

I was googling around for solution and came across an issue request. Then after reading through realized it was you :)
docker-library/mysql#658

@LaurentDumont
Copy link
Author

Not too sure why it works after the crash :(

This is what a succesful database init and deployment looks like. It works if I change the volume type to HostPath instead of the Gluster server I'm using.

2020-04-15 04:20:37+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-15 04:20:37+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-04-15 04:20:38+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-15 04:20:38+00:00 [Note] [Entrypoint]: Initializing database files
2020-04-15T04:20:38.436269Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2020-04-15T04:20:38.436332Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-04-15T04:20:38.436503Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.19) initializing of server in progress as process 44
2020-04-15T04:21:00.294658Z 5 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2020-04-15 04:21:27+00:00 [Note] [Entrypoint]: Database files initialized
2020-04-15 04:21:27+00:00 [Note] [Entrypoint]: Starting temporary server
2020-04-15T04:21:27.777917Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2020-04-15T04:21:27.777958Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-04-15T04:21:27.778230Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 223
2020-04-15T04:21:30.316607Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-04-15T04:21:30.342348Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2020-04-15T04:21:30.457702Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server - GPL.
2020-04-15 04:21:30+00:00 [Note] [Entrypoint]: Temporary server started.
2020-04-15T04:21:30.849204Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock'
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.

2020-04-15 04:21:44+00:00 [Note] [Entrypoint]: Creating database kubevious
2020-04-15 04:21:44+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/initdb.sql

2020-04-15 04:21:48+00:00 [Note] [Entrypoint]: Stopping temporary server
2020-04-15T04:21:48.549128Z 14 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.19).
2020-04-15T04:21:52.646380Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19)  MySQL Community Server - GPL.
2020-04-15 04:21:53+00:00 [Note] [Entrypoint]: Temporary server stopped

2020-04-15 04:21:53+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.

2020-04-15T04:21:53.957563Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2020-04-15T04:21:53.957599Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-04-15T04:21:53.957792Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 1
2020-04-15T04:21:57.163962Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-04-15T04:21:57.253137Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2020-04-15T04:21:57.302262Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
2020-04-15T04:21:57.342536Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
  • We see the temporary server getting created.
  • The database is created.
  • The init sql is then ran to add the tables.

So it's probably something specific to my setup. I think we can close the issue and I'll dig around a bit more :)

@rubenhak
Copy link
Collaborator

This is a little bit hard to debug considering specifics of each environment. I'll be in the loop at the docker-lib/mysql in case they have additional questions.

Could you show exactly what you changed to make this work? I can expose the variable for a better control.

@LaurentDumont
Copy link
Author

Just the volume type.

"Production" is using Gluster volumes as PV for Kubernetes. Just to test, I tried using HostPath (which binds a local path on the Kubernetes node to the container running on it ) and it allowed the mysql init to proceed correctly.

@rubenhak
Copy link
Collaborator

Did you do that by changing the storage class or by completely replacing the volumeClaimTemplate with a volume?

@LaurentDumont
Copy link
Author

Alright, I posted in the SQL issue but it looks like the root cause was the Liveness probe that went over threshold on my setup. It worked with the local storage, probably because the performances we're better?

I don't think it's anything specifically related to the Helm values. If anything, maybe the Liveness probe initial delay could be increased. I've increased mine to 180 seconds (but the actual init process is much quicker - maybe around 50-70 seconds)

docker-library/mysql#658 (comment)

I'll close this, thank you everyone!

@rubenhak
Copy link
Collaborator

@LaurentDumont, That was quick to root cause. The timeout can be increased and even made editable, but I'm afraid that with such slow storage everything else would run super slow. There is quite a lot of stuff store in the database to make the time machine feature possible.

@kubevious
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database install Related to installation kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants