Jump to content

Emby not starting after DSM6 to DSM7 upgrade and Emby update


cubatilles

Recommended Posts

cubatilles

Hello,

I've upgraded from DSM6 to DSM7 today. After that, Emby asked me to start the initial wizard config from scratch. Googling, I've found this:

Fortunately, I have backups of the entire Emby folder on my NAS and I also make daily backups with the Server Config Backup plugin.

So I tried to follow the above guide. But after all this, I ended up with a not working installation. Apparently I can push the "Run" button for the Emby Server from the Package Center, then it says "Running", but after some seconds it switches to "Manually stopped".

I've tried to completely restart the NAS, no luck.

Through SSH, I can view some errors on the "/volume1/@appdata/EmbyServer/logs/embyserver-63799721584.txt", which is the latest one. I've attached full log here as attachmentembyserver-63799721584.txt, but next is an example of some lines which indicate errors:

...
2022-09-25 16:53:02.819 Info App: Loading Emby.Server.Sync, Version=4.6.7.0, Culture=neutral, PublicKeyToken=null
2022-09-25 16:53:02.819 Info App: Loading EmbyServer, Version=4.6.7.0, Culture=neutral, PublicKeyToken=null
2022-09-25 16:53:02.883 Error App: LoaderException: Could not load file or assembly 'MediaBrowser.Common, Version=4.7.3.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

2022-09-25 16:53:02.883 Error App: LoaderException: Could not load file or assembly 'MediaBrowser.Controller, Version=4.7.3.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

2022-09-25 16:53:02.883 Error App: LoaderException: Could not load file or assembly 'MediaBrowser.Controller, Version=4.7.3.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

2022-09-25 16:53:02.883 Error App: LoaderException: Could not load file or assembly 'MediaBrowser.Model, Version=4.7.3.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
...

Can somebody help me? I'm desperate.

Link to comment
Share on other sites

cubatilles

Finally I was able to start the server entirely deleting the installation folder after uninstalling the app. I deleted the folder "/volume1/@appdata/EmbyServer ".

Then I re-did these steps from the guide:

