Jump to content

Emby docker on Unraid is started but nothing running


Recommended Posts

Posted (edited)

Today my Emby docker was unresponsive when I restarted it. Even after restarting the server and shutting down a few times, Emby still doesn't load up after starting the docker. I've looked at the log and I get these errors when the docker is started. Any help appreciated, thanks

 

2019-09-01 16:30:27,012 DEBG 'emby' stdout output:
Info App: Loading Emby.Codecs, Version=4.2.1.0, Culture=neutral, PublicKeyToken=null
Info App: Loading Emby.Server.Connect, Version=4.2.1.0, Culture=neutral, PublicKeyToken=null

2019-09-01 16:30:27,012 DEBG 'emby' stdout output:
Info App: Loading Emby.Server.Sync, Version=4.2.1.0, Culture=neutral, PublicKeyToken=null
Info App: Loading EmbyServer, Version=4.2.1.0, Culture=neutral, PublicKeyToken=null

2019-09-01 16:30:27,214 DEBG 'emby' stdout output:
Info SqliteUserRepository: Sqlite version: 3.29.0

2019-09-01 16:30:27,215 DEBG 'emby' stdout output:
Info SqliteUserRepository: Sqlite compiler options: COMPILER=gcc-9.1.0,ENABLE_COLUMN_METADATA,ENABLE_DBSTAT_VTAB,ENABLE_FTS3,ENABLE_FTS3_TOKENIZER,ENABLE_FTS4,ENABLE_FTS5,ENABLE_JSON1,ENABLE_RTREE,ENABLE_UNLOCK_NOTIFY,HAVE_ISNAN,MAX_EXPR_DEPTH=10000,MAX_VARIABLE_NUMBER=250000,SECURE_DELETE,TEMP_STORE=1,THREADSAFE=1

2019-09-01 16:30:27,247 DEBG 'emby' stdout output:
Error Main: Error in appHost.Init
*** Error Report ***
Version: 4.2.1.0
Command line: /usr/lib/emby-server/EmbyServer.dll -programdata /config -ffdetect -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe -restartexitcode 3
Operating system: Unix 4.19.56.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///opt/dotnet/shared/Microsoft.NETCore.App/2.2.6/System.Private.CoreLib.dll
Processor count: 16
Program data path: /config
Application directory: /usr/lib/emby-server
SQLitePCL.pretty.SQLiteException: IOError: disk I/O error - PRAGMA journal_mode
SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement(String sql, String& tail)
at SQLitePCL.pretty.DatabaseConnection.PrepareStatement(IDatabaseConnection This, String sql)
at Emby.Sqlite.BaseSqliteRepository.CreateConnection(Boolean isReadOnly)
at Emby.Server.Implementations.Data.SqliteUserRepository.Initialize()
at Emby.Server.Implementations.ApplicationHost.GetUserRepository()
at Emby.Server.Implementations.ApplicationHost.RegisterResources(FfmpegConfiguration ffmpegInfo)
at Emby.Server.Implementations.ApplicationHost.Init()
at EmbyServer.HostedService.StartAsync(CancellationToken cancellationToken)
Source: SQLitePCL.pretty
TargetSite: SQLitePCL.pretty.IStatement PrepareStatement(System.String, System.String ByRef)


2019-09-01 16:30:27,250 DEBG 'emby' stdout output:
Info Main: Shutdown complete

2019-09-01 16:30:27,301 DEBG fd 8 closed, stopped monitoring <POutputDispatcher at 23084646182608 for <Subprocess at 23084646182352 with name emby in state RUNNING> (stdout)>
2019-09-01 16:30:27,301 DEBG fd 10 closed, stopped monitoring <POutputDispatcher at 23084646294416 for <Subprocess at 23084646182352 with name emby in state RUNNING> (stderr)>
2019-09-01 16:30:27,301 INFO exited: emby (exit status 0; expected)
2019-09-01 16:30:27,302 DEBG received SIGCHLD indicating a child quit

Edited by davidcdang
Posted

Some kind of disc I/O error occurred:

SQLitePCL.pretty.SQLiteException: IOError: disk I/O error - PRAGMA journal_mode

Are you out of free space, or is there a problem with your hard drive?

Posted (edited)

Array is about 60% used. I don't think there is a problem with the hard drive. I'm able to still download to the array and I'm able to still access it

