question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[K8s] 1.6.0: Container crashes after trying to update the sql scheme

See original GitHub issue

Describe the bug A clear and concise description of what the bug is.

To Reproduce

Upgrade from 1.5.3 to 1.6.0. This runs with the docker image, in Kubernetes. Container starts, logs the following, crashes, and restarts, with the same log again. Reverting back to 1.5.3, container starts properly again (see second log)

Expected behavior DB Upgrades suscceed and application starts.

Info

  • Uptime Kuma Version: 1.6.0
  • Using Docker?: Yes
  • OS: Linux, Kubernetes (K3OS)
  • Browser: n/a

Error Log

With 1.6.0:

Welcome to Uptime Kuma
Node Env: undefined
Importing Node libraries
Importing 3rd-party libraries
Importing this project modules
Prepare Notification Providers
Version: 1.6.0
Data Dir: ./data/
Creating express and socket.io instance
Server Type: HTTP
Connecting to Database
SQLite config:
[ { journal_mode: 'wal' } ]
[ { cache_size: -12000 } ]
Connected
Your database version: 9
Latest database version: 9
Database no need to patch
Database Patch 2.0 Process
patch-setting-value-type.sql is not patched
Backup the db
patch-setting-value-type.sql is patching
Shutdown requested
Called signal: SIGTERM
Stopping all monitors
Trace: Error [ERR_SERVER_NOT_RUNNING]: Server is not running.
    at Server.close (net.js:1608:12)
    at Object.onceWrapper (events.js:519:28)
    at Server.emit (events.js:412:35)
    at emitCloseNT (net.js:1661:8)
    at processTicksAndRejections (internal/process/task_queues.js:81:21) {
  code: 'ERR_SERVER_NOT_RUNNING'
}
    at process.<anonymous> (/app/server/server.js:973:13)
    at process.emit (events.js:400:28)
    at processPromiseRejections (internal/process/promises.js:245:33)
    at processTicksAndRejections (internal/process/task_queues.js:96:32)
If you keep encountering errors, please report to https://github.com/louislam/uptime-kuma/issues
patch-setting-value-type.sql is patched successfully
patch-improve-performance.sql is not patched
patch-improve-performance.sql is patching
Closing DB

Reverting back to 1.5.3

Welcome to Uptime Kuma
Node Env: undefined
Importing Node libraries
Importing 3rd-party libraries
Importing this project modules
Version: 1.5.3
Data Dir: ./data/
Creating express and socket.io instance
Server Type: HTTP
Connecting to Database
[ { journal_mode: 'wal' } ]
Connected
Your database version: 9
Latest database version: 8
Warning: Database version is newer than expected
Load JWT secret from database.
Adding route
Adding socket handler
Init the server
Listening on 3001
Latest Version: 1.6.0
Monitor #3 ....

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
gabycommented, Sep 10, 2021

@louislam To get start-period in kubernetes it would need to be the following way:

livenessProbe:
  exec:
    command:
    - node
    - extra/healthcheck.js
  initialDelaySeconds: 180
  periodSeconds: 60
  timeoutSeconds: 30

Source: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/

0reactions
louislamcommented, Sep 10, 2021

@louislam Looks good to me! Future update would be to add configuration to the Readiness Probe. I can take a look at it this weekend.

I have no experience with K8s. Any K8s changes need one more reviewer to test, verify and confirm before merge.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dashboard 1.6.3 crashes frequently on kube 1.7.2 #2230
2 and my dashboard to 1.6.3, just browsing around the dashboard I can get it to crash very easily, with the below error...
Read more >
My kubernetes pods keep crashing with "CrashLoopBackOff ...
It is only Kubernetes that wants a running app. Update (an example):. Here's how to avoid CrashLoopBackOff, when launching a Netshoot container:
Read more >
Understanding Kubernetes CrashLoopBackoff Events
CrashLoopBackOff is a status message that indicates one of your pods is in a constant state of flux—one or more containers are failing...
Read more >
VMware SQL with Postgres for Kubernetes Documentation
This release allows instance backups to be synchronized in two different namespaces or. Kubernetes clusters. This feature allows users to restore to a...
Read more >
Percona Kubernetes Operator for Percona XtraDB Cluster 1.7.0
K8SPXC-564: PXC cluster will now recover automatically from a full crash when Pods are stuck in CrashLoopBackOff status.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found