MPD automatisch starten unter Ubuntu

+A -A
Autor
Beitrag
Lotion
Inventar
#1 erstellt: 16. Nov 2013, 13:20
Hallo zusammen,

bin Linux Anfänger bzw. eine Vorstufe davon. Habe es geschafft MPD unter Ubuntu zu installieren, so dass über MPad und MPdroid Musik (FLAC) abgespielt wird. Leider startet MPD nur von Hand mit sudo /etc/init.d/mpd start. Da ich keinen Bildschirm zum Musikspielen über iPad benötige ist das ziemlich nervig.

Ich schaffe es nicht, dass MPD automatisch bei Sytemstart gestartet wird. Habe bereits im crontab die Zeile @reboot root /etc/init.d/mpd restart eingefügt. Ohne Erfolg! Weiters habe ich in autostart/mpd.desktop angelegt und sudo /etc/init.d/mpd start eingefügt. Auch hier wird mpd nicht gestartet.

Ach so, das habe ich auch schon probiert:

user@xxxxxx:~$ sudo update-rc.d mpd defaults
[sudo] password for user:
System start/stop links for /etc/init.d/mpd already exist.

Was mache ich falsch? Linux ist wohl für mich als Windowsnutzer zu kompliziert. Habe mir bereits die Finger wund gegoogelt und finde nicht die richtige Lösung! Bei Windows und früher DOS ist das ein Kinderspiel...

Danke für eure Hilfe!
smutbert
Stammgast
#2 erstellt: 16. Nov 2013, 14:39
Die Zeile im crontab und die mpd.desktop Datei in autostart kannst du beide wieder entfernen bzw. löschen, das ist der falsche Weg. Die .desktop Dateien in /etc/autostart und in ~/.config/autostart sind dazu da um Programme, die du für deine Desktopumgebung benötigst automatisch zu starten.
Und auch der cron Eintrag ist überflüssig. cron ist dazu da Programme (die oft der Wartung dienen) in regelmäßigen Abständen zu starten.

Normalweise will man aber, dass mpd automatisch einmal beim Systemstart gestartet wird und dann weiterläuft. Wenn mpd nicht verwendet wird, verbraucht es ohnehin kaum Resourcen.
Für den Start gibt es das Skript etc/init.d/mpd und Start/Stopp Links in den Verzeichnissen /etc/rcS.d und /etc/rc0.d - /etc/rc6.d. Die Ausgabe von

user@xxxxxx:~$ sudo update-rc.d mpd defaults
[sudo] password for user:
System start/stop links for /etc/init.d/mpd already exist.

zeigt, dass eigentlich alles da ist und das Problem woanders liegen muss.

Ein paar weitere Details könnten helfen, zB welche Ubuntuversion verwendest du und was hast du sonst noch nach der mpd Installation unternommen?


und schau dir die Datei /etc/init.d/mpd an. Dort kann man mpd noch einmal extra (de)aktivieren, mit einer Zeile wie:


## Change this to prevent MPD from being started as a system service (for
## example, if you want to run it from a regular user account)
START_MPD=true