Edited by davidcdang
Posted (edited)

Setting up new box.
OMV 4.1.5

 

Similar error. New drives and they are not full. I have other services on the same drives that I've been reading and writing to. 

There was a few iterations from deleting and re-creating the container where it was working. I have been tweaking the volumes and bind mounts for the media folders. I haven't touched the config directory. 

log.txt

Edited by teiva
Posted

Have there been any unraid updates lately?

Posted

Have there been any unraid updates lately?

 

Haven't updated since 6.7.2 about a month ago

Posted

Haven't updated since 6.7.2 about a month ago

 

Hi, did you see the above post about permissions.

Posted

Hi, did you see the above post about permissions.

 

? I think the other poster had an unrelated issue

Posted

? I think the other poster had an unrelated issue

 

It's worth looking into because the error messages are similar.

Posted

It's worth looking into because the error messages are similar.

 

The above post was by the same user on the OMV forums. No solution was given...

Posted

I checked my log on Unraid for anything and noticed this

 

Sep 2 10:11:49 Tower kernel: BTRFS warning (device sdf1): csum failed root 5 ino 4638800 off 0 csum 0xbd84d3b5 expected csum 0xe15395e9 mirror 1

 

This is my cache drive, maybe I need to reformat it?

Posted (edited)

@@davidcdang I found the solution and updated my post. 

If you peek into my logs you'll see a similar error....

Error Main: Error in appHost.Init
	*** Error Report ***
	Version: 4.2.1.0
	Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
	Operating system: Unix 4.19.0.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Runtime: file:///system/System.Private.CoreLib.dll
	Processor count: 8
	Program data path: /config
	Application directory: /system
	SQLitePCL.pretty.SQLiteException: IOError: disk I/O error - PRAGMA journal_mode
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
	   at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement(String sql, String& tail)
	   at SQLitePCL.pretty.DatabaseConnection.PrepareStatement(IDatabaseConnection This, String sql)
	   at Emby.Sqlite.BaseSqliteRepository.CreateConnection(Boolean isReadOnly)
	   at Emby.Server.Implementations.Data.SqliteUserRepository.Initialize()
	   at Emby.Server.Implementations.ApplicationHost.GetUserRepository()
	   at Emby.Server.Implementations.ApplicationHost.RegisterResources(FfmpegConfiguration ffmpegInfo)
	   at Emby.Server.Implementations.ApplicationHost.Init()
	   at EmbyServer.HostedService.StartAsync(CancellationToken cancellationToken)
	Source: SQLitePCL.pretty
	TargetSite: SQLitePCL.pretty.IStatement PrepareStatement(System.String, System.String ByRef)

My volume pointed to the config like so 

 

--volume /sharefolders/AppData/emby:/config \
 

docker run -d \
    --volume /path/to/programdata:/config \ # This is mandatory
    --volume /path/to/share1:/mnt/share1 \ # To mount a first share
    --volume /path/to/share2:/mnt/share2 \ # To mount a second share
    --device /dev/dri/renderD128 \ # To mount a render node for VAAPI
    --publish 8096:8096 \ # To expose the HTTP port
    --publish 8920:8920 \ # To expose the HTTPS port
    --env UID=1000 \ # The UID to run emby as (default: 2)
    --env GID=100 \ # The GID to run emby as (default 2)
    --env GIDLIST=100 \ # A comma-separated list of additional GIDs to run emby as (default: 2)
    emby/embyserver:latest

Prior to resolving my issue emby directory and all the subfolders were owned by the designated user specified in the UID=1000 and GID=100 as required. The problem is AppData directory also needs to be owned by UID=1000 but instead it was owned by root.

 

Something like this did the trick for me in command line...

sudo chown 1000:100 /sharefolders/AppData

 

restart container => no errors in logs => http://<server>:8096 => all smiles

Edited by teiva
Posted

@@davidcdang I found the solution and updated my post. 

 

If you peek into my logs you'll see a similar error....

