Komga stopped with error

Hello together,
got new problem’s with komga …
it runs a long time without big errors (often a reboot solved little ones) but now it doesn’t works anymore an stopped with an error

root@pinas:~# systemctl status komga.service
● komga.service - Komga (DietPi)
     Loaded: loaded (/etc/systemd/system/komga.service; disabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/komga.service.d
             └─dietpi-services_edit.conf
     Active: failed (Result: exit-code) since Sat 2023-03-25 12:31:13 CET; 2min 20s ago
    Process: 22016 ExecStart=/usr/bin/java -Xmx379m -jar komga.jar (code=exited, status=1/FAILURE)
   Main PID: 22016 (code=exited, status=1/FAILURE)
        CPU: 36.529s

Mar 25 12:31:13 pinas Komga[22016]:         ... 124 common frames omitted
Mar 25 12:31:13 pinas Komga[22016]: Caused by: java.lang.Exception: No native library found for os.name=Linux, os.arch=aarch64, paths=[/org/sqlite/native/Linux/aarch64:/usr/java/packages/lib:/usr/lib/arm-linux-gnueabihf/jni:/lib/arm-linux-gnueabihf:/usr/lib/arm-linux-gnueabihf:/usr/lib/jni:/lib:/usr/lib]
Mar 25 12:31:13 pinas Komga[22016]:         at org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(SQLiteJDBCLoader.java:375) ~[sqlite-jdbc-3.40.1.0.jar!/:na]
Mar 25 12:31:13 pinas Komga[22016]:         at org.sqlite.SQLiteJDBCLoader.initialize(SQLiteJDBCLoader.java:68) ~[sqlite-jdbc-3.40.1.0.jar!/:na]
Mar 25 12:31:13 pinas Komga[22016]:         at org.sqlite.core.NativeDB.load(NativeDB.java:67) ~[sqlite-jdbc-3.40.1.0.jar!/:na]
Mar 25 12:31:13 pinas Komga[22016]:         at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:278) ~[sqlite-jdbc-3.40.1.0.jar!/:na]
Mar 25 12:31:13 pinas Komga[22016]:         ... 136 common frames omitted
Mar 25 12:31:13 pinas systemd[1]: komga.service: Main process exited, code=exited, status=1/FAILURE
Mar 25 12:31:13 pinas systemd[1]: komga.service: Failed with result 'exit-code'.
Mar 25 12:31:13 pinas systemd[1]: komga.service: Consumed 36.529s CPU time.

I’ve also increased the memory (normally it runs with 1024M) … same error :frowning:

any idea, what I can do?

Creating a bug report/issue

Required Information

  • DietPi version:
    G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=15
    G_DIETPI_VERSION_RC=2
  • Distro version: bullseye 1
  • Kernel version:
    Linux pinas 6.1.19-v8+ #1637 SMP PREEMPT Tue Mar 14 11:11:47 GMT 2023 aarch64 GNU/Linux
  • SBC model: RPi 4 Model B (aarch64)
  • Power supply used: Original RPi4 Powersupply

Additional Information (if applicable)

  • Software title: Komga
  • Was the software title installed freshly or updated/migrated?: fresh install
  • Can this issue be replicated on a fresh installation of DietPi? don’t know

Steps to reproduce

  1. restart komga service

Expected behaviour

komga run without errors

Actual behaviour

komga stopped with errors

Extra details

What was the last thing you did before trying to restart Komga? And did it work after the last reboot (i.e. with the kernel upgrade)?

Looks like it misses some SQLite library, which was actually expected to be integrated. But to be sure, please show the full log:

journalctl -u komga

What was the last thing you did before trying to restart Komga? And did it work after the last reboot (i.e. with the kernel upgrade)?

recently: uploaded new pdf-files to komga file storage
yesterday or later: apt upgrade … yes there was a kernel-update include (some days ago)

journalctl -u komga

is too big …
komga_log.txt (84.1 KB)

There is something wrong with the embedded library:

