Jump to content

Embyserver.exe starts then stops suddenly


Recommended Posts

Posted

Emby server working earlier today. I logged in and the Emby home screen displayed that it it needed a restart to install an update. I restarted Emby but when I logged back in it still said it needed to restart to install the updates so i decided to restart the whole PC. But after the computer restarted embytray starts but now Embyserver.exe starts then shuts down. Attached is the error log. The error part starts with.

2024-02-06 21:10:12.346 Error Main: Error in appHost.Init
    *** Error Report ***
    Version: 4.8.0.80

I tried reinstalling over the current install and got the error message:

Could not move system directory to backup.

System.IO.IOException

The process cannot access the file because it is being used by another process.

I looked through process explorer and cannot identify what process is running that is preventing the re-install.

Any help will be greatly appreciated.

Michael

 

embyserver-63842850612.txt

Posted

Hi, can you please zip up this file:

C:\Users\Dadmin\AppData\Roaming\Emby-Server\programdata\data\library.db

And attach it here? Thanks.

Posted

Huh, so when I try to compress library.db, .zip or .7z, it errors with cyclic redundancy check.

Posted

Did you turn of your server.

Do that and try again.

Posted

The server won't start. I have re-started the PC and made sure nothing is running from Emby. If some process is running that is accessing or trying to access library.db I couldn't tell you. I looked at all the processes that are running and nothing is standing out as an Emby server process.

Posted

I guess you are running windows, right ?

Start it in safe mode, and get the file that way.

Posted

Yeah running windows. I'll give that a shot.

Posted

Sry for the late reply. No can do on booting to safe mode and trying to zip or 7z the library.db. Same error cyclic redundancy check.

Capture.PNG

Posted
5 minutes ago, Procyan said:

Sry for the late reply. No can do on booting to safe mode and trying to zip or 7z the library.db. Same error cyclic redundancy check.

Capture.PNG

You might actually be having a hard drive failure: https://answers.microsoft.com/en-us/windows/forum/all/disk-drive-cannot-initialize-data-error-cyclic/595dee79-7ebd-45f3-a98e-931288181d7c

Can you scan the drive for errors?

https://www.elevenforum.com/t/check-drive-for-errors-with-chkdsk-check-disk-in-windows-11.8046/

Happy2Play
Posted (edited)
11 minutes ago, Procyan said:

Sry for the late reply. No can do on booting to safe mode and trying to zip or 7z the library.db. Same error cyclic redundancy check.

Capture.PNG

Were you trying to zip an open database?

Were there db, .wal, .shm files?

image.png.1e44299fdefa9f54da21b02a71b8bb12.png

If so you need to ensure you shut down Emby before zipping the DB.

Edited by Happy2Play
Posted

Soooo I run StableBit drivepool. Looks like I cannot scan the pool through windows and have to purchase their scanning solution. So I bought it and am now scanning the drives. The hard drive that is reporting the SMART problem isn't part of the pool. I'll report ba

Drivepool Scan.JPG

  • Thanks 1
Posted

SO it looks like it is going to days possibly longer to do the scan over the 40TB of drives. Since it is just Emby that is messed up is there a settings file I can save and import into a new installation of Emby? Will I have to have it download all the metadata again?

Posted (edited)

The file you are having issues with in

C:\Users\<user>\AppData\Roaming\Emby-Server\programdata\data\library.db

So it is on your windows drive, it is probably not part of the StableBit POOL, in the above screen show it is probably your Samsung EVO drive and that is the one you are having SMART issues on.

Use the windows tools to scan your c drive, this is where the file in question is.

 

Edited by TeamB
Happy2Play
Posted

Also have you tried copying the db to a different location?  But my questions above still apply if wal and shm files exist.

Posted

A scan of C drive through Windows revealed no errors. When trying to copy the library.db to desktop revealed the following error. So I guess it has corrupted. Is there a way to rebuild it?

Capture3.JPG

Happy2Play
Posted
5 minutes ago, Procyan said:

A scan of C drive through Windows revealed no errors. When trying to copy the library.db to desktop revealed the following error. So I guess it has corrupted. Is there a way to rebuild it?

Capture3.JPG

As you image shows all of the database are still open suggesting Emby is Running as shm and wal files only exist when a database is open or Emby is not shutdown cleanly.

If Emby is not running task manager then you should be able to delete all the shm and wal files.

Posted

I was able to delete the files. I then tried to start the server again and the .shm and .wal files re-created, but Embyserver.exe did not start.

Happy2Play
Posted
5 minutes ago, Procyan said:

I was able to delete the files. I then tried to start the server again and the .shm and .wal files re-created, but Embyserver.exe did not start.

Can you post another server log but suggests something wrong with current database.

Happy2Play
Posted (edited)

When you delete the shm and wal files are you able to copy the library.db?

Dev will have to comment on this db issue and if manually updating to 4.8.1.0 would make a difference. @Luke

2024-02-08 20:01:08.249 Error Main: Error in appHost.Init
	*** Error Report ***
	Version: 4.8.0.80
	Command line: C:\Users\Dadmin\AppData\Roaming\Emby-Server\system\EmbyServer.dll
	Operating system: Microsoft Windows 10.0.19043
	Framework: .NET 6.0.26
	OS/Process: x64/x64
	Runtime: C:/Users/Dadmin/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: C:\Users\Dadmin\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\Dadmin\AppData\Roaming\Emby-Server\system
	SQLitePCL.pretty.SQLiteException: Error: cannot rollback - no transaction is active
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
	   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
	   at SQLitePCL.pretty.StatementImpl.MoveNext()
	   at SQLitePCL.pretty.DatabaseConnection.Execute(IDatabaseConnection This, ReadOnlySpan`1 sqlUtf8)
	   at SQLitePCL.pretty.DatabaseConnection.RollbackTransaction(IDatabaseConnection This)
	   at Emby.Server.Implementations.Data.SqliteItemRepository.Initialize(SqliteUserDataRepository userDataRepo, SyncRepository syncRepo)
	   at Emby.Server.Implementations.ApplicationHost.InitDatabases()
	   at Emby.Server.Implementations.ApplicationHost.Init()
	   at EmbyServer.HostedService.StartAsync(CancellationToken cancellationToken)
	Source: SQLitePCL.pretty
	TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

 

Edited by Happy2Play
Posted

No still cannot copy over library.db.

Thanks for all of the suggestions so far. 🙂

Posted
4 minutes ago, Procyan said:

No still cannot copy over library.db.

Thanks for all of the suggestions so far. 🙂

if Emby server is not running, you have rebooted and you still can not copy the DB file you have issues with your drive.

Even StableBit thinks you have issues with your drive. Check the SMART errors and see what is going on.

Posted

OK scan is done and it detected that library.db has corrupted, none of the drives used for the movies and TV Shows  had errors. The scan was unable to recover library.db. So I uninstalled emby server from the control panel restarted the computer and was trying to install Emby server again and got an error. I really don't want to have to format the whole computer just to get Emby working again. Attached is the log from the attempted install of Emby server.

install.log

Posted

The last line of the error file says.

Error: An error occurred trying to download 'http://embydata.com/downloads/server/release9/MediaBrowser.Server.Installer.application'.

Is there a stand alone/offline installer?

Posted

So I decided to run a portable installation of Emby server, looks like I'll have to do a full re-install or just continue to run the portable installation.

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