(alles was mit # beginnt, ist nur ein Kommentar)
Lotion
Inventar
#3 erstellt: 16. Nov 2013, 21:14
Hallo Smutbert,

Du scheinst Dich gut auszukennen. Prima!

Anbei die /etc/init.d/mpd:

#!/bin/sh

### BEGIN INIT INFO
# Provides: mpd
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: autofs $network $named alsa-utils pulseaudio
# Should-Stop: autofs $network $named alsa-utils pulseaudio
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Music Player Daemon
# Description: Start the Music Player Daemon (MPD) service
# for network access to the local audio queue.
### END INIT INFO

. /lib/lsb/init-functions

PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=mpd
DESC="Music Player Daemon"
DAEMON=/usr/bin/mpd
MPDCONF=/etc/mpd.conf
START_MPD=true

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

if [ -n "$MPD_DEBUG" ]; then
set -x
MPD_OPTS=--verbose
fi

DBFILE=$(sed -n 's/^[[:space:]]*db_file[[:space:]]*"\?\([^"]*\)\"\?/\1/p' $MPDCONF)
PIDFILE=$(sed -n 's/^[[:space:]]*pid_file[[:space:]]*"\?\([^"]*\)\"\?/\1/p' $MPDCONF)
USER=`awk 'BEGIN{ao=0} /[ \t]*audio_output[ \t]*{/{ ao = 1 } /[ \t]*}/{ ao = 0 } /^[ \t]*user[ \t]*/{ if (ao == 0) user = $2 } END{ print substr(user, 2, length(user) - 2) }' $MPDCONF`

mpd_start () {
if [ "$START_MPD" != "true" ]; then
log_action_msg "Not starting MPD: disabled by /etc/default/$NAME".
exit 0
fi

log_daemon_msg "Starting $DESC" "$NAME"

if [ -z "$PIDFILE" -o -z "$DBFILE" ]; then
log_failure_msg \
"$MPDCONF must have db_file and pid_file set; cannot start daemon."
exit 1
fi

PIDDIR=$(dirname "$PIDFILE")
if [ ! -d "$PIDDIR" ]; then
mkdir -m 0755 $PIDDIR

if dpkg-statoverride --list --quiet /run/mpd > /dev/null; then
# if dpkg-statoverride is used update it with permissions there
dpkg-statoverride --force --quiet --update --add $( dpkg-statoverride --list --quiet /run/mpd ) 2> /dev/null
else
# use defaults
chown mpd:audio $PIDDIR
fi
fi

start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" \
--exec "$DAEMON" -- $MPD_OPTS "$MPDCONF"
log_end_msg $?
}

mpd_stop () {
if [ -z "$PIDFILE" ]; then
log_failure_msg \
"$MPDCONF must have pid_file set; cannot stop daemon."
exit 1
fi

log_daemon_msg "Stopping $DESC" "$NAME"
start-stop-daemon --stop --quiet --oknodo --retry 5 --pidfile "$PIDFILE" \
--exec $DAEMON
log_end_msg $?
}

# note to self: don't call the non-standard args for this in
# {post,pre}{inst,rm} scripts since users are not forced to upgrade
# /etc/init.d/mpd when mpd is updated
case "$1" in
start)
mpd_start
;;
stop)
mpd_stop
;;
status)
status_of_proc -p $PIDFILE $DAEMON $NAME
;;
restart|force-reload)
mpd_stop
mpd_start
;;
force-start)
mpd_start
;;
force-restart)
mpd_stop
mpd_start
;;
force-reload)
mpd_stop
mpd_start
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload}"
exit 2
;;
esac


Als nächstes noch meine mpd.cofig


# An example configuration file for MPD
# See the mpd.conf man page for a more detailed description of each parameter.


# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
#
music_directory"/home/thomas/Musik"
#
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
#
playlist_directory"/home/thomas/Playlists"
#
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
#
db_file"/var/lib/mpd/tag_cache"
#
# These settings are the locations for the daemon log files for the daemon.
# These logs are great for troubleshooting, depending on your log_level
# settings.
#
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog, otherwise logging is disabled.
#
log_file"/var/log/mpd/mpd.log"
#
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
#
pid_file"/run/mpd/pid"
#
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server
# state will be reset on server start up.
#
state_file"/var/lib/mpd/state"
#
# The location of the sticker database. This is a database which
# manages dynamic information attached to songs.
#
sticker_file "/var/lib/mpd/sticker.sql"
#
###############################################################################


