On FreeBSD 14.0-RELEASE, I have a jail with the following configuration:
/etc/fstab.jellyfin mounts several media directories within the jail using nullfs. This part works fine, the directories mount and the files they contain are visible within the jail.
I first set up the jail with
Up to this point the jail works fine. But when I enable and start the jellyfin service, things start going weird. If Jellyfin were working correctly,
If I run it several times in a row, the Jellyfin line will periodically disappear and then reappear. If I try to stop the service, it times out without stopping it. If I try to restart the jail from the host, it just sits there for a while before failing to restart the jail, and then failing to start it up again because it didn't successfully shut it down:
The only way I see to stop the jail from being locked up like this is to go into the jail and use
The only log message I see that gives any information at all is /var/log/messages on the host, which just has this over and over:
All my other jails work fine and I don't really know how to proceed with troubleshooting this. I've built this jail three times (each time starting from scratch by using
Code:
mount.devfs;
exec.clean;
exec.start="sh /etc/rc";
exec.stop="sh /etc/rc.shutdown";
jellyfin {
allow.mount.nullfs;
allow.mlock;
mount.fstab="/etc/fstab.jellyfin";
host.hostname="jellyfin";
ip4.addr="igb0|172.18.100.129/32";
ip4.addr+="lo0|127.0.1.6/32";
ip6=inherit;
path="/jails/jellyfin";
}
/etc/fstab.jellyfin mounts several media directories within the jail using nullfs. This part works fine, the directories mount and the files they contain are visible within the jail.
I first set up the jail with
bsdinstall jail /jails/jellyfin
, same as I do with all my jails. I patch it up with freebsd-update
, restart the jail, and install jellyfin with pkg -j jellyfin install jellyfin
. The package notes for Jellyfin only say that allow.mlock and ip6=inherit must be used in the jail parameters, which I've added.Up to this point the jail works fine. But when I enable and start the jellyfin service, things start going weird. If Jellyfin were working correctly,
sockstat -l
would be showing the service bound to the jail's network interface, but it doesn't:
Code:
root@jellyfin:/ # sockstat -l
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
jellyfin jellyfin 96245 9 stream (not connected)
root syslogd 74338 5 udp6 *:514 *:*
root syslogd 74338 6 udp4 *:514 *:*
root syslogd 74338 7 dgram /var/run/log <-
root syslogd 74338 8 dgram /var/run/logpriv
If I run it several times in a row, the Jellyfin line will periodically disappear and then reappear. If I try to stop the service, it times out without stopping it. If I try to restart the jail from the host, it just sits there for a while before failing to restart the jail, and then failing to start it up again because it didn't successfully shut it down:
Code:
root@host:~ # service jail restart jellyfin
Stopping jails: jellyfinStopping jellyfin.
Waiting for PIDS: 71103
90 second watchdog timeout expired. Shutdown terminated.
Wed Dec 27 18:36:06 EST 2023
jail: jellyfin: sh /etc/rc.shutdown: exited on signal 9
.
Starting jails: cannot start jail "jellyfin":
jail: "jellyfin" already exists
.
The only way I see to stop the jail from being locked up like this is to go into the jail and use
kill -9
to forcibly terminate the jellyfin process.The only log message I see that gives any information at all is /var/log/messages on the host, which just has this over and over:
Code:
Dec 27 18:33:12 hostserver kernel: pid 16553 (jellyfin), jid 8, uid 868: exited on signal 6 (no core dump - other error)
Dec 27 18:33:18 hostserver kernel: pid 16904 (jellyfin), jid 8, uid 868: exited on signal 6 (no core dump - other error)
Dec 27 18:33:25 hostserver kernel: pid 17329 (jellyfin), jid 8, uid 868: exited on signal 6 (no core dump - other error)
Dec 27 18:33:52 hostserver kernel: pid 31971 (jellyfin), jid 8, uid 868: exited on signal 6 (no core dump - other error)
Dec 27 18:34:10 hostserver kernel: pid 71449 (jellyfin), jid 8, uid 868: exited on signal 6 (no core dump - other error)
Dec 27 18:34:17 hostserver kernel: pid 71850 (jellyfin), jid 8, uid 868: exited on signal 6 (no core dump - other error)
Dec 27 18:34:23 hostserver kernel: pid 72214 (jellyfin), jid 8, uid 868: exited on signal 6 (no core dump - other error)
All my other jails work fine and I don't really know how to proceed with troubleshooting this. I've built this jail three times (each time starting from scratch by using
zfs destroy
and zfs create
to initialize the jail's directory), with the same result each time.