Jump to content


Photo

emby-server doesn't autostart


  • Please log in to reply
10 replies to this topic

#1 leb0rtran OFFLINE  

leb0rtran

    Newbie

  • Members
  • 8 posts
  • Local time: 12:20 AM

Posted 28 February 2016 - 01:56 PM

Hi,

 

I installed emby on debian, but it doesn't start up automatically (not on os startup, not if I press the restart button in emby and not if emby does updates).

I can start it perfectly with

services emby-server start

as root

 

Can anybody help?



#2 gardar OFFLINE  

gardar

    Advanced Member

  • Members
  • 81 posts
  • Local time: 11:20 PM

Posted 28 February 2016 - 04:43 PM

To get it to run on boot you can try one of these:

update-rc.d emby-server defaults

or

systemctl enable emby-server.service


#3 thefirstofthe300 OFFLINE  

thefirstofthe300

    Linux Geek

  • Members
  • 1323 posts
  • Local time: 04:20 PM
  • LocationEastern Oregon

Posted 28 February 2016 - 11:01 PM

Based on how he is starting the server, it looks like he is running a Debian version that is shipping with Upstart or SysV init, so he would need to run the first command.



#4 leb0rtran OFFLINE  

leb0rtran

    Newbie

  • Members
  • 8 posts
  • Local time: 12:20 AM

Posted 29 February 2016 - 09:18 AM

I already tried the first command without luck

update-rc.d emby-server defaults

 

But should't emby restart correctly without the startup on boot if I press the restart button in the webui?

I think there a problem elsewhere.

Do I need to set some user rights which are not set at install?

I installed and started emby as root, but the process is run as normal user (also called emby at my machine) (at least the "services emby-server status" command indicates this)



#5 gstuartj OFFLINE  

gstuartj

    Advanced Member

  • Members
  • 138 posts
  • Local time: 07:20 PM

Posted 29 February 2016 - 09:25 AM

What do your server logs look like when you try to restart?



#6 hurricanehrndz OFFLINE  

hurricanehrndz

    Advanced Member

  • Developers
  • 1249 posts
  • Local time: 04:20 PM

Posted 29 February 2016 - 02:31 PM

I already tried the first command without luck

update-rc.d emby-server defaults

But should't emby restart correctly without the startup on boot if I press the restart button in the webui?

I think there a problem elsewhere.

Do I need to set some user rights which are not set at install?

I installed and started emby as root, but the process is run as normal user (also called emby at my machine) (at least the "services emby-server status" command indicates this)

What distribution are you on? Ubuntu 14.04 has a bug, and we haven't been able to figure out how to get it to successfully restart without error on that distribution. 



#7 thefirstofthe300 OFFLINE  

thefirstofthe300

    Linux Geek

  • Members
  • 1323 posts
  • Local time: 04:20 PM
  • LocationEastern Oregon

Posted 29 February 2016 - 08:01 PM

Try chkconfig --add emby-server.  If you are running Debian stable, you have SysV as the init system so update-rc.d isn't going to work.



#8 geaves OFFLINE  

geaves

    Advanced Member

  • Members
  • 158 posts
  • Local time: 12:20 AM
  • LocationEssex, UK

Posted 02 March 2016 - 09:09 AM

I have emby running on a ubuntu 14.04 server, and emby will not restart from the gui, but I use webmin as a gui frontend sometimes the emby daemon stops if a restart has been initiated, but I can restart it from within webmin and it uses this script;

 

1 description "emby-server daemon"
2
3 start on (local-filesystems and net-device-up IFACE!=lo)
4 stop on runlevel [!2345]
5
6 console log
7 respawn
8 respawn limit 10 5
9
10 kill timeout 20
11
12 script
13 set -x
14 echo "Starting $UPSTART_JOB"
15
16 # Log file
17 logger -t "$0" "DEBUG: `set`"
18 exec /usr/bin/emby-server start
19 end script
20
21 post-stop script
22 exec /usr/bin/emby-server clear
23 end script
24
 
I have no idea if this may have some relevance or even be helpful, I just know that this will restart emby, from within webmin this is also set to run at boot.


#9 hurricanehrndz OFFLINE  

hurricanehrndz

    Advanced Member

  • Developers
  • 1249 posts
  • Local time: 04:20 PM

Posted 02 March 2016 - 05:13 PM

 

I have emby running on a ubuntu 14.04 server, and emby will not restart from the gui, but I use webmin as a gui frontend sometimes the emby daemon stops if a restart has been initiated, but I can restart it from within webmin and it uses this script;

 

1 description "emby-server daemon"
2
3 start on (local-filesystems and net-device-up IFACE!=lo)
4 stop on runlevel [!2345]
5
6 console log
7 respawn
8 respawn limit 10 5
9
10 kill timeout 20
11
12 script
13 set -x
14 echo "Starting $UPSTART_JOB"
15
16 # Log file
17 logger -t "$0" "DEBUG: `set`"
18 exec /usr/bin/emby-server start
19 end script
20
21 post-stop script
22 exec /usr/bin/emby-server clear
23 end script
24
 
I have no idea if this may have some relevance or even be helpful, I just know that this will restart emby, from within webmin this is also set to run at boot.

 

Yes the restart script does not work with ubuntu 14.04. I have tried to figure out the issue and haven't been able to track it down. It works on all other distros though. 



#10 leb0rtran OFFLINE  

leb0rtran

    Newbie

  • Members
  • 8 posts
  • Local time: 12:20 AM

Posted 04 March 2016 - 12:10 PM

Hi,

 

I am running Debian GNU/Linux 8.3 (jessie) (Linux emby 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux)

chkconfig isn't installed but update-rc.d is

 

I dont think the debian side autostart is the problem, since emby cannot restart itself either.

As stated above, if i press restart in the GUI the service only stops and doesn't start

 

edit:
I tried systemctl enable emby-server and this fixed the problem with startup at boot!

But if I restart emby from the webui it still does not restart, just stop
 


Edited by leb0rtran, 04 March 2016 - 12:17 PM.


#11 hurricanehrndz OFFLINE  

hurricanehrndz

    Advanced Member

  • Developers
  • 1249 posts
  • Local time: 04:20 PM

Posted 04 March 2016 - 04:19 PM

Restart should work on Debian 8.3. You need to ensure emby is started by sytemd though. 

 

Please read through the Troubleshooting Guide for restarts and report back your findings.

https://github.com/M...g-Guide-and-FAQ

 

Meanwhile I will test on a vanilla install and report back with my findings as well. The last time I checked though Debian 8 was fine.


Edited by hurricanehrndz, 04 March 2016 - 04:21 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users