# General music daemon options ################################################
#
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
#
#user"thomas"
#
# This setting specifies the group that MPD will run as. If not specified
# primary group of user specified with "user" setting will be used (if set).
# This is useful if MPD needs to be a member of group such as "audio" to
# have permission to use sound card.
#
#group "nogroup"
#
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon. Choose any if you want
# to have mpd listen on every address
#
# For network
bind_to_address"192.168.178.24"
#
# And for Unix Socket
#bind_to_address"/run/mpd/socket"
#
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#
port"6600"
#
# This setting controls the type of information which is logged. Available
# setting arguments are "default", "secure" or "verbose". The "verbose" setting
# argument is recommended for troubleshooting, though can quickly stretch
# available resources on limited hardware storage.
#
log_level"verbose"
#
# If you have a problem with your MP3s ending abruptly it is recommended that
# you set this argument to "no" to attempt to fix the problem. If this solves
# the problem, it is highly recommended to fix the MP3 files with vbrfix
# (available as vbrfix in the debian archive), at which
# point gapless MP3 playback can be enabled.
#
gapless_mp3_playback"yes"
#
# Setting "restore_paused" to "yes" puts MPD into pause mode instead
# of starting playback after startup.
#
#restore_paused "no"
#
# This setting enables MPD to create playlists in a format usable by other
# music players.
#
#save_absolute_paths_in_playlists"no"
#
# This setting defines a list of tag types that will be extracted during the
# audio file discovery process. The complete list of possible values can be
# found in the mpd.conf man page.
#
metadata_to_use"artist,album,title,track,name,genre,date,composer,performer,disc"
#
# This setting enables automatic update of MPD's database when files in
# music_directory are changed.
#
auto_update "yes"
#
# Limit the depth of the directories being watched, 0 means only watch
# the music directory itself. There is no limit by default.
#
#auto_update_depth "3"
#
###############################################################################


# Symbolic link behavior ######################################################
#
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links outside of the configured music_directory.
#
#follow_outside_symlinks"yes"
#
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#
#follow_inside_symlinks"yes"
#
###############################################################################


# Zeroconf / Avahi Service Discovery ##########################################
#
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#
zeroconf_enabled"yes"
#
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network.
#
zeroconf_name"Music Player"
#
###############################################################################


# Permissions #################################################################
#
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#
#password "password@read,add,control,admin"
#
# This setting specifies the permissions a user has who has not yet logged in.
#
default_permissions "read,add,control,admin"
#
###############################################################################


# Input #######################################################################
#

input {
plugin "curl"
# proxy "proxy.isp.com:8080"
# proxy_user "user"
# proxy_password "password"
}

#
###############################################################################

# Audio Output ################################################################
#
# MPD supports various audio output types, as well as playing through multiple
# audio outputs at the same time, through multiple audio_output settings
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
#
# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs> for examples of
# other audio outputs.
#
# An example of an ALSA output:
#
audio_output {
type"alsa"
name"XMOS 2 ALSA iBasso"
device"hw:1,0"# optional
#format"44100:16:2"# optional
#mixer_type "hardware" # optional
#mixer_device"default"# optional
#mixer_control"PCM"# optional
#mixer_index"0"# optional
}
mixer_type "disabled"
#
# An example of an OSS output:
#
#audio_output {
#type"oss"
#name"My OSS Device"
#device"/dev/dsp"# optional
#format"44100:16:2"# optional
#mixer_type "hardware" # optional
#mixer_device"/dev/mixer"# optional
#mixer_control"PCM"# optional
#}
#
# An example of a shout output (for streaming to Icecast):
#
#audio_output {
#type"shout"
#encoding"ogg"# optional
#name"My Shout Stream"
#host"localhost"
#port"8000"
#mount"/mpd.ogg"
#password"hackme"
#quality"5.0"
#bitrate"128"
#format"44100:16:1"
#protocol"icecast2"# optional
#user"source"# optional
#description"My Stream Description"# optional
#url "http://example.com" # optional
#genre"jazz"# optional
#public"no"# optional
#timeout"2"# optional
#mixer_type "software" # optional
#}
#
# An example of a recorder output:
#
#audio_output {
# type "recorder"
# name "My recorder"
# encoder "vorbis" # optional, vorbis or lame
# path "/var/lib/mpd/recorder/mpd.ogg"
## quality "5.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
# format "44100:16:1"
#}
#
# An example of a httpd output (built-in HTTP streaming server):
#
#audio_output {
#type"httpd"
#name"My HTTP Stream"
#encoder"vorbis"# optional, vorbis or lame
#port"8000"
#bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
#quality"5.0"# do not define if bitrate is defined
#bitrate"128"# do not define if quality is defined
#format"44100:16:1"
#max_clients "0" # optional 0=no limit
#}
#
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
#
#audio_output {
#type"pulse"
#name"My Pulse Output"
#server"remote_server"# optional
#sink"remote_server_sink"# optional
#}
#
# An example of a winmm output (Windows multimedia API).
#
#audio_output {
#type"winmm"
#name"My WinMM output"
#device"Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#or
#device"0"# optional
#mixer_type"hardware"# optional
#}
#
# An example of an openal output.
#
#audio_output {
#type"openal"
#name"My OpenAL output"
#device"Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#}
#
## Example "pipe" output:
#
#audio_output {
#type"pipe"
#name"my pipe"
#command"aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
#command"AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
#command"nc example.org 8765"
#format"44100:16:2"
#}
#
## An example of a null output (for no audio output):
#
#audio_output {
#type"null"
#name"My Null Output"
#mixer_type "none" # optional
#}
#
# This setting will change all decoded audio to be converted to the specified
# format before being passed to the audio outputs. By default, this setting is
# disabled.
#
#audio_output_format"44100:16:2"
#
# If MPD has been compiled with libsamplerate support, this setting specifies
# the sample rate converter to use. Possible values can be found in the
# mpd.conf man page or the libsamplerate documentation. By default, this is
# setting is disabled.
#
#samplerate_converter"disabled" #"Fastest Sinc Interpolator"
#
###############################################################################


