Jump to content


Photo

First install sqlite crash on startup SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.

crash startup docker sqlite

  • Please log in to reply
5 replies to this topic

#1 grid-hibiscus-pancake OFFLINE  

grid-hibiscus-pancake

    Advanced Member

  • Members
  • 32 posts
  • Local time: 01:15 AM

Posted 26 December 2017 - 06:05 PM

Hi,

 

I am hoping this is the right place to ask.

 

I am trying to install emby for the first time and facing some issues.

 

I am using docker and ansible to get it working.

 

Ansible script is pretty simple

- name: Install Emby
  docker:
    name: emby
    image: emby/embyserver:latest
    state: reloaded
    pull: always
    privileged: yes
    restart_policy: always
    volumes:
      - "{{ appdata }}/emby/test:/config:rw"
      - "/tmp:/tmp:rw"
      - "{{ media }}:/media:ro"
    ports:
      - "8096:8096" #host:container
      - "8920:8920"
    env:
      APP_UID: 1050
      APP_GID: 1050
      APP_USER: "{{dockeruser}}"
      VERSION: latest

The "APPDATA" folder is a CIFS mount on the remote NAS, the all required folders are created and dockeruser has access and permissions to write.

bash-4.4# cd /config/
bash-4.4# ls -lah
total 4.0K
drwxrwxr-x  2 dockeruser dockeruser    0 Dec 26  2017 .
drwxr-xr-x 41 root       root       4.0K Dec 26 02:46 ..
drwxrwxr-x  2 dockeruser dockeruser    0 Dec 26  2017 cache
drwxrwxr-x  2 dockeruser dockeruser    0 Dec 26  2017 config
drwxrwxr-x  2 dockeruser dockeruser    0 Dec 26  2017 data
drwxrwxr-x  2 dockeruser dockeruser    0 Dec 26  2017 localization
drwxrwxr-x  2 dockeruser dockeruser    0 Dec 26  2017 logs

But I get an exception on startup of emby:

