truenas / charts

TrueNAS SCALE Apps Catalogs & Charts
BSD 3-Clause "New" or "Revised" License
290 stars 278 forks source link

Jellyfin doesn't work after system restart #2642

Closed dangreen closed 1 month ago

dangreen commented 1 month ago

App Version: 10.9.7 Chart Version: 1.3.1

k8s logs:

Startup probe failed: Get "http://172.16.0.54:8096/health": dial tcp 172.16.0.54:8096: connect: connection refused
dangreen commented 1 month ago

Works only with host network enabled

stavros-k commented 1 month ago

App Version: 10.9.7 Chart Version: 1.3.1

k8s logs:

Startup probe failed: Get "http://172.16.0.54:8096/health": dial tcp 172.16.0.54:8096: connect: connection refused

Hello, I will need Jellyfin logs. K8s logs just state that it cant reach the app, but we cant find the reason from there.

Thanks

dangreen commented 1 month ago

@stavros-k how can i access jellyfin logs without web ui?

stavros-k commented 1 month ago

You have to jump in a shell, assuming you have named the app jellyfin

k3s kubectl logs -n ix-jellyfin -l pod.name=jellyfin
dangreen commented 1 month ago

@stavros-k for now I can't reproduce that problem, but now I have another:

I fully reinstalled Jellyfin with host network enabled. Jellyfin web ui was started on 192.168.1.182:8096 After system restart web ui started on 192.168.1.182:30013 (host network check still enabled) and in jellyfin dashboard I see configuration and media that was one month ago - look like after restart older data snapshot was applied, but before reinstall I removed all jellyfin files from ix-applications dataset

For example I don't have same issue with Transmission, after restart I see configuration and transfers that was before restart.

How to escape that? I tired of each time jellyfin reconfiguration after system restart.

dangreen commented 1 month ago

@stavros-k When I'm trying to remove jellyfin I get next error:

[EBUSY] Failed to delete dataset: cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes/transcodes': dataset is busy 
cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes/cache': dataset is busy 
cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes/config': dataset is busy 
cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes': dataset is busy 
cannot destroy 'System/ix-applications/releases/jellyfin/volumes': dataset is busy 
cannot destroy 'System/ix-applications/releases/jellyfin/charts': dataset is busy 
cannot destroy 'System/ix-applications/releases/jellyfin': dataset is busy
stack trace ``` Error: concurrent.futures.process._RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3/dist-packages/middlewared/plugins/zfs_/dataset.py", line 210, in do_delete subprocess.run( File "/usr/lib/python3.11/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['zfs', 'destroy', '-f', '-r', 'System/ix-applications/releases/jellyfin']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.11/concurrent/futures/process.py", line 256, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 112, in main_worker res = MIDDLEWARE._run(*call_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 46, in _run return self._call(name, serviceobj, methodobj, args, job=job) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 34, in _call with Client(f'ws+unix://{MIDDLEWARE_RUN_DIR}/middlewared-internal.sock', py_exceptions=True) as c: File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 40, in _call return methodobj(*params) ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 53, in nf res = f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 191, in nf return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/plugins/zfs_/dataset.py", line 221, in do_delete raise CallError(f'Failed to delete dataset: {error}', errno_) middlewared.service_exception.CallError: [EBUSY] Failed to delete dataset: cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes/transcodes': dataset is busy cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes/cache': dataset is busy cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes/config': dataset is busy cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes': dataset is busy cannot destroy 'System/ix-applications/releases/jellyfin/volumes': dataset is busy cannot destroy 'System/ix-applications/releases/jellyfin/charts': dataset is busy cannot destroy 'System/ix-applications/releases/jellyfin': dataset is busy """ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/middlewared/job.py", line 469, in run await self.future File "/usr/lib/python3/dist-packages/middlewared/job.py", line 511, in __run_body rv = await self.method(*args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/service/crud_service.py", line 210, in nf rv = await func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 47, in nf res = await f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 187, in nf return await func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/chart_release.py", line 637, in do_delete await self.post_remove_tasks(release_name, job) File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/chart_release.py", line 657, in post_remove_tasks await self.remove_storage_class_and_dataset(release_name, job) File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/chart_release.py", line 706, in remove_storage_class_and_dataset await self.middleware.call('zfs.dataset.delete', release_ds, {'recursive': True, 'force': True}) File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1564, in call return await self._call( ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1417, in _call return await methodobj(*prepared_call.args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/service/crud_service.py", line 199, in delete return await self.middleware._call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1425, in _call return await self._call_worker(name, *prepared_call.args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1431, in _call_worker return await self.run_in_proc(main_worker, name, args, job) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1337, in run_in_proc return await self.run_in_executor(self.__procpool, method, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1321, in run_in_executor return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ middlewared.service_exception.CallError: [EBUSY] Failed to delete dataset: cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes/transcodes': dataset is busy cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes/cache': dataset is busy cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes/config': dataset is busy cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes': dataset is busy cannot destroy 'System/ix-applications/releases/jellyfin/volumes': dataset is busy cannot destroy 'System/ix-applications/releases/jellyfin/charts': dataset is busy cannot destroy 'System/ix-applications/releases/jellyfin': dataset is busy ```
stavros-k commented 1 month ago

@stavros-k for now I can't reproduce that problem, but now I have another:

I fully reinstalled Jellyfin with host network enabled. Jellyfin web ui was started on 192.168.1.182:8096 After system restart web ui started on 192.168.1.182:30013 (host network check still enabled) and in jellyfin dashboard I see configuration and media that was one month ago - look like after restart older data snapshot was applied, but before reinstall I removed all jellyfin files from ix-applications dataset

This is probably due to the next error you reported below, something wasn't cleanup on removal

stavros-k commented 1 month ago

@stavros-k When I'm trying to remove jellyfin I get next error:

[EBUSY] Failed to delete dataset: cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes/transcodes': dataset is busy 
cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes/cache': dataset is busy 
cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes/config': dataset is busy 
cannot destroy 'System/ix-applications/releases/jellyfin/volumes/ix_volumes': dataset is busy 
cannot destroy 'System/ix-applications/releases/jellyfin/volumes': dataset is busy 
cannot destroy 'System/ix-applications/releases/jellyfin/charts': dataset is busy 
cannot destroy 'System/ix-applications/releases/jellyfin': dataset is busy

Can you try stopping the app, then remove it?

dangreen commented 1 month ago

@stavros-k I get this error after stop and remove.

I tried unset pool at all and remove ix-applications dataset and install jellyfin again: for now look like my issue is fixed, jellyfin works as expected after system restart

stavros-k commented 1 month ago

Glad to hear it works now for you. I'll close this one now and if you get this issue again feel free to open a new one and link back to this.

Thanks!