# Normalization automatic volume adjustments ##################################
#
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "off", "album", "track" or "auto". "auto" is a special mode that
# chooses between "track" and "album" depending on the current state of
# random playback. If random playback is enabled then "track" mode is used.
# See <http://www.replaygain.org> for more details about ReplayGain.
# This setting is off by default.
#
#replaygain"album"
#
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
#
#replaygain_preamp"0"
#
# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
# By default this setting is disabled.
#
#replaygain_missing_preamp"0"
#
# This setting enables or disables ReplayGain limiting.
# MPD calculates actual amplification based on the ReplayGain tags
# and replaygain_preamp / replaygain_missing_preamp setting.
# If replaygain_limit is enabled MPD will never amplify audio signal
# above its original level. If replaygain_limit is disabled such amplification
# might occur. By default this setting is enabled.
#
#replaygain_limit"yes"
#
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has
# equal "loudness". This setting is disabled by default.
#
#volume_normalization"no"
#
###############################################################################


# MPD Internal Buffering ######################################################
#
# This setting adjusts the size of internal decoded audio buffering. Changing
# this may have undesired effects. Don't change this if you don't know what you
# are doing.
#
#audio_buffer_size"2048"
#
# This setting controls the percentage of the buffer which is filled before
# beginning to play. Increasing this reduces the chance of audio file skipping,
# at the cost of increased time prior to audio playback.
#
#buffer_before_play"10%"
#
###############################################################################


# Resource Limitations ########################################################
#
# These settings are various limitations to prevent MPD from using too many
# resources. Generally, these settings should be minimized to prevent security
# risks, depending on the operating resources.
#
#connection_timeout"60"
#max_connections"10"
#max_playlist_length"16384"
#max_command_list_size"2048"
#max_output_buffer_size"8192"
#
###############################################################################


# Client TCP keep alive #######################################################
#
# For clients connected by TCP on supported platforms.
# Allows detection of dangling connections due to clients disappearing from
# the network without closing their connections.
#
# This is not usually necessary but can be useful in cases such as wifi connectected
# clients that go in and out of network range or turn off wifi without closing their
# connections. Combined with low max_connections this can soon cause clients to not
# be able to connect.
#
#
# Enable tcp keepalive on new client connections (default is "no")
#
#tcp_keep_alive "no"
#
# Time in seconds since the last communication on the connection and before
# the keepalive probing is started. (default is 7200 seconds)
#tcp_keep_alive_idle "7200"
#
# Interval in seconds between keepalive probes, once a probe started.
# (default is 75 seconds)
#tcp_keep_alive_interval "75"
#
# Number of failed probes before the connection is pronounced dead and
# the connection is closed. (default is 9 times)
#tcp_keep_alive_count "9"
#
###############################################################################

# Character Encoding ##########################################################
#
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting.
#
filesystem_charset"UTF-8"
#
# This setting controls the encoding that ID3v1 tags should be converted from.
#
id3v1_encoding"UTF-8"
#
###############################################################################