2017-12-26T02:46:45.103737485Z 	*** Error Report ***
2017-12-26T02:46:45.103745195Z 	Version: 3.2.60.0
2017-12-26T02:46:45.103749733Z 	Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /config -restartpath /usr/lib/emby-server/restart.sh
2017-12-26T02:46:45.103755378Z 	Operating system: Unix 3.16.0.4
2017-12-26T02:46:45.103759083Z 	64-Bit OS: True
2017-12-26T02:46:45.103762662Z 	64-Bit Process: True
2017-12-26T02:46:45.103766230Z 	User Interactive: False
2017-12-26T02:46:45.103770132Z 	Mono: 4.8.1 (Stable 4.8.1.0/22a39d7 Sun Oct  1 17:55:43 UTC 2017)
2017-12-26T02:46:45.103775094Z 	Processor count: 2
2017-12-26T02:46:45.103779418Z 	Program data path: /config
2017-12-26T02:46:45.103783731Z 	Application directory: /usr/lib/emby-server/bin
2017-12-26T02:46:45.103787682Z 	System.AggregateException: One or more errors occurred. ---> SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
2017-12-26T02:46:45.103793143Z 	  at SQLitePCL.pretty.SQLiteException.CheckOk (SQLitePCL.sqlite3 db, System.Int32 rc) [0x0001a] in <926d5dc8f35f4aae9a6008f11f233fd0>:0
2017-12-26T02:46:45.103797254Z 	  at SQLitePCL.pretty.SQLiteException.CheckOk (SQLitePCL.sqlite3_stmt stmt, System.Int32 rc) [0x00006] in <926d5dc8f35f4aae9a6008f11f233fd0>:0
2017-12-26T02:46:45.103801365Z 	  at SQLitePCL.pretty.StatementImpl.MoveNext () [0x00056] in <926d5dc8f35f4aae9a6008f11f233fd0>:0
2017-12-26T02:46:45.103805152Z 	  at SQLitePCL.pretty.DatabaseConnection.ExecuteAll (SQLitePCL.pretty.IDatabaseConnection This, System.String sql) [0x0001d] in <926d5dc8f35f4aae9a6008f11f233fd0>:0
2017-12-26T02:46:45.103811208Z 	  at Emby.Server.Implementations.Data.ManagedConnection.ExecuteAll (System.String sql) [0x00000] in <a12a7c6217e143eaa39430af322cb07e>:0
2017-12-26T02:46:45.103815564Z 	  at Emby.Server.Implementations.Data.BaseSqliteRepository.RunDefaultInitialization (Emby.Server.Implementations.Data.ManagedConnection db) [0x00079] in <a12a7c6217e143eaa39430af322cb07e>:0
2017-12-26T02:46:45.103819573Z 	  at Emby.Server.Implementations.Data.SqliteUserRepository.Initialize () [0x00008] in <a12a7c6217e143eaa39430af322cb07e>:0
2017-12-26T02:46:45.103823603Z 	  at Emby.Server.Implementations.ApplicationHost.GetUserRepository () [0x00027] in <a12a7c6217e143eaa39430af322cb07e>:0
2017-12-26T02:46:45.103827786Z 	  at Emby.Server.Implementations.ApplicationHost+<RegisterResources>d__308.MoveNext () [0x005ce] in <a12a7c6217e143eaa39430af322cb07e>:0
2017-12-26T02:46:45.103831952Z 	--- End of stack trace from previous location where exception was thrown ---
2017-12-26T02:46:45.103873899Z 	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
2017-12-26T02:46:45.103898654Z 	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
2017-12-26T02:46:45.104062434Z 	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
2017-12-26T02:46:45.104067354Z 	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
2017-12-26T02:46:45.104071357Z 	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
2017-12-26T02:46:45.104075767Z 	  at Emby.Server.Implementations.ApplicationHost+<Init>d__303.MoveNext () [0x0024c] in <a12a7c6217e143eaa39430af322cb07e>:0
2017-12-26T02:46:45.104202780Z 	   --- End of inner exception stack trace ---
2017-12-26T02:46:45.104461756Z 	  at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00242] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
2017-12-26T02:46:45.104468762Z 	  at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
2017-12-26T02:46:45.104472933Z 	  at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
2017-12-26T02:46:45.104477195Z 	  at MediaBrowser.Server.Mono.MainClass.RunApplication (Emby.Server.Implementations.ServerApplicationPaths appPaths, MediaBrowser.Model.Logging.ILogManager logManager, Emby.Server.Implementations.StartupOptions options) [0x000d4] in <ce6ca2d6e906484ab100b2c0b72cc4b9>:0
2017-12-26T02:46:45.104481691Z 	  at MediaBrowser.Server.Mono.MainClass.Main (System.String[] args) [0x00085] in <ce6ca2d6e906484ab100b2c0b72cc4b9>:0
2017-12-26T02:46:45.104723594Z 	---> (Inner Exception #0) Busy: database is locked
2017-12-26T02:46:45.104743338Z 	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
2017-12-26T02:46:45.104748462Z 	  at SQLitePCL.pretty.SQLiteException.CheckOk (SQLitePCL.sqlite3 db, System.Int32 rc) [0x0001a] in <926d5dc8f35f4aae9a6008f11f233fd0>:0
2017-12-26T02:46:45.104758565Z 	  at SQLitePCL.pretty.SQLiteException.CheckOk (SQLitePCL.sqlite3_stmt stmt, System.Int32 rc) [0x00006] in <926d5dc8f35f4aae9a6008f11f233fd0>:0
2017-12-26T02:46:45.104763157Z 	  at SQLitePCL.pretty.StatementImpl.MoveNext () [0x00056] in <926d5dc8f35f4aae9a6008f11f233fd0>:0
2017-12-26T02:46:45.104766973Z 	  at SQLitePCL.pretty.DatabaseConnection.ExecuteAll (SQLitePCL.pretty.IDatabaseConnection This, System.String sql) [0x0001d] in <926d5dc8f35f4aae9a6008f11f233fd0>:0
2017-12-26T02:46:45.104770851Z 	  at Emby.Server.Implementations.Data.ManagedConnection.ExecuteAll (System.String sql) [0x00000] in <a12a7c6217e143eaa39430af322cb07e>:0
2017-12-26T02:46:45.104774649Z 	  at Emby.Server.Implementations.Data.BaseSqliteRepository.RunDefaultInitialization (Emby.Server.Implementations.Data.ManagedConnection db) [0x00079] in <a12a7c6217e143eaa39430af322cb07e>:0
2017-12-26T02:46:45.104795683Z 	  at Emby.Server.Implementations.Data.SqliteUserRepository.Initialize () [0x00008] in <a12a7c6217e143eaa39430af322cb07e>:0
2017-12-26T02:46:45.104801831Z 	  at Emby.Server.Implementations.ApplicationHost.GetUserRepository () [0x00027] in <a12a7c6217e143eaa39430af322cb07e>:0
2017-12-26T02:46:45.104805745Z 	  at Emby.Server.Implementations.ApplicationHost+<RegisterResources>d__308.MoveNext () [0x005ce] in <a12a7c6217e143eaa39430af322cb07e>:0
2017-12-26T02:46:45.104809863Z 	--- End of stack trace from previous location where exception was thrown ---
2017-12-26T02:46:45.104814200Z 	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
2017-12-26T02:46:45.104819577Z 	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
2017-12-26T02:46:45.104823695Z 	  at System.Runtime.CompilerServices.TaskAwaiter.

If I don't mount the location of the emby APPDATA (where I want to store DB files etc...) then emby seems to start. but this isn't ideal at all I don't want to keep this data in the VM or in Docker.

 

Please help.

Attached Files



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 146738 posts
  • Local time: 01:15 AM

Posted 26 December 2017 - 06:07 PM

Hi, since this is a new install, we've switched docker containers. Try using the new one listed on our website:

https://emby.media/download.html

 

Thanks.



#3 grid-hibiscus-pancake OFFLINE  

grid-hibiscus-pancake

    Advanced Member

  • Members
  • 32 posts
  • Local time: 01:15 AM

Posted 26 December 2017 - 06:21 PM

It seems it's the same issue here are the logs attached.

 

All folder structure is created but for some reason there is an issue with db file.

Attached Files



#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 146738 posts
  • Local time: 01:15 AM

Posted 26 December 2017 - 06:48 PM

The first install is based on the mono runtime, while the second is based on Microsoft .NET Core. If it was able to create a log file then it would appear that the runtime supports what you're doing. It would appear to be a native crash in sqlite, perhaps it doesn't support the cifs share.

 

 

However, if the CIFS share is mounted as a regular local share

 

However, if the CIFS share is mounted as a regular local share

However, if the CIFS share is mounted as a regular local share



#5 grid-hibiscus-pancake OFFLINE  

grid-hibiscus-pancake

    Advanced Member

  • Members
  • 32 posts
  • Local time: 01:15 AM

Posted 26 December 2017 - 06:55 PM

I agree there seems to be something wrong in the way sqlite interacts with CIFS shares :( perhaps some locking issues?

 

I tried fixing it with various options for mounts like https://stackoverflo...like-cifs-nobrl

 

but no luck.

 

If I were to leave the config and db inside of the VM how big will db files get? my library is ~ 100tb ~ 40k files.



#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 146738 posts
  • Local time: 01:15 AM

Posted 26 December 2017 - 07:01 PM

I don't think the data folder will be too big, especially when you can configure certain parts of it such as the metadata folder and transcoding temp folder.







Also tagged with one or more of these keywords: crash, startup, docker, sqlite

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users