Jump to content

Problem with database


Recommended Posts

taromisaki
Posted

I'm  a problem with database, now my server emby is inactive. I tried restoring the database but after a few weeks the error returns.

Please help me.....

embyserver-63851549010.txt

Neminem
Posted

It looks like a permissions issue.

SQLitePCL.pretty.SQLiteException: ReadOnly: attempt to write a readonly database

taromisaki
Posted

I put 755 to all files in /var/lib/emby/data/....

It still does not work

Neminem
Posted

Tbh I have no clue about linux permissions.

I just found that log entry.

 

Neminem
Posted

I have no clue, I was trying to point you in the right direction.

In you new logs i see

System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/var/lib/emby/data/lastversion.txt' is denied.

and 

SQLitePCL.pretty.SQLiteException: ReadOnly: attempt to write a readonly database - PRAGMA journal_mode

 

Have you look in the server documentation Linux | Emby Documentation

There is a link to something about permissions An Introduction to Linux Permissions | DigitalOcean

kikinjo
Posted

Try this 3 commands:

sudo setfacl -m u:emby:rwx /var/lib/emby/
sudo setfacl -R -m u:emby:rwx /var/lib/emby/
sudo setfacl -R -d -m u:emby:rwx /var/lib/emby/

restart emby and test

 

taromisaki
Posted

I gave the command:

sudo /opt/emby-server/bin/emby-server

because "Error in appHost.Init "

Now it work!

 

Happy2Play
Posted

I would look at the discussion here.  As it appear to be the same issue.

Jumped to the middle.

 

taromisaki
Posted (edited)

I updated to version 4.8.7.0 and now emby won't start. I read an error in the database, I restored library.db and replaced the corrupt file with the restored one.

Now dont' work. How do I get it to restart?

embyserver-63851793097.txt

Edited by taromisaki
taromisaki
Posted (edited)

What solution do you propose?

Edited by taromisaki
Happy2Play
Posted
7 hours ago, taromisaki said:

I updated to version 4.8.7.0 and now emby won't start. I read an error in the database, I restored library.db and replaced the corrupt file with the restored one.

Now dont' work. How do I get it to restart?

embyserver-63851793097.txt 22.04 kB · 2 downloads

What exactly did you do as you have a corrupt database.

Corrupt: database disk image is malformed

I guess the question becomes was the db corrupt before the update?

taromisaki
Posted

 

19 hours ago, Happy2Play said:

What exactly did you do as you have a corrupt database.

Corrupt: database disk image is malformed

I guess the question becomes was the db corrupt before the update?

The database was not corrupt before the upgrade. However, in recent months he has become easily corrupted. I did the database recovery guide via:
sqlite3 library.db ".recover" | sqlite3 library-recovered.db
and I replaced the library with the copy of the recovered one.
But not often does it return to being corrupt. Is there a method to analyze the library and identify where it is corrupt?

Posted

HI, are you ever force killing the emby server process? That is probably the leading way to cause this.

taromisaki
Posted (edited)
54 minutes ago, Luke said:

HI, are you ever force killing the emby server process? That is probably the leading way to cause this.

Yes I had some unexpected server crashes a while ago. Are there any remedies for this problem?

Edited by taromisaki
Posted

HI, remedies for what exactly? If you're referring to a server crash, we'd have to look at a specific example of that:

Thanks.

Happy2Play
Posted
42 minutes ago, taromisaki said:

Yes I had some unexpected server crashes a while ago. Are there any remedies for this problem?

I guess it really depends on what/how the database is corrupted and what is actually corrupt within the database. 

taromisaki
Posted (edited)
5 minutes ago, Happy2Play said:

I guess it really depends on what/how the database is corrupted and what is actually corrupt within the database. 

What could be the possible solution?
Format and reinstall ubuntu server and restore a working emby backup?

Edited by taromisaki
Happy2Play
Posted (edited)
4 minutes ago, taromisaki said:

What could be the possible solution?
Format and reinstall ubuntu server and restore a working emby backup?

In the end if it is a Corrupt: database disk image is malformed if recovery process does not fix the issue you have to create a new library.db and is now really problematic as all library configs only exist within the database.

So it may be a matter of how may database backups you maintian and if all of them are corrupt?

Edited by Happy2Play

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