Jellyfin Forum
SOLVED: (Arch Linux, Docker, Portainer) Can't connect to jellyfin-server on LAN - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: (Arch Linux, Docker, Portainer) Can't connect to jellyfin-server on LAN (/t-solved-arch-linux-docker-portainer-can-t-connect-to-jellyfin-server-on-lan)



(Arch Linux, Docker, Portainer) Can't connect to jellyfin-server on LAN - angelskin - 2024-06-16

Hi, I've set up jellyfin successfully before a few times but I did not use portainer, this time round I wanted to access it outside of my local network which I haven't done before, so I decided to start from scratch and follow this guide, here is my version of their config:
Code:
version: "3.5"

services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: jellyfin-server
    user: "1001:971"
    network_mode: "host"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    # Remember that group number you got earlier? Enter that on the line below. 989 is usually the default.
    group_add:
      - "989"
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
    environment:
      - JELLYFIN_CACHE_DIR=/var/cache/jellyfin
      - JELLYFIN_CONFIG_DIR=/etc/jellyfin
      - JELLYFIN_DATA_DIR=/var/lib/jellyfin
      - JELLYFIN_LOG_DIR=/var/log/jellyfin
    volumes:
      - /home/docker/jellyfin/etc/jellyfin:/etc/jellyfin
      - /home/docker/jellyfin/var/cache/jellyfin:/var/cache/jellyfin
      - /home/docker/jellyfin/var/lib/jellyfin:/var/lib/jellyfin
      - /home/docker/jellyfin/var/log/jellyfin:/var/log/jellyfin
      - /home/docker/media:/media

    restart: "unless-stopped"

  jellyfin-filebrowser:
    image: filebrowser/filebrowser
    container_name: jellyfin-filebrowser
    user: "1001:971"
    volumes:
      - /home/docker/media:/media
      - /home/docker/jellyfin/filebrowser/database.db:/database.db
      - /home/docker/jellyfin/filebrowser/.filebrowser.json:/.filebrowser.json
    ports:
      - 8098:80
    restart: "unless-stopped"

.filebrowser.json:
Code:
{
  "port": 80,
  "baseURL": "",
  "address": "",
  "log": "stdout",
  "database": "/database.db",
  "root": "/home/docker/media"
}

From my computer I can connect to the filebrowser on the server and see the login screen, but I can't connect to jellyfin, when I look at portainer the filebrowser has an IP assigned to it and published port, jellyfin does not, filebrowser is assigned to the 'jellyfin_default' network, jellyfin is set to 'host', I'm not sure if this is important in figuring out what's wrong but it seemed odd to me. There are also some permission errors in the jellyfin-server log, before start up i made sure everything in the /home/docker/jellyfin/ directory was owned by the docker user and group so I'm not sure why.

logs:

jellyfin-server