- install Emby 4.6.3 (or same version that was running above (dsm7 version) I installed the 4.6.7.0 version which was the version I was successfully running on DSM6.
- stop Emby
- connect with Putty to Synology, login with admin user and get root rights with: sudo -i

- copy files from old Emby share to new data location: 
cp -rv /volume1/Emby6/* /volume1/@appdata/EmbyServer Emby6 is my old renamed DSM6 Emby directory

- adjust owner from copied files: 
chown -R emby:emby /volume1/@appdata/EmbyServer
- close putty

Then I started Emby app. It started. Unfortunately, it only has an "emby" user, none of my other users appear to exist. Then I used the "Server Configuration Backup" to restore from latest working backup (from this morning before DSM7 upgrade). Ok, it restored and restarted the server.

I can now login with my normal user. But apparently Emby is trying to re-scrap all my media. Instead of recognizing the scrapped media (I have hundreds of shows and thousands of movies with customized media) it's trying to rescrap all my media. Why?

I need to restore my media library as it was before. Please tell me this is not gonna end having to scrap everything from scratch... Theorically on the previous steps I copied the metadata folder (which contain about 50GB of library data) when doing the cp command to "/volume1/@appdata/EmbyServer/metadata". So I don't understand why is it trying to scrapp all again.

Any help?

Link to comment
Share on other sites

cubatilles

Hello,

I'm not sure yet why or how, but I managed to restore my Emby setup. I followed this tip about stopping Emby through UI instead of DSM and the redoing the cp and chown operations:

After that, it started with all my libraries fine. I've checked users, libraries, metadata... and everything looks fine. Just in case a future reader has a similar problem.

I don't know why this migration to DSM7 was as painfull, and it worries me not knowing why this step fixed it, and what happens with the re-scrapping the library scanner was doing before re-doing the cp and chown operations, I guess that has been overwritten and it will not appear again as a future problem, but everything seems to be working fine.

Greetings.

 

  • Thanks 1
Link to comment
Share on other sites

The guide needs to be followed step by step as written. This works even if a failed attempt or two has been done by a user trying to do the upgrade a different way.

I've done over 200 of these migrations from DSM 6 to 7 remotely helping people out. When a user tells me it doesn't work I watch them perform the upgrade and always see a shortcut or skipped step which I'll point out. Once the guide is strictly followed it just "magically" works. :)

As long as your DSM 6 installation is still intact the migration can still be done regardless of the state of your current DSM 7 appears to be, so it's not to late to follow the guide.

I wouldn't call the migration painful per say if following the guide but there are numerous steps to follow thanks to the new security model of DSM 7.

Link to comment
Share on other sites

FrostByte
1 hour ago, cayars said:

The guide needs to be followed step by step as written. This works even if a failed attempt or two has been done by a user trying to do the upgrade a different way.

I've done over 200 of these migrations from DSM 6 to 7 remotely helping people out. When a user tells me it doesn't work I watch them perform the upgrade and always see a shortcut or skipped step which I'll point out. Once the guide is strictly followed it just "magically" works. :)

As long as your DSM 6 installation is still intact the migration can still be done regardless of the state of your current DSM 7 appears to be, so it's not to late to follow the guide.

I wouldn't call the migration painful per say if following the guide but there are numerous steps to follow thanks to the new security model of DSM 7.

The most painful part is probably the putty instructions as it seems to scare some people who aren't necessarily comfortable with command prompts and is probably the part most commonly skipped along with the shared folder permissions.

Some pictures in the actual guide might help some too.

A lot of times though people don't even see the migration steps until after they've already gone through and did it themselves because they weren't aware there were instructions.

Edited by FrostByte
Link to comment
Share on other sites

cubatilles

Hello,

@cayars, thanks for your comments. If you've assisted 200 similar migrations for sure you know better than me and you're probably right about me missing any step, but I can't figure out which step did I do wrong.

The only difference in my scenario is that I discovered these instructions after the DSM7 migration was done, and, initially, DSM7 updated to a higher Emby version than the one previously installed on DSM6. Then I uninstalled and reinstalled the corresponding DSM7 Emby version. Maybe this fucked up something at first. But, when I did manually empty the "/volume1/@appdata/EmbyServer" folder and began again, I still ended with the single emby user and initial wizard. It was at the third try, when I re-did the steps stopping Emby from inside the app instead from DSM, which it worked flawlessly.

Regarding @FrostBytecomments, I've been working for some years with Linux servers for my job as sysadmin, so SSH to the NAS and copying a folder and setting up permissions is something very basic I'm familiar with (though I never had to access my home NAS via ssh before as DSM gives a good compromise between powerful UI and easy administration). I'm sure my mistake was not related to the cp and chown steps.

As I said on my last comment, everything is working fine now (and I tested a lot of things), but, is there any "cleaning" procedure available on Emby which I can run to make Emby verify there are no problems with the database and the internal Emby configuration?

Thank you both for your attention.

Link to comment
Share on other sites

FrostByte
1 minute ago, cubatilles said:

Regarding @FrostBytecomments, I've been working for some years with Linux servers for my job as sysadmin, so SSH to the NAS and copying a folder and setting up permissions is something very basic I'm familiar with (though I never had to access my home NAS via ssh before as DSM gives a good compromise between powerful UI and easy administration). I'm sure my mistake was not related to the cp and chown steps.

 

Roger.  It was a general statement only in response to what cayars said and based on what I see a lot, nothing to do with you. 

Most of the problems in the forum when upgrading DSM 6-7 are the steps using Putty and shared folder permissions.

  • Thanks 2
Link to comment
Share on other sites

On 9/26/2022 at 2:53 PM, cubatilles said:

Hello,

@cayars, thanks for your comments. If you've assisted 200 similar migrations for sure you know better than me and you're probably right about me missing any step, but I can't figure out which step did I do wrong.

The only difference in my scenario is that I discovered these instructions after the DSM7 migration was done, and, initially, DSM7 updated to a higher Emby version than the one previously installed on DSM6. Then I uninstalled and reinstalled the corresponding DSM7 Emby version. Maybe this fucked up something at first. But, when I did manually empty the "/volume1/@appdata/EmbyServer" folder and began again, I still ended with the single emby user and initial wizard. It was at the third try, when I re-did the steps stopping Emby from inside the app instead from DSM, which it worked flawlessly.

Regarding @FrostBytecomments, I've been working for some years with Linux servers for my job as sysadmin, so SSH to the NAS and copying a folder and setting up permissions is something very basic I'm familiar with (though I never had to access my home NAS via ssh before as DSM gives a good compromise between powerful UI and easy administration). I'm sure my mistake was not related to the cp and chown steps.

As I said on my last comment, everything is working fine now (and I tested a lot of things), but, is there any "cleaning" procedure available on Emby which I can run to make Emby verify there are no problems with the database and the internal Emby configuration?

Thank you both for your attention.

It's obvious you know what you're doing or you wouldn't have gotten it all to work! :) 

Much of my comments is for anyone reading along that might be in a similar situation . If they follow the guide you referenced they too will be fine.

The reality of the situation is DSM 7 changed the location of the Emby install. So you just need to know the from and to locations for a mass file copy.
Then set permissions and ownership. The migration guide has extra steps to help prevent problems or to help a user do any needed upgrades first to get to the point of being able to install a DSM 7 counterpart of the same version (avoids other possible problem).

Setting permissions for the media files to other locations Emby can access is different as well but is standard in DSM 7.

Not sure what happened your first couple tries but what I do in general is install through package manager and watch for the option to start the package after install or not.  I'll choose no.  That way when the file copy is being done, no files are open or in use. That should help with two things. First is running the DSM 7 version which would setup a new single user (sounds like you did this) and since we don't need to run config nor do we want Emby running we just copy everything over which will bring all your config and users.  Once the permissions and ownership are set after the copy, starting Emby won't run the configuration but use the info you already had.

Carlo

 

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