# SIDPlay decoder #############################################################
#
# songlength_database:
# Location of your songlengths file, as distributed with the HVSC.
# The sidplay plugin checks this for matching MD5 fingerprints.
# See http://www.c64.org/HVSC/DOCUMENTS/Songlengths.faq
#
# default_songlength:
# This is the default playing time in seconds for songs not in the
# songlength database, or in case you're not using a database.
# A value of 0 means play indefinitely.
#
# filter:
# Turns the SID filter emulation on or off.
#
#decoder {
# plugin "sidplay"
# songlength_database "/media/C64Music/DOCUMENTS/Songlengths.txt"
# default_songlength "120"
# filter "true"
#}
#
###############################################################################


Ich habe nach der Anleitung aus EinsNull 1/2012 dann noch den Lighttpd-Server installiert, damit meine Cover in MPad angezeigt werden.

Sonst habe ich nichts gemacht!

Ich hoffe, dass Du mit den Infos etwas anfangen kannst. Brauchst Du noch andere Dateien?

Ach so, es ist Ubuntu 13.10.
smutbert
Stammgast
#4 erstellt: 17. Nov 2013, 00:00
Die /etc/init.d/mpd hättest du nicht posten müssen, die schaut auf jedem System gleich aus. Etwas an der deiner Konfigurationsdatei ist mir aufgefallen :

In einigen Zeilen scheinen keine Leerzeichen zu sein, wie z.B. in der Zeile

metadata_to_use"artist,album,title,track,name,genre,date,composer,performer,disc"

aber wahrscheinlich sind nur Tabulatoren beim Einfügen ins Forum verloren gegangen, dann ist dieser Einwand natürlich gegenstandslos.


Nachdem ich Debian verwende und Ubuntu sich ja doch in einigen Punkten und gerade beim Systemstart unterscheidet, habe ich mir auch ein Ubuntu in einer virtuellen Maschine installiert und dort auch mpd installiert, mit dem Ergebnis, dass eigentlich alles auf Anhieb funktioniert hat
Also müssen wir den Fehler eingrenzen. Mit dem ersten Befehl finden wir heraus, ob mpd nach dem Systemstart (und ohne dass du ihn extra manuell startet) tatsächlich nicht läuft:


ps ax | grep mpd


und mit dem nächsten werfen wir einen Blick in die mpd Protokolldatei


cat /var/log/mpd/mpd.log


Poste einfach die Ausgaben dieser Befehle und wenn sie länger als ein paar Zeilen sind, dann postest du einfach nur die letzten paar Zeilen. Die Konfiguration deines Audioausgabegeräts paßt wahrscheinlich, so wie so jetzt ist, unter Ubuntu auch nicht, aber darum kümmern wir uns, wenn wir mpd einmal zum laufen bekommen haben…


[Beitrag von smutbert am 17. Nov 2013, 00:02 bearbeitet]
Lotion
Inventar
#5 erstellt: 17. Nov 2013, 00:14
Hallo smutbert,

möchtest Du Dich über Teamviewer direkt auf den Rechner verbinden?

Ach so, die fehlenden Lücken sind Tabs, d.h. in meiner Datei nicht vorhanden

Anbei die Ausgaben:

/etc$ ps ax | grep mpd
5334 ? Sl 0:06 gedit /etc/mpd.txt
17549 pts/1 S+ 0:00 grep --color=auto mpd


und jetzt ein Ausschnitt der log-Datei von gestern (letztes gehörtes Lied):