Code:
2024-06-16T22:51:44.512703145Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:51:44.512709275Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:51:44.512716305Z    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
2024-06-16T22:51:44.512722125Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
2024-06-16T22:51:44.512727815Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
2024-06-16T22:51:44.512733405Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:51:44.512738915Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:51:44.512744436Z    at Jellyfin.Server.Program.StartApp(StartupOptions options)
2024-06-16T22:51:44.512749886Z    at Jellyfin.Server.Program.<Main>(String[] args)
2024-06-16T22:52:45.041913953Z Unhandled exception. System.UnauthorizedAccessException: Access to the path '/etc/jellyfin/logging.default.json' is denied.
2024-06-16T22:52:45.041950403Z  ---> System.IO.IOException: Permission denied
2024-06-16T22:52:45.041957043Z    --- End of inner exception stack trace ---
2024-06-16T22:52:45.041973763Z    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
2024-06-16T22:52:45.041977903Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:52:45.041982253Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:52:45.041987363Z    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
2024-06-16T22:52:45.041991323Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
2024-06-16T22:52:45.041995143Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
2024-06-16T22:52:45.041998933Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:52:45.042002613Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:52:45.042006303Z    at Jellyfin.Server.Program.StartApp(StartupOptions options)
2024-06-16T22:52:45.042009973Z    at Jellyfin.Server.Program.<Main>(String[] args)
2024-06-16T22:53:45.611124171Z Unhandled exception. System.UnauthorizedAccessException: Access to the path '/etc/jellyfin/logging.default.json' is denied.
2024-06-16T22:53:45.611164271Z  ---> System.IO.IOException: Permission denied
2024-06-16T22:53:45.611170701Z    --- End of inner exception stack trace ---
2024-06-16T22:53:45.611177061Z    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
2024-06-16T22:53:45.611184011Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:53:45.611191521Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:53:45.611198611Z    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
2024-06-16T22:53:45.611204111Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
2024-06-16T22:53:45.611209501Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
2024-06-16T22:53:45.611227031Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:53:45.611230671Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:53:45.611234131Z    at Jellyfin.Server.Program.StartApp(StartupOptions options)
2024-06-16T22:53:45.611237491Z    at Jellyfin.Server.Program.<Main>(String[] args)
2024-06-16T22:54:46.137864781Z Unhandled exception. System.UnauthorizedAccessException: Access to the path '/etc/jellyfin/logging.default.json' is denied.
2024-06-16T22:54:46.137908331Z  ---> System.IO.IOException: Permission denied
2024-06-16T22:54:46.137917151Z    --- End of inner exception stack trace ---
2024-06-16T22:54:46.137923531Z    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
2024-06-16T22:54:46.137929371Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:54:46.137935641Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:54:46.137943211Z    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
2024-06-16T22:54:46.137949201Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
2024-06-16T22:54:46.137955031Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
2024-06-16T22:54:46.137960801Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:54:46.137966451Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:54:46.137972171Z    at Jellyfin.Server.Program.StartApp(StartupOptions options)
2024-06-16T22:54:46.137977721Z    at Jellyfin.Server.Program.<Main>(String[] args)
2024-06-16T22:55:46.643408538Z Unhandled exception. System.UnauthorizedAccessException: Access to the path '/etc/jellyfin/logging.default.json' is denied.
2024-06-16T22:55:46.643442168Z  ---> System.IO.IOException: Permission denied
2024-06-16T22:55:46.643448988Z    --- End of inner exception stack trace ---
2024-06-16T22:55:46.643454758Z    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
2024-06-16T22:55:46.643460508Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:55:46.643466458Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:55:46.643484678Z    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
2024-06-16T22:55:46.643488878Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
2024-06-16T22:55:46.643492798Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
2024-06-16T22:55:46.643496598Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:55:46.643500288Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:55:46.643504018Z    at Jellyfin.Server.Program.StartApp(StartupOptions options)
2024-06-16T22:55:46.643507628Z    at Jellyfin.Server.Program.<Main>(String[] args)
2024-06-16T22:56:47.226918089Z Unhandled exception. System.UnauthorizedAccessException: Access to the path '/etc/jellyfin/logging.default.json' is denied.
2024-06-16T22:56:47.226955579Z  ---> System.IO.IOException: Permission denied
2024-06-16T22:56:47.226962349Z    --- End of inner exception stack trace ---
2024-06-16T22:56:47.226967959Z    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
2024-06-16T22:56:47.226973549Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:56:47.226980509Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:56:47.226988019Z    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
2024-06-16T22:56:47.226993849Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
2024-06-16T22:56:47.226999549Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
2024-06-16T22:56:47.227005089Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:56:47.227010529Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:56:47.227015989Z    at Jellyfin.Server.Program.StartApp(StartupOptions options)
2024-06-16T22:56:47.227021369Z    at Jellyfin.Server.Program.<Main>(String[] args)
2024-06-16T22:57:47.816845804Z Unhandled exception. System.UnauthorizedAccessException: Access to the path '/etc/jellyfin/logging.default.json' is denied.
2024-06-16T22:57:47.816881294Z  ---> System.IO.IOException: Permission denied
2024-06-16T22:57:47.816888184Z    --- End of inner exception stack trace ---
2024-06-16T22:57:47.816893844Z    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
2024-06-16T22:57:47.816899454Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:57:47.816905554Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:57:47.816912604Z    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
2024-06-16T22:57:47.816918364Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
2024-06-16T22:57:47.816923994Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
2024-06-16T22:57:47.816929524Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:57:47.816934994Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:57:47.816940614Z    at Jellyfin.Server.Program.StartApp(StartupOptions options)
2024-06-16T22:57:47.816945974Z    at Jellyfin.Server.Program.<Main>(String[] args)
2024-06-16T22:58:48.406099243Z Unhandled exception. System.UnauthorizedAccessException: Access to the path '/etc/jellyfin/logging.default.json' is denied.
2024-06-16T22:58:48.406131833Z  ---> System.IO.IOException: Permission denied
2024-06-16T22:58:48.406138053Z    --- End of inner exception stack trace ---
2024-06-16T22:58:48.406143273Z    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
2024-06-16T22:58:48.406149333Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:58:48.406156713Z    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
2024-06-16T22:58:48.406165173Z    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
2024-06-16T22:58:48.406181203Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
2024-06-16T22:58:48.406185123Z    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
2024-06-16T22:58:48.406188683Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:58:48.406192273Z    at Jellyfin.Server.Helpers.StartupHelpers.InitLoggingConfigFile(IApplicationPaths appPaths)
2024-06-16T22:58:48.406195823Z    at Jellyfin.Server.Program.StartApp(StartupOptions options)
2024-06-16T22:58:48.406199193Z    at Jellyfin.Server.Program.<Main>(String[] args)

jellyfin-filebrowser

Code:
2024-06-16T22:23:46.873821434Z 2024/06/16 22:23:46 Caught signal terminated: shutting down.
2024-06-16T22:23:46.873848474Z 2024/06/16 22:23:46 accept tcp [::]:80: use of closed network connection
2024-06-16T22:32:58.679447030Z 2024/06/16 22:32:58 Using database: /database.db
2024-06-16T22:32:58.681562102Z 2024/06/16 22:32:58 Using config file: /.filebrowser.json
2024-06-16T22:32:58.682016132Z 2024/06/16 22:32:58 Listening on [::]:80

Thanks for taking the time to read.


RE: (Arch Linux, Docker, Portainer) Can't connect to jellyfin-server on LAN - TheDreadPirate - 2024-06-17

If you or the root user created those folders, in /home/docker you will need to make sure that user ID 1001 has permissions to read and write to them.


RE: (Arch Linux, Docker, Portainer) Can't connect to jellyfin-server on LAN - angelskin - 2024-06-26

(2024-06-17, 01:16 AM)TheDreadPirate Wrote: If you or the root user created those folders, in /home/docker you will need to make sure that user ID 1001 has permissions to read and write to them.

Got back to this today and tried setting permissions again, not sure where I went wrong initially but it worked this time, thanks 😅