Error Main: Error in appHost.Init
	*** Error Report ***
	Version: 4.2.1.0
	Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
	Operating system: Unix 4.19.0.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Runtime: file:///system/System.Private.CoreLib.dll
	Processor count: 8
	Program data path: /config
	Application directory: /system
	SQLitePCL.pretty.SQLiteException: IOError: disk I/O error - PRAGMA journal_mode
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
	   at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement(String sql, String& tail)
	   at SQLitePCL.pretty.DatabaseConnection.PrepareStatement(IDatabaseConnection This, String sql)
	   at Emby.Sqlite.BaseSqliteRepository.CreateConnection(Boolean isReadOnly)
	   at Emby.Server.Implementations.Data.SqliteUserRepository.Initialize()
	   at Emby.Server.Implementations.ApplicationHost.GetUserRepository()
	   at Emby.Server.Implementations.ApplicationHost.RegisterResources(FfmpegConfiguration ffmpegInfo)
	   at Emby.Server.Implementations.ApplicationHost.Init()
	   at EmbyServer.HostedService.StartAsync(CancellationToken cancellationToken)
	Source: SQLitePCL.pretty
	TargetSite: SQLitePCL.pretty.IStatement PrepareStatement(System.String, System.String ByRef)

My volume pointed to the config like so 

 

--volume /sharefolders/AppData/emby:/config \

 

docker run -d \
    --volume /path/to/programdata:/config \ # This is mandatory
    --volume /path/to/share1:/mnt/share1 \ # To mount a first share
    --volume /path/to/share2:/mnt/share2 \ # To mount a second share
    --device /dev/dri/renderD128 \ # To mount a render node for VAAPI
    --publish 8096:8096 \ # To expose the HTTP port
    --publish 8920:8920 \ # To expose the HTTPS port
    --env UID=1000 \ # The UID to run emby as (default: 2)
    --env GID=100 \ # The GID to run emby as (default 2)
    --env GIDLIST=100 \ # A comma-separated list of additional GIDs to run emby as (default: 2)
    emby/embyserver:latest

Prior to resolving my issue emby directory and all the subfolders were owned by the designated user specified in the UID=1000 and GID=100 as required. The problem is AppData directory also needs to be owned by UID=1000 but instead it was owned by root.

 

Something like this did the trick for me in command line...

sudo chown 1000:100 /sharefolders/AppData

 

restart container => no errors in logs => http://<server>:8096 => all smiles

 

Thanks! I'm pretty unfamiliar with Linux, could you walk me through this step by step? Thanks again!

Posted (edited)

Do you know the full path to your parentfolder/emby/config folder? Can you upload screenshots or you familiar with command line?

 

 

Here's the command line I would use. My guess is it's in some sub-directory and under your home folder but it could be somewhere else. Generally you have to specify the config folder when creating the emby container from the docker image.

$find ~ -type d -name "emby" -print

Look for (Find) directories (-type d) within my home directory (~)  with the name emby (-name "emby").

 

Once you find the config folder then you'll need to look at your folder permissions.

$ls -al

list everything (hidden files) in a long list format in the current folder that you're in. FYI hidden files start with a period (i.e. ".config/emby/config")

 

You'll want to check the permissions of the parent folder for the emby directory. For example for ".config/emby/config" check permissions of ".config" folder.

What's the permissions for ".config", "emby", and "config" folders?

Does the folder permissions match with what was specified for

    --env UID=1000 \ # The UID to run emby as (default: 2)
    --env GID=100 \ # The GID to run emby as (default 2)
$id teiva

This will return the UID and GID.

 

Edited by teiva
Posted

In case you want to switch to OMV where I can help you more specifically otherwise you may want to ping the Unraid forums about how to find or specify the config folder on your emby container.



BAlGaInTl
Posted

I checked my log on Unraid for anything and noticed this

 

Sep 2 10:11:49 Tower kernel: BTRFS warning (device sdf1): csum failed root 5 ino 4638800 off 0 csum 0xbd84d3b5 expected csum 0xe15395e9 mirror 1

 

This is my cache drive, maybe I need to reformat it?

 

How much space is on your cache drive?  

 

When I was evaluating Unraid, I started with a small cache drive (120GB), and it got filled up quickly and caused Emby to crash.  Manually freeing up space and restarting fixed the issue.  I temporarily moved apps directories onto my main spinning disk shares.

 

I believe this can happen even when saving files to your array if the cache is being used as an intermediary to speed things up.

 

When I was sure I was going to stick with Unraid, I put in a 1TB cache drive and haven't had a hiccup since.

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...