Nov 16 00:50 : database: get song: Supertramp/Breakfast in America SHM/10 - Child of Vision.wav
Nov 16 00:50 : playlist: queue song 9:"Supertramp/Breakfast in America SHM/10 - Child of Vision.wav"
Nov 16 00:50 : inotify: initializing inotify
Nov 16 00:50 : decoder_thread: probing plugin sndfile
Nov 16 00:50 : decoder: audio_format=44100:32:2, seekable=true
Nov 16 00:50 : alsa: opened hw:1,0 type=HW
Nov 16 00:50 : alsa: format=S32_LE (Signed 32 bit Little Endian)
Nov 16 00:50 : alsa: buffer: size=16..131072 time=362..2972155
Nov 16 00:50 : alsa: period: size=8..65536 time=181..1486078
Nov 16 00:50 : alsa: default period_time = buffer_time/4 = 500000/4 = 125000
Nov 16 00:50 : alsa: buffer_size=22050 period_size=5513
Nov 16 00:50 : output: opened plugin=alsa name="XMOS 2 ALSA iBasso" audio_format=44100:32:2
Nov 16 00:50 : inotify: watching music directory
Nov 16 00:50 : avahi: Service group changed to state 1
Nov 16 00:50 : avahi: Service group is REGISTERING
Nov 16 00:50 : avahi: Service group changed to state 2
Nov 16 00:50 : avahi: Service 'Music Player' successfully established.
Nov 16 00:52 : decoder_thread: probing plugin sndfile
Nov 16 00:52 : decoder: audio_format=44100:32:2, seekable=true
Nov 16 00:52 : player_thread: played "Supertramp/Breakfast in America SHM/09 - Casual Conversations.wav"
Nov 16 00:55 : state_file: Saving state file /var/lib/mpd/state
Nov 16 01:00 : playlist: stop
Nov 16 01:00 : output: closed plugin=alsa name="XMOS 2 ALSA iBasso"
Nov 16 01:00 : state_file: Saving state file /var/lib/mpd/state
Nov 16 01:11 : state_file: Saving state file /var/lib/mpd/state
Nov 16 01:11 : avahi: Shutting down interface
Nov 16 01:11 : listen: listen_global_finish called
Nov 16 01:11 : db_finish took 0.010000 seconds
no message buffer overruns


Ich bin mir nicht sicher, ob z.B. 24/96 FLACs wirklich so ausgegeben werden oder in 16/44. Leider zeigt mein DAC das nicht an.


[Beitrag von Lotion am 17. Nov 2013, 00:15 bearbeitet]
smutbert
Stammgast
#6 erstellt: 17. Nov 2013, 00:59
Hi,

mpd läuft also tatsächlich nicht. Was sagt


