veri
July 29, 2024, 4:04pm
1
Hi there, following on from this previous post SOLVED - [PSA] Sonarr v4 Upgrade in a Jail | TrueNAS Community
I’ve not been able to get Sonarr to start up on its own under 13.3. It’s not possible for me to install a 13.2 jail (as was everyone else’s solution) because it does not exist
13.2-RELEASE was not found!
I know my Sonarr config is correct because I can manually start it up with
/usr/local/share/sonarr/bin/Sonarr --data=/usr/local/sonarr --nobrowser
And it then runs fine, but it won’t run as a service with the RC.d setup
Any ideas?
victor
July 29, 2024, 4:35pm
2
What is your TrueNAS version?
dan
July 29, 2024, 4:41pm
3
FreeBSD 13.2 is EOL, and FreeBSD 13.3 jails don’t work properly under FreeBSD 13.[0-2]. The only real option to do this under CORE–and it isn’t a good one–is to run CORE 13.3-BETA. Or move to SCALE, and deal with whatever iX is going to do with their apps.
victor
July 29, 2024, 4:45pm
4
I’ve been running the 13.3 BETA for a while now without any issues.
veri
July 30, 2024, 1:53am
5
Isn’t there a way I can just force the app to run on jail startup? It seems to be running perfectly, despite the fact the service scripts can’t start it, and the fact it’s running in console mode, and the fact it’s running as root but other than that, it’s great.
victor
July 30, 2024, 2:04am
6
That’s exactly what service scripts are for.
I’d recommend updating to the 13.3-BETA, as it seems stable enough.
oxyde
July 30, 2024, 11:57am
7
I got same problem on some of my jails: manually run service works, despite fail on startup.
Tryng debugging, i add a log retention, like
>> /var/log/my_service.log
On the start function… and this fix everything .
Don’t ask me why, i don’t know… But give It a try
SeaFox
July 31, 2024, 3:31am
8
When you look at your console messages after you try starting the service, are you seeing something about “exited on signal 12” like this?
Jul 30 22:30:04 mittsume kernel: pid 29034 (daemon), jid 32, uid 0: exited on signal 12
veri
August 20, 2024, 10:29am
9
Any chance you can share the specific details of what you did to get it working?
oxyde
August 20, 2024, 5:27pm
10
I can’t be more specific, i don’t know hows do you configure your jail, but is pretty simple: in your startup script add the line i mentioned… It solve for me
veri
August 21, 2024, 12:08am
12
Can you share your startup script so I can see where you changed it?
oxyde
August 21, 2024, 1:31pm
13
this was one of autorun script what i was talking about
#!/bin/sh
#
# PROVIDE: gotenberg
# REQUIRE: DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
name="gotenberg"
rcvar=gotenberg_enable
start_cmd="${name}_start"
stop_cmd="${name}_stop"
export CHROMIUM_BIN_PATH="/usr/local/bin/chrome"
export EXIFTOOL_BIN_PATH="/usr/local/bin/exiftool"
export LIBREOFFICE_BIN_PATH="/usr/local/bin/soffice"
export PDFTK_BIN_PATH="/usr/local/bin/pdftk"
export QPDF_BIN_PATH="/usr/local/bin/qpdf"
export UNOCONV_BIN_PATH="/usr/local/bin/unoconv"
#export UNOCONVERTER_BIN_PATH="/usr/local/bin/unoconv"
#export DBUS_SESSION_BUS_ADDRESS="unix:path=/var/run/dbus/system_bus_socket"
gotenberg_start() {
echo "Starting ${name}..."
cd /root/gotenberg-7.4.2
./gotenberg >> /var/log/gotenberg.log 2>&1 &
echo $! > /var/run/${name}.pid
}
gotenberg_stop() {
echo "Stopping ${name}..."
if [ -f /var/run/${name}.pid ]; then
kill "$(cat /var/run/${name}.pid)" && rm -f /var/run/${name}.pid
else
echo "${name} is not running."
fi
}
load_rc_config $name
run_rc_command "$1"
on the gotenberg_start()
./gotenberg &
not working
./gotenberg >> /var/log/gotenberg.log 2>&1 &
wokring
im a newbie, don’t know why and how can be correlate. Discovered only trying to debug the fail autostart
veri
September 28, 2024, 10:20am
14
Found some other way of getting it all working.
Here are the steps to install Sonarr v4 on TrueNas 13.2
(change media2 to whatever user you want to be using)
iocage fetch --root-dir /pub/FreeBSD-Archive/old-releases/amd64/ --server ftp-archive.freebsd.org
echo '{"pkgs":["sonarr"]}' > /tmp/pkg.json
iocage create -n "sonarr4" -p /tmp/pkg.json -r 13.2-RELEASE dhcp="on" vnet="on" allow_raw_sockets="1" allow_mlock=1 boot="on" bpf="yes"
rm /tmp/pkg.json
iocage exec sonarr4 mkdir -p /config
iocage exec sonarr4 "pw useradd -n media2 -u 816 -d /nonexistent -s /usr/sbin/nologin"
iocage exec sonarr4 id media2
iocage exec sonarr4 "pw group mod wheel -m media2"
iocage exec sonarr4 chown -R media2:wheel /usr/local/share/sonarr /config
iocage exec sonarr4 chown media2:wheel /usr/local/etc/rc.d/sonarr
iocage exec sonarr4 chmod u+x /usr/local/etc/rc.d/sonarr
iocage exec sonarr4 sysrc "sonarr_enable=YES"
iocage exec sonarr4 sysrc "sonarr_user=media2"
iocage exec sonarr4 sysrc "sonarr_data_dir=/config"
iocage exec sonarr4 service sonarr start
iocage exec sonarr4 service sonarr status
Check running with PID
Browse to your http://your-ip:8989/
victor
September 28, 2024, 1:20pm
15
The “some other way” is still using an EOL version of the jail. You should update your host to 13.3, then use 13.3 (and even now 13.4) jails.
I upgraded to Truenas 13.3-U1 and still cannot get sonarr to run in a jail. The service says it is running but the webui doesn’t work
victor
December 19, 2024, 2:24pm
17
Did you set “allow_mlock” in the jail?
Nope. Just set mlock and the issue is resolved. Thank you so much.