Bug 276280 - net-p2p/bazarr: fails silently on start
Summary: net-p2p/bazarr: fails silently on start
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dries Michiels
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2024-01-12 19:49 UTC by Dries Michiels
Modified: 2024-01-14 19:00 UTC (History)
2 users (show)

See Also:
michiel: maintainer-feedback+


Attachments
0001-net-p2p-bazarr-export-PATH-so-bazarr-can-find-ffprob.patch (1.33 KB, patch)
2024-01-14 13:32 UTC, Michiel van Baak Jansen
michiel: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dries Michiels freebsd_committer freebsd_triage 2024-01-12 19:49:58 UTC
Hello,

When I start bazarr with the rc script, the service fails silently after a few seconds. The port of the webui is never opened.

When I run the command on the terminal:


# su -m bazarr -c "daemon -p /usr/local/bazarr/bazarr.pid /usr/local/bin/python3.9 /usr/local/share/bazarr/bin/bazarr.py --no-update -c /usr/local/bazarr/"

It works fine. So I'm really guessing where the difference would be in ... 
I see we dont set, bazarr_group=bazarr, could that be it?

I have no debug messages anywhere on my system...
Comment 1 Michiel van Baak Jansen 2024-01-14 11:59:37 UTC
(In reply to Dries Michiels from comment #0)

Just to be sure can you tell me the permissions on /usr/local/bazarr?

To enable debug logging change in /usr/local/bazarr/config/config.yml the setting general.debug

Let me know if this give you some hint about what is going wrong.
Comment 2 Dries Michiels freebsd_committer freebsd_triage 2024-01-14 13:08:11 UTC
Ok by removing -f to daemon, I get:

# service bazarr start
Starting bazarr.
#
# Traceback (most recent call last):
  File "/usr/local/share/bazarr/bin/bazarr/main.py", line 22, in <module>
    from init import *  # noqa E402
  File "/usr/local/share/bazarr/bin/bazarr/init.py", line 170, in <module>
    from app.announcements import get_announcements_to_file
  File "/usr/local/share/bazarr/bin/bazarr/app/announcements.py", line 13, in <module>
    from app.get_providers import get_enabled_providers
  File "/usr/local/share/bazarr/bin/bazarr/app/get_providers.py", line 216, in <module>
    _FFPROBE_BINARY = get_binary("ffprobe")
  File "/usr/local/share/bazarr/bin/bazarr/utilities/binaries.py", line 73, in get_binary
    raise BinaryNotFound
utilities.binaries.BinaryNotFound
Bazarr starting...
Bazarr exited.
Comment 3 Dries Michiels freebsd_committer freebsd_triage 2024-01-14 13:12:18 UTC
I suspect a PATH issue. That also explains why it works when I manually start it from the CLI. 

When I add:

export PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"

In bazarr_precmd(), it works fine.
Comment 4 Michiel van Baak Jansen 2024-01-14 13:20:29 UTC
(In reply to Dries Michiels from comment #3)
Thank you for doing the debugging for me.

Exporting the PATH and adding /usr/local/bin to it sounds like a good plan so I will update the port to do that.
Comment 5 Michiel van Baak Jansen 2024-01-14 13:32:08 UTC
Created attachment 247641 [details]
0001-net-p2p-bazarr-export-PATH-so-bazarr-can-find-ffprob.patch
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2024-01-14 17:17:36 UTC
^Triage: reporter is committer, assign accordingly.
Comment 7 commit-hook freebsd_committer freebsd_triage 2024-01-14 19:00:16 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1b0ddca28636294c59f25602dd71abf215ec9e3b

commit 1b0ddca28636294c59f25602dd71abf215ec9e3b
Author:     Michiel van Baak Jansen <michiel@vanbaak.eu>
AuthorDate: 2024-01-14 18:53:51 +0000
Commit:     Dries Michiels <driesm@FreeBSD.org>
CommitDate: 2024-01-14 18:59:20 +0000

    net-p2p/bazarr: fix finding ffprobe during start

    bazazr fails to start with the standard PATH set.

    PR:     276280

 net-p2p/bazarr/Makefile        | 1 +
 net-p2p/bazarr/files/bazarr.in | 2 ++
 2 files changed, 3 insertions(+)
Comment 8 Dries Michiels freebsd_committer freebsd_triage 2024-01-14 19:00:55 UTC
Committed, thanks!