Jump to content

Emby core dumps under systemd after migration, user:group issue? (Kubuntu 19.10, emby 4.3.0.26)


marktaff

Recommended Posts

marktaff

I rebuilt the guts of my server with a new system drive, so a fresh install of everything.  To prepare, I rsync archived everything to a backup drives.

 

-- from my rsync script--

# Emby data
/var/lib/emby

# Emby software
/opt/emby-server

# Emby misc
/etc/emby-server.conf
/etc/firewalld/services/emby-server.xml
/etc/init/emby-server.conf
/etc/systemd/system/multi-user.target.wants/emby-server.service
/usr/lib/systemd/system/emby-server.service
/usr/lib/systemd/system/emby-server@.service

I installed the 4.3.0.26 emby deb, started it, then closed it without going through the wizard.  The then used rsync archive to restore /var/lib/emby, /opt/emby, etc.

 

Emby will run directly from the cmd line as root, but immediately core-dumps when run as a service (service emby-server start). After much grief, using `systemctl status -n 20 emby-server', I was able to get more debug output (there is no emby log in this case, it crashes too fast, or the permissions issue, either way).

 

--Debug output--

root@columbia:/home/mark/Downloads> systemctl status -n 20 emby-server
● emby-server.service - Emby Server is a personal media server with apps on just about every device.
   Loaded: loaded (/lib/systemd/system/emby-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: core-dump) since Tue 2019-11-26 10:15:02 CST; 6s ago
  Process: 27983 ExecStart=/opt/emby-server/bin/emby-server (code=dumped, signal=ABRT)
 Main PID: 27983 (code=dumped, signal=ABRT)

Nov 26 10:15:02 columbia systemd[1]: Started Emby Server is a personal media server with apps on just about every device..
Nov 26 10:15:02 columbia emby-server[27983]: Unhandled Exception: System.AggregateException: One or more errors occurred. (Access to the path '/var/lib/emby/logs/embyserver.txt' is denied.) ---> System.UnauthorizedAccessException: Access to the path '/var/lib/emby/logs/embyserver.txt' is denied. ---> System.IO.IOEx
Nov 26 10:15:02 columbia emby-server[27983]:    --- End of inner exception stack trace ---
Nov 26 10:15:02 columbia emby-server[27983]:    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
Nov 26 10:15:02 columbia emby-server[27983]:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
Nov 26 10:15:02 columbia emby-server[27983]:    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
Nov 26 10:15:02 columbia emby-server[27983]:    at Emby.Server.Implementations.Logging.FileLogger..ctor(String path)
Nov 26 10:15:02 columbia emby-server[27983]:    at Emby.Server.Implementations.Logging.SimpleLogManager.ReloadLogger(LogSeverity severity, CancellationToken cancellationToken)
Nov 26 10:15:02 columbia emby-server[27983]:    --- End of inner exception stack trace ---
Nov 26 10:15:02 columbia emby-server[27983]:    at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
Nov 26 10:15:02 columbia emby-server[27983]:    at EmbyServer.Program.Main(String[] args)
Nov 26 10:15:02 columbia systemd[1]: emby-server.service: Main process exited, code=dumped, status=6/ABRT
Nov 26 10:15:02 columbia systemd[1]: emby-server.service: Failed with result 'core-dump'.
lines 1-19/19 (END)

Looking into the permissions of /var/lib/emby/logs, I noticed that /var/lib/emby, and all it its descendants, have a user:group of systemd-coredump:systemd-coredump. Same with the backup copy from before the server migration. /opt/emby-server and descendants all have root:root; same with the backup.  Odd, no?

Any idea what happened, and how to fix it? Do I just set /var/lib/emby to root:root recursively?

Also, I lost all my watched status, and have several hundred (thousand?) mis-identified files (really wish you guys would give us the ability to specify a regex or a callback function to get the search terms for querying tmdb), but I'll tackle that next.

Thanks.

 

Link to comment
Share on other sites

 

/var/lib/emby

 

Emby Server will need write access to this folder, otherwise yes, it's going to crash. The update would not have changed permissions on this.

 

 

 

Also, I lost all my watched status, and have several hundred (thousand?) mis-identified files

Let's look at it when you're back up and running, but we'll need to go over an example. Thanks.

Link to comment
Share on other sites

marktaff

Emby Server will need write access to this folder, otherwise yes, it's going to crash. The update would not have changed permissions on this.

 

Let's look at it when you're back up and running, but we'll need to go over an example. Thanks.

Thanks. So, root:root, or emby:emby?  What should it be?

 

Edit: So, root:root didn't do it, but emby:emby did the trick. Emby now starts and stops as expected.

Edited by marktaff
Link to comment
Share on other sites

marktaff

Thanks for your help. Next up is finding and fixing all the mis-identified files, then checking into restoring watched status.

Link to comment
Share on other sites

  • 1 year later...
THE5LOVE
On 26/11/2019 at 12:05, marktaff said:

Gracias. Entonces, ¿root: root o emby: emby? ¿Que debería ser?

 

Editar: Entonces, root: root no lo hizo, pero emby: emby hizo el truco. Emby ahora comienza y se detiene como se esperaba.

no entendi como lo solucionaste 

Link to comment
Share on other sites

11 hours ago, THE5LOVE said:

no entendi como lo solucionaste 

Hola, ¿tienes algún problema?

Link to comment
Share on other sites

THE5LOVE
10 hours ago, Luke said:

Hola, ¿tienes algún problema?

ubuntu @ emby-server: ~ $ sudo systemctl status emby-server.service
? emby-server.service: Emby Server es un servidor multimedia personal con aplicaciones en casi todos los dispositivos.
     Cargado: cargado (/lib/systemd/system/emby-server.service; habilitado; preajuste del proveedor: habilitado)
     Activo: activo (en ejecución) desde Tue 2021-04-13 12:44:13 UTC; Hace 4min 39s
   PID principal: 8429 (EmbyServer)
      Tareas: 16 (límite: 1119)
     Memoria: 94,7 M
     CGroup: /system.slice/emby-server.service
             +-8429 / opt / emby-server / system / EmbyServer -programdata / var / lib / emby -ffdetect / opt / emby-server / bin / ffdetect -ffmpeg / opt / emby-server / bin / ffmpeg -ffprobe / opt / emby-server / bin / ffprobe -restartexitcode 3 -updatepackage emby-se
rver-deb_ {versión} _amd64.deb

13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada completado: Emby.Notifications.Notifications. Duración: 0.0003103 segundos
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada inicial Emby.Server.Sync.SyncManagerEntryPoint
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: SyncRepository Inicializar tomando bloqueo de escritura
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: SyncRepository Inicializar bloqueo de escritura tomado
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada completado: Emby.Server.Sync.SyncManagerEntryPoint. Duración: 0.006291 segundos
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada inicial Emby.Server.Sync.SyncNotificationEntryPoint
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada completado: Emby.Server.Sync.SyncNotificationEntryPoint. Duración: 0.0023773 segundos
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada inicial EmbyServer.Windows.LoopUtilEntryPoint
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada completado: EmbyServer.Windows.LoopUtilEntryPoint. Duración: 8.41E-05 segundos
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: todos los puntos de entrada han comenzado
ubuntu @ emby-servidor: ~ $

Link to comment
Share on other sites

  • 2 weeks later...
On 4/14/2021 at 7:43 AM, THE5LOVE said:

ubuntu @ emby-server: ~ $ sudo systemctl status emby-server.service
? emby-server.service: Emby Server es un servidor multimedia personal con aplicaciones en casi todos los dispositivos.
     Cargado: cargado (/lib/systemd/system/emby-server.service; habilitado; preajuste del proveedor: habilitado)
     Activo: activo (en ejecución) desde Tue 2021-04-13 12:44:13 UTC; Hace 4min 39s
   PID principal: 8429 (EmbyServer)
      Tareas: 16 (límite: 1119)
     Memoria: 94,7 M
     CGroup: /system.slice/emby-server.service
             +-8429 / opt / emby-server / system / EmbyServer -programdata / var / lib / emby -ffdetect / opt / emby-server / bin / ffdetect -ffmpeg / opt / emby-server / bin / ffmpeg -ffprobe / opt / emby-server / bin / ffprobe -restartexitcode 3 -updatepackage emby-se
rver-deb_ {versión} _amd64.deb

13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada completado: Emby.Notifications.Notifications. Duración: 0.0003103 segundos
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada inicial Emby.Server.Sync.SyncManagerEntryPoint
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: SyncRepository Inicializar tomando bloqueo de escritura
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: SyncRepository Inicializar bloqueo de escritura tomado
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada completado: Emby.Server.Sync.SyncManagerEntryPoint. Duración: 0.006291 segundos
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada inicial Emby.Server.Sync.SyncNotificationEntryPoint
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada completado: Emby.Server.Sync.SyncNotificationEntryPoint. Duración: 0.0023773 segundos
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada inicial EmbyServer.Windows.LoopUtilEntryPoint
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: Punto de entrada completado: EmbyServer.Windows.LoopUtilEntryPoint. Duración: 8.41E-05 segundos
13 de abril 12:44:20 emby-server emby-server [8429]: Aplicación de información: todos los puntos de entrada han comenzado
ubuntu @ emby-servidor: ~ $

Hi there, are you still having an issue with this? What version of Emby Server do you have?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...