Mar 25 14:14:32 pinas Komga[1108]: OpenJDK Client VM warning: You have loaded library /tmp/sqlite-3.40.1.0-d7f867f1-22a8-470e-96bc-6cd28c8a0d73-libsqlitejdbc.so which might have disabled stack guard. The VM will try to fix the stack guard now.
Mar 25 14:14:32 pinas Komga[1108]: It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Mar 25 14:14:32 pinas Komga[1108]: Failed to load native library:sqlite-3.40.1.0-d7f867f1-22a8-470e-96bc-6cd28c8a0d73-libsqlitejdbc.so. osinfo: Linux/aarch64
Mar 25 14:14:32 pinas Komga[1108]: java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.40.1.0-d7f867f1-22a8-470e-96bc-6cd28c8a0d73-libsqlitejdbc.so: /tmp/sqlite-3.40.1.0-d7f867f1-22a8-470e-96bc-6cd28c8a0d73-libsqlitejdbc.so: wrong ELF class: ELFCLASS64 (Possible cause: can't load AARCH64 .so on a ARM platform)

Ah, now I see the problem: You enabled 64-bit kernel mode on a Raspbian userland. Strangely we had another case of this, so probably it is actually a bug in the RPi bootloader loading the 64-bit kernel in some circumstances even that it is not configured to do so. Is there a line arm_64bit=1 in your /boot/config.txt? If so, remove it, reboot and reinstall Komga:

dietpi-software reinstall 179

yeah for real 64bt support, better to use a 64bit image and not a 32bit where just the kernel flag is activated to simulate 64bit.

no, nothing there :frowning:

I’ve just do this before

OK, that means, I’ll setup anything new …

Can you try to add a line arm_64bit=0 to your /boot/config.txt?

Also please show the output of:

ls -l /boot
vcgencmd get_config int
uname -a

As a simple workaround you can btw download the 32-bit version of Komga manually, so in any case no need to start over.

done … komga stopped with another error

root@pinas:~# systemctl status komga.service
● komga.service - Komga (DietPi)
     Loaded: loaded (/etc/systemd/system/komga.service; disabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/komga.service.d
             └─dietpi-services_edit.conf
     Active: active (running) since Sat 2023-03-25 15:03:15 CET; 1min 6s ago
   Main PID: 1477 (java)
      Tasks: 26 (limit: 4454)
        CPU: 1min 3.772s
     CGroup: /system.slice/komga.service
             └─1477 /usr/bin/java -Xmx379m -jar komga.jar

Mar 25 15:03:22 pinas Komga[1477]: |    |/ _|____   _____    _________
Mar 25 15:03:22 pinas Komga[1477]: |      < /  _ \ /     \  / ___\__  \
Mar 25 15:03:22 pinas Komga[1477]: |    |  (  <_> )  Y Y  \/ /_/  > __ \_
Mar 25 15:03:22 pinas Komga[1477]: |____|__ \____/|__|_|  /\___  (____  /
Mar 25 15:03:22 pinas Komga[1477]:         \/           \//_____/     \/
Mar 25 15:03:22 pinas Komga[1477]: Version: 0.165.0
Mar 25 15:03:55 pinas Komga[1477]: 2023-03-25 15:03:55.428  WARN 1477 --- [           main] org.apache.activemq.artemis.core.server  : AMQ222038: Starting paging on address 'domain.events'; size is currently: 0 bytes; max-size-bytes: -1; global-size-bytes: 0
Mar 25 15:03:55 pinas Komga[1477]: 2023-03-25 15:03:55.456  WARN 1477 --- [           main] org.apache.activemq.artemis.core.server  : AMQ222038: Starting paging on address 'DLQ'; size is currently: 0 bytes; max-size-bytes: -1; global-size-bytes: 0
Mar 25 15:03:55 pinas Komga[1477]: 2023-03-25 15:03:55.603  WARN 1477 --- [           main] org.apache.activemq.artemis.core.server  : AMQ222038: Starting paging on address 'domain.events'; size is currently: 0 bytes; max-size-bytes: -1; global-size-bytes: 0
Mar 25 15:03:55 pinas Komga[1477]: 2023-03-25 15:03:55.609  WARN 1477 --- [           main] org.apache.activemq.artemis.core.server  : AMQ222038: Starting paging on address 'DLQ'; size is currently: 0 bytes; max-size-bytes: -1; global-size-bytes: 0
root@pinas:~# systemctl status komga.service
● komga.service - Komga (DietPi)
     Loaded: loaded (/etc/systemd/system/komga.service; disabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/komga.service.d
             └─dietpi-services_edit.conf
     Active: failed (Result: exit-code) since Sat 2023-03-25 15:04:48 CET; 4s ago
    Process: 1477 ExecStart=/usr/bin/java -Xmx379m -jar komga.jar (code=exited, status=1/FAILURE)
   Main PID: 1477 (code=exited, status=1/FAILURE)
        CPU: 1min 32.819s

Mar 25 15:04:48 pinas Komga[1477]:  java.base@17.0.6/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1672)
Mar 25 15:04:48 pinas Komga[1477]:  java.base@17.0.6/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
Mar 25 15:04:48 pinas Komga[1477]:  java.base@17.0.6/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
Mar 25 15:04:48 pinas Komga[1477]:  java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
Mar 25 15:04:48 pinas Komga[1477]:  java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1122)
Mar 25 15:04:48 pinas Komga[1477]:  java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
Mar 25 15:04:48 pinas Komga[1477]:  java.base@17.0.6/java.lang.Thread.run(Thread.java:833)
Mar 25 15:04:48 pinas systemd[1]: komga.service: Main process exited, code=exited, status=1/FAILURE
Mar 25 15:04:48 pinas systemd[1]: komga.service: Failed with result 'exit-code'.
Mar 25 15:04:48 pinas systemd[1]: komga.service: Consumed 1min 32.819s CPU time.

ls-boot.txt (3.4 KB)

without adding arm_64bit=0

root@pinas:/mnt# vcgencmd get_config int
arm_64bit=1
arm_freq=1500
audio_pwm_mode=514
camera_auto_detect=-1
config_hdmi_boost=5
core_freq=500
core_freq_min=200
disable_commandline_tags=2
disable_l2cache=1
disable_overscan=1
disable_splash=1
display_lcd_rotate=-1
dvfs=3
enable_gic=1
force_eeprom_read=1
force_pwm_open=1
framebuffer_depth=16
framebuffer_ignore_alpha=1
framebuffer_swap=1
gpu_freq=500
gpu_freq_min=250
init_uart_clock=0x2dc6c00
initial_turbo=20
lcd_framerate=60
max_framebuffers=-1
over_voltage_avs=-23750
pause_burst_frames=1
program_serial_random=1
temp_limit=75
total_mem=2048
hdmi_force_cec_address:0=65535
hdmi_force_cec_address:1=65535
hdmi_pixel_freq_limit:0=0x11e1a300
hdmi_pixel_freq_limit:1=0x11e1a300

with adding arm_64bit=0

root@pinas:~# vcgencmd get_config int
arm_freq=1500
audio_pwm_mode=514
camera_auto_detect=-1
config_hdmi_boost=5
core_freq=500
core_freq_min=200
disable_commandline_tags=2
disable_l2cache=1
disable_overscan=1
disable_splash=1
display_lcd_rotate=-1
dvfs=3
enable_gic=1
force_eeprom_read=1
force_pwm_open=1
framebuffer_depth=16
framebuffer_ignore_alpha=1
framebuffer_swap=1
gpu_freq=500
gpu_freq_min=250
init_uart_clock=0x2dc6c00
initial_turbo=20
lcd_framerate=60
max_framebuffers=-1
over_voltage_avs=-23750
pause_burst_frames=1
program_serial_random=1
temp_limit=75
total_mem=2048
hdmi_force_cec_address:0=65535
hdmi_force_cec_address:1=65535
hdmi_pixel_freq_limit:0=0x11e1a300
hdmi_pixel_freq_limit:1=0x11e1a300
Linux pinas 6.1.19-v8+ #1637 SMP PREEMPT Tue Mar 14 11:11:47 GMT 2023 aarch64 GNU/Linux

OK, I’ll try this

would it be possible to share some more information

dpkg --print-architecture
cat /etc/os-release

I thing, this helped me … after add some more RAM (s. https://dietpi.com/forum/t/komga-needs-more-ram/5469/4 … it seems to work.

thx a lot

The vcgencmd output indeed indicates that arm_64bit=1 was set by default and hence setting it to 0 explicitly needed. I wonder whether this is a bug or an explicit/intended change on e.g. RPi 4, which would be very troublesome.

yes, shure

root@pinas:~# dpkg --print-architecture
armhf
root@pinas:~# cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

hint: I’ve updated from buster to bullseye with the update script from the blog https://dietpi.com/blog/?p=811

Indeed intended, and highly problematic! Moving Linux Kernel to 6.1 - Page 11 - Raspberry Pi Forums

1 Like

Ok means we need to disable actively on all 32bit systems.

On RPi 4 only it seems. If I understand it correctly, for RPi 3 this was reverted already as it caused issues: RPI 3B+ doesn't boot with latest firmware · Issue #1792 · raspberrypi/firmware · GitHub

But year, to maintain SD card exchangeability it makes sense to simply set it explicitly in all cases. In the meantime, I posted on the RPi forum as well, asking to revert it as it breaks relying on uname -m and as it doesn’t make any sense to run a 32-bit OS with 64-bit kernel. Let’s see whether/what the reaction is.

1 Like

I decided to instead patch dietpi-software to support this case: DietPi-Software | Support Raspberry Pi with 64-bit kernel on 32-bit OS by MichaIng · Pull Request #6274 · MichaIng/DietPi · GitHub
Also a live patch has been merged which you should offered to all RPi 4 users with 32-bit userland.