ls /etc/rc?.d/*mpd


was steht in /var/log/boot.log und gibt es in /var/log/upstart/ eine Datei, die (dem Namen nach) etwas mit mpd zu tun hat und wenn ja, was steht drin?

Teamviewer können wir schon ausprobieren, obwohl ich eigentlich schon Wert auf OpenSource Software lege und mir Teamviewer etwas suspekt ist. Außerdem wird das mit meiner langsamen Internetverbindung bestimmt kein Spaß.
Momentan tappe ich egal ob mit oder ohne Teamviewer im Dunkeln


Und schließlich deine FLAC Dateien werden auf 44100 geresampelt und mit 16 Bit wiedergegeben, ich bin mir aber noch nicht 100%ig sicher wieso das so ist. Ist das ein DAC mit USB Anschluß, der für nichts anderes genutzt wird?
Lotion
Inventar
#7 erstellt: 17. Nov 2013, 00:59
Vielleicht hilft das weiter, was auftritt, wenn ich den Dienst ohne sudo starten will:


user@rechner:/$ /etc/init.d/mpd start
sed: kann /etc/mpd.conf nicht lesen: Keine Berechtigung
sed: kann /etc/mpd.conf nicht lesen: Keine Berechtigung
awk: cannot open /etc/mpd.conf (Permission denied)
* Starting Music Player Daemon mpd
* /etc/mpd.conf must have db_file and pid_file set; cannot start daemon.


Evtl. eine Rechteproblem?
Lotion
Inventar
#8 erstellt: 17. Nov 2013, 01:09
Der DAC ist ein USB-DAC von iBasso mit XMOS Chip, der max. 24/192 kann.


:/$ ls /etc/rc?.d/*mpd
/etc/rc0.d/K14mpd /etc/rc2.d/S30mpd /etc/rc4.d/S30mpd /etc/rc6.d/K14mpd
/etc/rc1.d/K14mpd /etc/rc3.d/S30mpd /etc/rc5.d/S30mpd


Jetzt wird es wohl interessanter:


* Starting mDNS/DNS-SD daemon[ OK ]
* Starting SMB/CIFS File Server[ OK ]
* Starting network connection manager[ OK ]
* Starting System V initialisation compatibility[ OK ]
* Starting modem connection manager[ OK ]
* Starting CUPS printing spooler/server[ OK ]
* Starting configure virtual network devices[ OK ]
Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
* Starting cups-browsed - Bonjour remote printer browsing daemon[ OK ]
* Starting Samba Auto-reload Integration[ OK ]
* Starting configure network device security[ OK ]
* Starting configure network device[ OK ]
* Starting AppArmor profiles 
[ OK ]
* Starting configure network device security[ OK ]
* Starting configure network device[ OK ]
* Setting up X socket directories... 
[ OK ]
* Stopping Samba Auto-reload Integration[ OK ]
* Starting OSS Proxy Daemon osspd 
[ OK ]
speech-dispatcher disabled; edit /etc/default/speech-dispatcher
* Stopping System V initialisation compatibility[ OK ]
* Starting System V runlevel compatibility[ OK ]
* Starting [ OK ]
* Starting automatic crash report generation[ OK ]
* Starting [ OK ]
* Starting [ OK ]
* Starting [ OK ]
* Starting save kernel messages[ OK ]
* Starting Plex Media Server[ OK ]
* Starting [ OK ]
* Starting anac(h)ronistic cron[ OK ]
* Starting ACPI daemon[ OK ]
* Starting regular background program processing daemon[ OK ]
* Starting deferred execution scheduler[ OK ]
* Starting [ OK ]
* Starting crash report submission daemon[ OK ]
* Starting CPU interrupts balancing daemon[ OK ]
* Stopping save kernel messages[ OK ]
* Stopping anac(h)ronistic cron[ OK ]
Failed to bind to '192.168.178.24:6600': Cannot assign requested address
* Stopping Restore Sound Card State[ OK ]
no message buffer overruns
* Starting Music Player Daemon mpd 
[fail]


In /var/log/upstart gibt es keine Datei, die irgendwo mpd im Namen hat.

Ich habe alles gem. Anleitung aus der EinsNull 1/2012 aufgesetzt. Leider war der Autor nicht sehr gewissenhaft und ausführlich. Es ging nicht problemfrei. Habe aber nur an der mpd.conf etwas geändert.

Soll ich die bind-to-address Zeile in der mpd.conf mal auskommentieren?
Lotion
Inventar
#9 erstellt: 17. Nov 2013, 01:48
So, jetzt scheint es zu klappen. Habe die bind_to_address Zeile auskommentiert. Jetzt startet der MPD beim Booten.

Anbei die boot.log:

* Starting mDNS/DNS-SD daemon[ OK ]
* Starting system logging daemon[ OK ]
* Starting network connection manager[ OK ]
* Starting System V initialisation compatibility[ OK ]
* Starting modem connection manager[ OK ]
* Starting configure network device[ OK ]
* Starting configure network device[ OK ]
* Starting configure network device security[ OK ]
* Starting configure network device security[ OK ]
* Starting configure network device security[ OK ]
* Starting configure network device[ OK ]
Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
* Starting CUPS printing spooler/server[ OK ]
* Starting AppArmor profiles 
[ OK ]
* Starting cups-browsed - Bonjour remote printer browsing daemon[ OK ]
* Starting Samba Auto-reload Integration[ OK ]
* Stopping Samba Auto-reload Integration[ OK ]
* Setting up X socket directories... 
[ OK ]
* Starting OSS Proxy Daemon osspd 
[ OK ]
speech-dispatcher disabled; edit /etc/default/speech-dispatcher
* Stopping System V initialisation compatibility[ OK ]
listen: bind to '0.0.0.0:6600' failed: Address already in use (continuing anyway, because binding to '[::]:6600' succeeded)
path: path_set_fs_charset: fs charset is: UTF-8
pcm: libsamplerate converter 'Fastest Sinc Interpolator'
wildmidi: configuration file does not exist: /etc/timidity/timidity.cfg
database: reading DB
* Starting System V runlevel compatibility[ OK ]
* Starting [ OK ]
* Starting automatic crash report generation[ OK ]
* Starting [ OK ]
* Starting ACPI daemon[ OK ]
* Starting anac(h)ronistic cron[ OK ]
* Starting [ OK ]
* Starting [ OK ]
* Starting save kernel messages[ OK ]
* Starting Plex Media Server[ OK ]
* Starting [ OK ]
* Starting crash report submission daemon[ OK ]
* Starting regular background program processing daemon[ OK ]
* Starting deferred execution scheduler[ OK ]
* Starting CPU interrupts balancing daemon[ OK ]
* Stopping save kernel messages[ OK ]
* Stopping anac(h)ronistic cron[ OK ]
disabling the last.fm playlist plugin because account is not configured
disabling the soundcloud playlist plugin because API key is not set
daemon: opening pid file
daemon: daemonized!
daemon: writing pid file
* Starting Music Player Daemon mpd 
[ OK ]
saned disabled; edit /etc/default/saned
* Starting [ OK ]
* Restoring resolver state... 
[ OK ]
* Stopping Restore Sound Card State[ OK ]


VIelen Dank für Deine Hilfe!!!

Gruß

Thomas
smutbert
Stammgast
#10 erstellt: 17. Nov 2013, 13:16
Keine Ursache — Außerdem hast du den Fehler eigentlich selbst erkannt. (und dass sich Startskripte nicht als normaler Benutzer, also ohne sudo ausführen lassen ist normal)


Geschützter Hinweis (zum Lesen markieren):

Im Nachhinein ist sowieso alles klar: Der Networkmanager, der die Netzwerkschnittstelle verwaltet startet erst später oder zumindest erhält die Netzwerkschnittstelle ihre IP Adresse erst später. Beim Systemstart kann mpd sich also noch gar nicht an die angegebene IP Adresse hängen…


Wenn du noch der Sache mit dem USB DAC nachgehen willst: Zuerst solltest du sicher gehen, dass die Samplerate und -tiefe des DAC auch unter Linux unterstützt werden. Meistens stehen die unterstützten Formate der Audiointerfaces unter ALSA in einer Datei unter /proc/asound/cardx. Die Ausgabe der folgenden Befehle sollten eine Übersicht der Interfaces liefern, die 96 bzw. 192kHz und 24 bzw. 32bit Samplingrate und -tiefe unterstützen:


egrep -R '(192|96)000' /proc/asound/card[0-9]


egrep -R 'S(24|32)' /proc/asound/card[0-9]

(es gibt allerdings auch ALSA Treiber, bei denen man die unterstützten Formate so nicht herausfinden kann, dann muss man sich etwas anderes einfallen lassen)


[Beitrag von smutbert am 17. Nov 2013, 22:04 bearbeitet]
Suche:
Das könnte Dich auch interessieren:
PC und Software automatisch starten
eraser am 08.03.2010  –  Letzte Antwort am 10.03.2010  –  7 Beiträge
guter ipod/pad-client für mpd gesucht
contadinus am 09.04.2011  –  Letzte Antwort am 15.04.2011  –  4 Beiträge
Music Player Demon ( MPD)
MBU am 20.08.2013  –  Letzte Antwort am 26.08.2013  –  7 Beiträge
Problem mit Bose Companion unter Ubuntu 9.04
Surva am 14.05.2009  –  Letzte Antwort am 15.05.2009  –  3 Beiträge
Frage zur soxr-Integration in MPD
contadinus am 06.03.2016  –  Letzte Antwort am 08.03.2016  –  6 Beiträge
guter Client für MPD gesucht
contadinus am 25.01.2013  –  Letzte Antwort am 29.01.2013  –  5 Beiträge
Frage zu Client für MPD
contadinus am 10.09.2013  –  Letzte Antwort am 12.09.2013  –  4 Beiträge
Klingt Ubuntu besser als Windows!
Taritan am 23.11.2006  –  Letzte Antwort am 23.11.2006  –  3 Beiträge
GMPC - MPD- song in Liste einreihen
tobbes_ am 27.08.2015  –  Letzte Antwort am 28.08.2015  –  3 Beiträge
Linux Ubuntu 7.10 Fachbuch als PDF?
Apalone am 28.06.2008  –  Letzte Antwort am 29.06.2008  –  5 Beiträge
Foren Archiv
2013

Anzeige

Produkte in diesem Thread Widget schließen

Aktuelle Aktion

Partner Widget schließen

  • beyerdynamic Logo
  • DALI Logo
  • SAMSUNG Logo
  • TCL Logo

Forumsstatistik Widget schließen

  • Registrierte Mitglieder925.721 ( Heute: 3 )
  • Neuestes Mitgliedharry_kleinmann
  • Gesamtzahl an Themen1.551.057
  • Gesamtzahl an Beiträgen21.536.975

Hersteller in diesem Thread Widget schließen