owntone / owntone-server

Linux/FreeBSD DAAP (iTunes) and MPD audio server with support for AirPlay 1 and 2 speakers (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
https://owntone.github.io/owntone-server
GNU General Public License v2.0
2.1k stars 237 forks source link

Starting forked-daapd service #126

Closed erwstout closed 7 years ago

erwstout commented 9 years ago

So I'm pretty new to Ubuntu/Linux so I'm sure that I'm missing something obvious. I installed/configured forked-dapd from the GIT Source https://github.com/ejurgensen/forked-daapd and followed the directions in the Install file. I didn't see any errors populate, but I notice that forked-daapd isn't running as a service. I tried starting the service like this:

service forked-daapd start

and

sudo /etc/init.d/forked-daapd start

With no results. The repository is cloned to /home/ericstout/forked-daapd/ so I also tried (this is probably very wrong):

sudo /home/ericstout/forked-daapd/fork-daapd start

I noticed that in /home/ericstout/forked-daapd/src/ there is an application forked-daapd, I tried double clicking it to start (nothing happens) and also tried:

sudo /home/ericstout/forked-daapd/src/fork-daapd start

With no avail. How do I get the service to actually run? Any help would be greatly appreciated.

I am running Ubuntu 14.04 LTS. I had a version of forked-daapd running earlier, and it was working aside from not actually allowing me to play music from my remote machines in iTunes (12.1) and found a fix was pushed to the GIT Hub Repository, thus why I purged and started over.

Hope I gave you as much info as you need, let me know if you need more. Thanks!

erwstout commented 9 years ago

So there were a few things that needed to be done for this to work correctly.

First was running forked-daapd which was achieved by this:

sudo forked-daapd

This seemed to work, but when checking the running processes, forked dapped was not there, so I checked the log file and saw that there was an error initializing the database, and it was a permissions issue. For now, I set the access to root and the username in the forked-daapd config file to root as well and boom! We have a media server.

Since this is internal only we can get by with root for now, but its a good idea to create a new user to access it.

Hope this helps anyone that might have gotten stuck in the same spot as me.

bjoerns1983 commented 8 years ago

The simple problem is that forked-daapd does not provide an init file when you build it yourself using git. Thats why you cant control it via /etc/init.d/forked-daapd. I would recommend you download the forked-daapd package for trusty (http://packages.ubuntu.com/trusty/forked-daapd), extract the init script, move it to /etc/init.d and make it executeable.

hardheid commented 7 years ago

Taking these steps have worked well for me and I am pleased to have a working forked-daapd service. The service, however, does not run on boot and I am required to run 'sudo service forked-daapd restart/ force-reload' on every new session. The service seems to be running on boot though and I am under suspicion that the issue may lie with Avahi. I have tried changing the user, root permissions, rc-update.d, but nothing seems to get it going.

Does anyone else have this issue?

ejurgensen commented 7 years ago

How to start a service depends on the distro you are using. If you are using Ubuntu, it is probably systemd, so you should place the .service file in /etc/systemd/system. Or just install forked-daapd with apt-get, which will do this for you (but you will then have an older version of forked-daapd).

davidhq commented 7 years ago

It's strange that this is not really mentioned in INSTALL:

You get this done automatically only via apt-get