Hi
I am trying install jellyfin on docker and I am getting a "Access to the path '/etc/resolv.conf' is denied" error (line 34 in code snippet 1) with both the official and linuxserver image.
Code snippet 1
[01:20:04] [INF] [1] Main: Jellyfin version: 10.7.7
[01:20:04] [INF] [1] Main: Environment Variables: ["[JELLYFIN_PublishedServerUrl, 192.168.0.10]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_CONFIG_DIR, /config]", "[JELLYFIN_CACHE_DIR, /config/cache]", "[JELLYFIN_DATA_DIR, /config/data]"]
[01:20:04] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg", "--webdir=/usr/share/jellyfin/web"]
[01:20:04] [INF] [1] Main: Operating system: Linux
[01:20:04] [INF] [1] Main: Architecture: X64
[01:20:04] [INF] [1] Main: 64-Bit Process: True
[01:20:04] [INF] [1] Main: User Interactive: True
[01:20:04] [INF] [1] Main: Processor count: 4
[01:20:04] [INF] [1] Main: Program data path: /config/data
[01:20:04] [INF] [1] Main: Web resources path: /usr/share/jellyfin/web
[01:20:04] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
[01:20:04] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /config/cache
[01:20:04] [FTL] [1] Main: Unhandled Exception
System.UnauthorizedAccessException: Access to the path '/etc/resolv.conf' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at System.Net.NetworkInformation.LinuxNetworkInterface.LinuxNetworkInterfaceSystemProperties..ctor()
at System.Net.NetworkInformation.LinuxNetworkInterface.GetLinuxNetworkInterfaces()
at Jellyfin.Networking.Manager.NetworkManager.InitialiseInterfaces()
at Jellyfin.Networking.Manager.NetworkManager.UpdateSettings(Object configuration)
at Jellyfin.Networking.Manager.NetworkManager..ctor(IConfigurationManager configurationManager, ILogger`1 logger)
at Emby.Server.Implementations.ApplicationHost..ctor(IServerApplicationPaths applicationPaths, ILoggerFactory loggerFactory, IStartupOptions options, IConfiguration startupConfig, IFileSystem fileSystem, IServiceCollection serviceCollection)
at Jellyfin.Server.CoreAppHost..ctor(IServerApplicationPaths applicationPaths, ILoggerFactory loggerFactory, IStartupOptions options, IConfiguration startupConfig, IFileSystem fileSystem, IServiceCollection collection)
at Jellyfin.Server.Program.StartApp(StartupOptions options)
at Jellyfin.Server.Program.<Main>(String[] args)
Unhandled exception. System.UnauthorizedAccessException: Access to the path '/etc/resolv.conf' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at System.Net.NetworkInformation.LinuxNetworkInterface.LinuxNetworkInterfaceSystemProperties..ctor()
at System.Net.NetworkInformation.LinuxNetworkInterface.GetLinuxNetworkInterfaces()
at Jellyfin.Networking.Manager.NetworkManager.InitialiseInterfaces()
at Jellyfin.Networking.Manager.NetworkManager.UpdateSettings(Object configuration)
at Jellyfin.Networking.Manager.NetworkManager..ctor(IConfigurationManager configurationManager, ILogger`1 logger)
at Emby.Server.Implementations.ApplicationHost..ctor(IServerApplicationPaths applicationPaths, ILoggerFactory loggerFactory, IStartupOptions options, IConfiguration startupConfig, IFileSystem fileSystem, IServiceCollection serviceCollection)
at Jellyfin.Server.CoreAppHost..ctor(IServerApplicationPaths applicationPaths, ILoggerFactory loggerFactory, IStartupOptions options, IConfiguration startupConfig, IFileSystem fileSystem, IServiceCollection collection)
at Jellyfin.Server.Program.StartApp(StartupOptions options)
at Jellyfin.Server.Program.<Main>(String[] args)
Display More
An example of the stack i used in portainer is as follows;
Code snippet 2
---
version: "2.1"
services:
jellyfin:
image: lscr.io/linuxserver/jellyfin
container_name: jellyfin
environment:
- PUID=1000
- PGID=1001
- TZ=Europe/London
# - JELLYFIN_PublishedServerUrl=192.168.0.10 #optional
volumes:
- /srv/dev-disk-by-uuid-ssd/dockerappdata/jellyfin:/config
- /srv/mergerfs/datapool/TV-Shows:/data/tvshows
- /srv/mergerfs/datapool/Films:/data/movies
ports:
- 8096:8096
- 8920:8920 #optional
- 7359:7359/udp #optional
- 1900:1900/udp #optional
devices:
# VAAPI Devices (examples)
- /dev/dri:/dev/dri
restart: unless-stopped
Display More
With my setup i have a user called dockermgnr with PUID 1000 and in an applications group with PGID of 1001.
I have a SSD on which the docker files and container data are kept. dockermgnr and the applications group have read/write access.
When i check file permission for /etc/resolv.conf I get the result posted below. Any attempt to chown or chmod the file is unsuccessful and leaves the file as posted below.
root@OMV:~# ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 32 Apr 18 12:43 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf
Anyone know how i can solve this issue because at the moment I can't reach the jellyfin webui on any ports?