Jump to content

Emby starts, but just stops after a second.


Go to solution Solved by Crevv,

Recommended Posts

Posted

Following the steps of a tutorial I watched online, but as soon as I reached the step where I validated the status of Emby, this pops up:

 

sudo systemctl status emby-server
○ emby-server.service - Emby Server is a personal media server with apps on just about every device
     Loaded: loaded (/lib/systemd/system/emby-server.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Wed 2024-01-24 09:51:31 UTC; 3s ago
    Process: 30966 ExecStart=/opt/emby-server/bin/emby-server (code=exited, status=0/SUCCESS)
   Main PID: 30966 (code=exited, status=0/SUCCESS)
        CPU: 1.324s

Jan 24 09:51:31 homecrev emby-server[30966]:         TargetSite: Void UpdateStatusAfterSocketErrorAndThrowException(Sys>
Jan 24 09:51:31 homecrev emby-server[30966]:            at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThr>
Jan 24 09:51:31 homecrev emby-server[30966]:            at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, >
Jan 24 09:51:31 homecrev emby-server[30966]:            at System.Net.Sockets.Socket.Bind(EndPoint localEP)
Jan 24 09:51:31 homecrev emby-server[30966]:            at Emby.Server.Implementations.HttpServer.KestrelHost.KestrelLi>
Jan 24 09:51:31 homecrev emby-server[30966]:            at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Socket>
Jan 24 09:51:31 homecrev emby-server[30966]:
Jan 24 09:51:31 homecrev emby-server[30966]: Info Main: Shutdown complete
Jan 24 09:51:31 homecrev systemd[1]: emby-server.service: Deactivated successfully.
Jan 24 09:51:31 homecrev systemd[1]: emby-server.service: Consumed 1.324s CPU time.

As usual, I see it inactive, so I start it up with "sudo systemctl start emby-server". It starts up fine but becomes inactive after a second or so. If anyone needs logs or anything, please tell me how to pull said logs as I'm new to Linux and all these CLI stuff. Thank you and have a great day ahead!

  • Solution
Posted

Okay, I may have forgotten a move I did earlier before this install. My bad. But for anyone who encounters this, try "sudo ufw status", if it's enabled and 8096 isn't listed, disable the firewall and allow port 8096. I also realized that Jellyfin is also using port 8096 and was still running before this install, that's why Emby won't start, so disable Jellyfin too if you have that. I'm sorry that I haven't thought of this enough, but Emby works fine as expected. Thank you!

  • Thanks 1
Posted

HI, thanks for following up.

  • 11 months later...
Posted

I am having this same issue on Ubuntu 24.04 LTS.  UFW is disabled.  What logs/data can I provide to assist in troubleshooting? Thank you.image.thumb.png.db53483fdd18539935698df6066f0829.png

Posted
19 hours ago, TheKrizzz said:

I am having this same issue on Ubuntu 24.04 LTS.  UFW is disabled.  What logs/data can I provide to assist in troubleshooting? Thank you.image.thumb.png.db53483fdd18539935698df6066f0829.png

Hi @TheKrizzzis this a brand new install of emby server?

Posted

Thanks for your response.  No, I did the original install and it looked good.  I ran the basic setup wizard and then started copying my backup data from my original Windows Emby build into the corresponding Linux directories.  This blew it up.  I ran:

sudo apt-get purge emby-server

 Then rebooted.

I ran the install again, but the service seems to stop immediately.  And if I look for the

/var/lib/emby

 directory, where I copied my backup files,, it does not exist on the system.  Also mentioned in this thread.

 

Posted
2 hours ago, TheKrizzz said:
/var/lib/emby

 directory, where I copied my backup files,, it does not exist on the system.  Also mentioned in this thread.

 

If the path is gone then so are the config and data files for the Emby server. And if the server can't create new config files and data then it can't start. Hence the errors you see from systemd.

 

Posted

Thanks @Q-Droid

I'm a Linux n00b and not really sure how I can fix that.  I ran the installer as root using this command.

dpkg -i emby-server-deb_4.8.10.0_amd64.deb

Any advice is appreciated.

Posted (edited)

Installing Emby creates the emby user, group and the /var/lib/emby directory so if it's gone that's likely something you did after the fact.

If you're sure that /var/lib/emby is not there then I would uninstall the Emby package then delete the emby user. This would force the installer to recreate the user and the home path /var/lib/emby the next time you install the software.

What are you using to restore the data from Windows and what are you trying to preserve?

 

 

 

 

Edited by Q-Droid
Posted

Thanks again @Q-Droid

14 hours ago, Q-Droid said:

Installing Emby creates the emby user, group and the /var/lib/emby directory so if it's gone that's likely something you did after the fact.

If you're sure that /var/lib/emby is not there then I would uninstall the Emby package then delete the emby user. This would force the installer to recreate the user and the home path /var/lib/emby the next time you install the software.

This hit the nail on the head!  I didn't realize that the purge command left the emby user and that was exactly what was holding up the reinstall.  After I removed it, the install worked beautifully.  Thank you!

14 hours ago, Q-Droid said:

What are you using to restore the data from Windows and what are you trying to preserve?

Method: I manually backed up all the files in C:\Users\{user}\AppData\Roaming\Emby-Server\programdata and then copied them into /var/lib/emby (which has the same sub-directories).

Purpose: I have a lot of custom Collections that I built, as well as a significant number of movies/shows that I needed to manually retag (usually using the imdb UID).  I really don't want to lose all of this work. 

Next Steps:

  • I'm not sure where this data is stored in the sub-folders of the backup, but ideally I could just bring back the key pieces I need. (See below).
  • I read installed the backup plug-in on the source server, but it only looks like it grabs a subset of the data I exported.  Not sure if this is a better way to backup/restore?

image.png.211962f762c15b49e19d96e26d14f222.png

Posted

Then be prepared to lose some of your customizations and metadata. Going from Windows to Linux is going to change your library paths and your server will have to rescan all of your media.

I don't use Collections or customize metadata so can't tell you how much you'll get to preserve or what gets lost in the process.

 

Posted

No worries.  I'll experiment and see what I can migrate. Thx again for the help.

Posted

Please keep us posted. Thanks.

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