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

[Bug]: Crash upon start #3419

Closed
goldmund256 opened this issue Sep 14, 2024 · 5 comments
Closed

[Bug]: Crash upon start #3419

goldmund256 opened this issue Sep 14, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@goldmund256
Copy link

What happened?

I can't get the ABS server to run after the last update to v2.13.4. It runs on Arch Linux, installed through the AUR. See the systemd log below.

I can confirm that both ffmpeg and ffprobe have been updated to the latest version. Also, /usr/bin/ffmpeg is not a symlink.

What did you expect to happen?

I expected the server to start

Steps to reproduce the issue

Start the ABS server via systemd

Audiobookshelf version

v2.13.4

How are you running audiobookshelf?

Built from source

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs

Sep 14 16:22:26 ser systemd[1]: Started Self-hosted audiobook server for managing and playing audiobooks.
Sep 14 16:22:27 ser audiobookshelf[10512]: production Config /var/lib/audiobookshelf/config /var/lib/audiobookshelf/metadata
Sep 14 16:22:27 ser audiobookshelf[10512]: [2024-09-14 16:22:27.047] INFO: === Starting Server ===
Sep 14 16:22:27 ser audiobookshelf[10512]: [2024-09-14 16:22:27.049] INFO: [Server] Init v2.13.4
Sep 14 16:22:27 ser audiobookshelf[10512]: [2024-09-14 16:22:27.049] INFO: [Server] Node.js Version: v20.17.0
Sep 14 16:22:27 ser audiobookshelf[10512]: [2024-09-14 16:22:27.049] INFO: [Server] Platform: linux
Sep 14 16:22:27 ser audiobookshelf[10512]: [2024-09-14 16:22:27.049] INFO: [Server] Arch: x64
Sep 14 16:22:27 ser audiobookshelf[10512]: [2024-09-14 16:22:27.409] INFO: [BinaryManager] ffmpeg not found or version too old
Sep 14 16:22:27 ser audiobookshelf[10512]: [2024-09-14 16:22:27.759] INFO: [BinaryManager] ffprobe not found or version too old
Sep 14 16:22:27 ser audiobookshelf[10512]: [2024-09-14 16:22:27.765] FATAL: [Server] Unhandled rejection: Error: EACCES: permission denied, unlink '/usr/bin/ffmpeg', promise: Promise {
Sep 14 16:22:27 ser audiobookshelf[10512]:   <rejected> [Error: EACCES: permission denied, unlink '/usr/bin/ffmpeg'] {
Sep 14 16:22:27 ser audiobookshelf[10512]:     errno: -13,
Sep 14 16:22:27 ser audiobookshelf[10512]:     code: 'EACCES',
Sep 14 16:22:27 ser audiobookshelf[10512]:     syscall: 'unlink',
Sep 14 16:22:27 ser audiobookshelf[10512]:     path: '/usr/bin/ffmpeg'
Sep 14 16:22:27 ser audiobookshelf[10512]:   }
Sep 14 16:22:27 ser audiobookshelf[10512]: } (    at process.<anonymous> (/snapshot/audiobookshelf/server/Server.js))
Sep 14 16:22:27 ser systemd[1]: audiobookshelf.service: Main process exited, code=exited, status=1/FAILURE
Sep 14 16:22:27 ser systemd[1]: audiobookshelf.service: Failed with result 'exit-code'.
Sep 14 16:22:27 ser systemd[1]: audiobookshelf.service: Consumed 1.978s CPU time, 106.5M memory peak.
Sep 14 16:22:28 ser systemd[1]: audiobookshelf.service: Scheduled restart job, restart counter is at 15.
Sep 14 16:22:28 ser systemd[1]: audiobookshelf.service: Start request repeated too quickly.
Sep 14 16:22:28 ser systemd[1]: audiobookshelf.service: Failed with result 'exit-code'.
Sep 14 16:22:28 ser systemd[1]: Failed to start Self-hosted audiobook server for managing and playing audiobooks.

Additional Notes

No response

@goldmund256 goldmund256 added the bug Something isn't working label Sep 14, 2024
@mikiher
Copy link
Contributor

mikiher commented Sep 18, 2024

It looks like BinaryManager is not happy with the version of /usr/bin/ffmpeg and then tries to delete it (unlink is just like rm - it has nothing to do with symbolic links). That should not happen - I'll investigate.

A couple of questions:

  • Can you let me know what exactly is the version of the installed /usr/bin/ffmpeg?
  • Also, you said "both ffmpeg and ffprobe have been updated to the latest version". By whom (by which software) were they updated?

@goldmund256
Copy link
Author

Thanks for your reply.

The ffmpeg version is 7.0.2. I use pacman to update all software which is a standard package manager for Arch Linux.

@mikiher
Copy link
Contributor

mikiher commented Sep 19, 2024

OK, and can you please paste here the contents of this file: /etc/conf.d/audiobookshelf?

Specifically, I'm interested in the value of SKIP_BINARIES_CHECK, (which should be 1 in the latest version, according to this)

From the log you attached, it seems that SKIP_BINARIES_CHECK is either unset or not set to 1.

@goldmund256
Copy link
Author

goldmund256 commented Sep 19, 2024

My /etc/conf.d/audiobookshelf was:

METADATA_PATH=/var/lib/audiobookshelf/metadata
CONFIG_PATH=/var/lib/audiobookshelf/config
FFMPEG_PATH=/usr/bin/ffmpeg
FFPROBE_PATH=/usr/bin/ffprobe
TONE_PATH=/usr/bin/tone
PORT=3333
HOST=0.0.0.0

So, just as you assumed, SKIP_BINARIES_CHECK was for some reason unset.

I added SKIP_BINARIES_CHECK=1 and it solved the issue. Thank you!

@mikiher
Copy link
Contributor

mikiher commented Sep 19, 2024

So just as a sidenote (unrelated to Audiobookshelf), if you have indeed installed the latest AUR version of audiobookshelf, /etc/conf.d/audiobookshelf should have been overriden by the installer - the settings you have are from an older version (e.g. TONE_PATH is not required anymore, and /usr/bin/tone doesn't need to be installed).

This means that the update to the newest Audiobookshelf AUR version didn't work as it was intended to. You should probably check why (again, this is an AUR issue, not an Audiobookshelf issue)

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

No branches or pull requests

2 participants