ubuntuusers.de

mpd und sonata

Status: Gelöst | Ubuntu-Version: Xubuntu 11.04 (Natty Narwhal)
Antworten |

kerasi

(Themenstarter)

Anmeldungsdatum:
7. Juli 2008

Beiträge: 277

shaft@lubuntu:~$ sudo service mpd stop
 * Stopping Music Player Daemon mpd                                                                                                        [ OK ] 
shaft@lubuntu:~$ sudo service mpd start-create-db
 * Starting Music Player Daemon mpd
* creating /var/lib/mpd/tag_cache... 
playlist directory is not a directory: "/var/lib/mpd/playlists"
Failed to load database: Failed to open database file "/var/lib/mpd/tag_cache": No such file or directory
database: Couldn't stat parent directory of db file "/var/lib/mpd/tag_cache": No such file or directory

ich hatte den mpd ordner von /var/lib/mpd nach /home/shaft/ verschoben aber da kamen diese meldungen da habe ich ihn gelöscht und nochmals den create befehl gemacht

shaft@lubuntu:~$ ls -l /etc/mpd.conf
-rw-r----- 1 mpd audio 12404 2011-08-05 17:37 /etc/mpd.conf

was muss ich jetzt machen?

das ist in nun in /home/shaft

shaft@lubuntu:~$ cd .mpd/
shaft@lubuntu:~/.mpd$ ls -la
insgesamt 36
drwxr-xr-x  9 shaft shaft 4096 2011-08-07 10:39 .
drwxr-xr-x 37 shaft shaft 4096 2011-08-07 10:38 ..
drwxr-xr-x  2 shaft shaft 4096 2011-08-07 10:39 db
drwxr-xr-x  2 shaft shaft 4096 2011-08-07 10:39 mpd.db
drwxr-xr-x  2 shaft shaft 4096 2011-08-07 10:39 mpd.error
drwxr-xr-x  2 shaft shaft 4096 2011-08-07 10:39 mpd.log
drwxr-xr-x  2 shaft shaft 4096 2011-08-07 10:39 mpd.pid
drwxr-xr-x  2 shaft shaft 4096 2011-08-07 10:39 mpdstate
drwxr-xr-x  2 shaft shaft 4096 2011-08-07 10:39 playlists
haft@lubuntu:~/.mpd$ sudo service mpd stop
 * Stopping Music Player Daemon mpd                                                                                                        [ OK ] 
shaft@lubuntu:~/.mpd$ sudo service mpd start-create-db
 * Starting Music Player Daemon mpd                                                                                                                * creating /var/lib/mpd/tag_cache... 
playlist directory is not a directory: "/var/lib/mpd/playlists"
Failed to load database: Failed to open database file "/var/lib/mpd/tag_cache": No such file or directory
database: Couldn't stat parent directory of db file "/var/lib/mpd/tag_cache": No such file or directory

liegt vielleicht hier das problem? die files in .mpd habe ich selber erstellt

cornix Team-Icon

Avatar von cornix

Anmeldungsdatum:
9. März 2007

Beiträge: 4763

Wohnort: Ringenberg

Irgendwas hast du da falsch verstanden. Lasall wollte, dass du die von dir in deinem Homeverzeichnis erstellten Dateien verschiebst, IMHO kannst du sie auch direkt löschen.

Nun hast du die Struktur /var/lib/mpd/ gelöscht und musst sie neu erstellen

sudo mkdir -p /var/lib/mpd/
sudo chown -R mpd:audio /var/lib/mpd/

Mpd stoppen, Datenbank neu anlegen - im Fehlerfall Ausgabe posten, ansonsten prüfen, ob die Aktualisierung der DB in Sonata nun geht.

kerasi

(Themenstarter)

Anmeldungsdatum:
7. Juli 2008

Beiträge: 277

shaft@lubuntu:~/.mpd$ sudo mkdir -p /var/lib/mpd/
[sudo] password for shaft: 
shaft@lubuntu:~/.mpd$ sudo chown -R mpd:audio /var/lib/mpd/
shaft@lubuntu:~/.mpd$ sudo service mpd stop
 * Stopping Music Player Daemon mpd                                                                                                        [ OK ] 
shaft@lubuntu:~/.mpd$ sudo service mpd start-create-db
 * Starting Music Player Daemon mpd                                                                                                                * creating /var/lib/mpd/tag_cache... 
playlist directory is not a directory: "/var/lib/mpd/playlists"
Failed to load database: Failed to open database file "/var/lib/mpd/tag_cache": No such file or directory
haft@lubuntu:/var/lib/mpd$ ls -la
insgesamt 12
drwxr-xr-x  2 mpd  audio 4096 2011-08-07 11:03 .
drwxr-xr-x 54 root root  4096 2011-08-07 11:02 ..
-rw-r--r--  1 mpd  audio  344 2011-08-07 11:03 tag_cache

cornix Team-Icon

Avatar von cornix

Anmeldungsdatum:
9. März 2007

Beiträge: 4763

Wohnort: Ringenberg

kerasi schrieb:

playlist directory is not a directory: "/var/lib/mpd/playlists"

Arg.

sudo mkdir -p /var/lib/mpd/playlists
sudo chown -R mpd:audio /var/lib/mpd/

und nochmal...

kerasi

(Themenstarter)

Anmeldungsdatum:
7. Juli 2008

Beiträge: 277

shaft@lubuntu:/var/lib/mpd$ sudo mkdir -p /var/lib/mpd/playlists
[sudo] password for shaft: 
shaft@lubuntu:/var/lib/mpd$ ls -la
insgesamt 32
drwxr-xr-x  4 mpd  audio 4096 2011-08-07 11:38 .
drwxr-xr-x 54 root root  4096 2011-08-07 11:02 ..
-rw-------  1 mpd  audio   16 2011-08-07 11:38 .esd_auth
drwxr-xr-x  2 root root  4096 2011-08-07 11:35 playlists
drwx------  2 mpd  audio 4096 2011-08-07 11:38 .pulse
-rw-------  1 mpd  audio  256 2011-08-07 11:38 .pulse-cookie
-rw-r--r--  1 mpd  audio  183 2011-08-07 11:08 state
-rw-r--r--  1 mpd  audio  344 2011-08-07 11:03 tag_cache
shaft@lubuntu:/var/lib/mpd$ sudo chown -R mpd:audio /var/lib/mpd/
shaft@lubuntu:/var/lib$ sudo service mpd stop
 * Stopping Music Player Daemon mpd                                                                                                        [ OK ] 
shaft@lubuntu:/var/lib$ sudo service mpd start-create-db
 * Starting Music Player Daemon mpd                                                                                                                * creating /var/lib/mpd/tag_cache...

shaft@lubuntu:/var/lib/mpd$ sudo mkdir -p /var/lib/mpd/playlists
[sudo] password for shaft: 
shaft@lubuntu:/var/lib/mpd$ ls -la
insgesamt 32
drwxr-xr-x  4 mpd  audio 4096 2011-08-07 11:38 .
drwxr-xr-x 54 root root  4096 2011-08-07 11:02 ..
-rw-------  1 mpd  audio   16 2011-08-07 11:38 .esd_auth
drwxr-xr-x  2 root root  4096 2011-08-07 11:35 playlists
drwx------  2 mpd  audio 4096 2011-08-07 11:38 .pulse
-rw-------  1 mpd  audio  256 2011-08-07 11:38 .pulse-cookie
-rw-r--r--  1 mpd  audio  183 2011-08-07 11:08 state
-rw-r--r--  1 mpd  audio  344 2011-08-07 11:03 tag_cache
shaft@lubuntu:/var/lib/mpd$ sudo chown -R mpd:audio /var/lib/mpd/

dann unter sonata bibliothek rechte maustaste gesamte bibliothek aktualisieren aber da rührt sich noch ncihts dauert es so lange? ich habe zwar sehr viele Lieder aber müsste da kein fortschrittsbalken zu sehen sein?

kerasi

(Themenstarter)

Anmeldungsdatum:
7. Juli 2008

Beiträge: 277

wie kann ich die datenbank löschen ???

jetzt sieht mein home verzeichnis so aus

rwx------  4 shaft shaft   4096 2011-07-09 14:34 .mozilla
drwxr-xr-x  9 shaft shaft   4096 2011-08-07 10:39 .mpd.old

ich habe da 2 ordner music eines ausgegraut und das andere sieht so aus wie das von der diskette kann es daran liegen das es wenn es automatisch gemountes ist 2 mal da ist?

das ist da wenn ich

haft@lubuntu:/media$ ls -la
insgesamt 40
drwxr-xr-x  4 root root     4096 2011-08-07 12:15 .
drwxr-xr-x 22 root root     4096 2011-07-14 19:56 ..
lrwxrwxrwx  1 root root        7 2011-07-09 12:39 floppy -> floppy0
drwxr-xr-x  2 root root     4096 2011-07-09 12:39 floppy0
drwxrwx---  1 root plugdev 28672 2011-08-07 11:08 music

wenn ich das programm icon unten rechts bei sonata gehe steht da angehalten

Bilder

cornix Team-Icon

Avatar von cornix

Anmeldungsdatum:
9. März 2007

Beiträge: 4763

Wohnort: Ringenberg

Steht vielleicht was interessantes im log?

cat /var/log/mpd/mpd.log

Zu dem mount-Problem müsste Lasall noch mal gucken - ich hätte das prinzipiell anders gelöst (symlinks erlauben und nutzen).

Gruß, cornix

kerasi

(Themenstarter)

Anmeldungsdatum:
7. Juli 2008

Beiträge: 277

shaft@lubuntu:/media$ cat /var/log/mpd/mpd.log
Aug 07 10:29 : state_file: failed to create /var/lib/mpd/state: No such file or directory
Aug 07 11:03 : state_file: failed to open /var/lib/mpd/state: No such file or directory
Aug 07 11:03 : update: Failed to open directory /media/music: Permission denied
Aug 07 11:38 : mixer: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
Aug 07 11:38 : update: Failed to open directory /media/music: Permission denied
Aug 07 11:40 : mixer: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
Aug 07 11:40 : update: Failed to open directory /media/music: Permission denied
Aug 07 11:56 : mixer: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
Aug 07 11:56 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:03 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:05 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:05 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:10 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:10 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:10 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:11 : mixer: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
Aug 07 12:11 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:11 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:16 : mixer: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
Aug 07 12:16 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:22 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:23 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:24 : mixer: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
Aug 07 12:24 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:28 : update: Failed to open directory /media/music: Permission denied
Aug 07 12:28 : update: Failed to open directory /media/music: Permission denied

cornix Team-Icon

Avatar von cornix

Anmeldungsdatum:
9. März 2007

Beiträge: 4763

Wohnort: Ringenberg

Eigentümer und Rechtemaske des Musikverzeichnis:

ls -l /media/music

Komplette fstab, bitte:

cat /etc/fstab

Wenn wir den Zugriff auf das Musikverzeichnis haben, müssen wir uns als nächstes um den Output kümmern, da passt auch etwas nicht. Aber eins nach dem anderen.

Gruß, cornix

kerasi

(Themenstarter)

Anmeldungsdatum:
7. Juli 2008

Beiträge: 277

shaft@lubuntu:/media$ ls -l /media/music
insgesamt 372
drwxrwx--- 1 root plugdev  4096 2011-02-27 21:42 80'
drwxrwx--- 1 root plugdev  8192 2011-04-14 20:35 backinthedays
drwxrwx--- 1 root plugdev 16384 2011-01-22 14:33 ellinika
drwxrwx--- 1 root plugdev 49152 2011-01-22 13:19 funkymix
drwxrwx--- 1 root plugdev  8192 2011-03-06 21:23 german_rap
drwxrwx--- 1 root plugdev 65536 2011-01-22 13:20 HD_Music_Clips
drwxrwx--- 1 root plugdev     0 2011-01-22 13:20 kuschelrock
drwxrwx--- 1 root plugdev 98304 2011-07-08 17:55 mp3
drwxrwx--- 1 root plugdev     0 2011-07-05 13:36 MSOCache
drwxrwx--- 1 root plugdev  4096 2011-01-22 14:43 music_clips
drwxrwx--- 1 root plugdev 49152 2011-02-20 18:25 oldschool
drwxrwx--- 1 root plugdev  4096 2011-01-22 13:20 Papa_greek
drwxrwx--- 1 root plugdev  4096 2011-05-24 14:19 $RECYCLE.BIN
drwxrwx--- 1 root plugdev  4096 2011-01-22 13:21 remixe2
drwxrwx--- 1 root plugdev     0 2011-01-22 13:21 soundtracks
drwxrwx--- 1 root plugdev     0 2010-08-18 20:16 System Volume Information
drwxrwx--- 1 root plugdev 65536 2011-01-22 13:26 ultimix
shaft@lubuntu:/media$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda9 during installation
UUID=e82c4f17-fa70-442a-9f07-5a0f95d55843 /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda11 during installation
UUID=1cb9690d-5fb1-44e9-ba88-86e04ba924f0 /home           ext4    defaults        0       2
# swap was on /dev/sda10 during installation
UUID=8a7e5f02-73bc-44a7-a114-97cfa446176c none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
# mein music verzeichniss
UUID=464C96747AFB6EB9 /media/music ntfs rw,auto,users,nls=utf8,umask=007,gid=46  0  0

cornix Team-Icon

Avatar von cornix

Anmeldungsdatum:
9. März 2007

Beiträge: 4763

Wohnort: Ringenberg

Füge den Benutzer mpd der Gruppe plugdev hinzu. Das sollte es gewesen sein. Da hätte ich auch früher drauf kommen können...

Zum Output: Entferne in der mpd.conf den Abschnitt zu Alsa und mach einen für PulseAudio rein, ist mMn wesentlich einfacher. Siehe auch MPD/Server#PulseAudio.

kerasi

(Themenstarter)

Anmeldungsdatum:
7. Juli 2008

Beiträge: 277

Hi und big thanks ☺

was sol lich da denn genau reinschreiben?

alsa auskommentieren?

# 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            "My ALSA Device"
        device          "hw:0,0"        # optional
        format          "44100:16:2"    # optional
        mixer_device    "default"       # optional
        mixer_control   "PCM"           # optional
        mixer_index     "0"             # optional

und wie lautet genau der befehl mpd in plugdev hinzuzufügen?

so habe ich das jetzt gemacht

# 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 PulseAudio output:
#
audio_output {
        type    "pulse"
        name    "MPD PulseAudio Ausgabe"
        server  "pulseaudio"   # optional
        #sink    "alsa_output" # optional
}
#
# An example of an ALSA output:
#
#audio_output {
#       type            "alsa"
#       name            "My ALSA Device"
#       device          "hw:0,0"        # optional
#       format          "44100:16:2"    # optional
#       mixer_device    "default"       # optional
#       mixer_control   "PCM"           # optional
#       mixer_index     "0"             # optional
#}

ist das ok so

shaft@lubuntu:/media$ id
uid=1000(shaft) gid=1000(shaft) Gruppen=1000(shaft),4(adm),20(dialout),24(cdrom),46(plugdev),110(lpadmin),114(admin),115(sambashare)
shaft@lubuntu:/media$ id mpd
uid=110(mpd) gid=29(audio) Gruppen=29(audio),46(plugdev)

cornix Team-Icon

Avatar von cornix

Anmeldungsdatum:
9. März 2007

Beiträge: 4763

Wohnort: Ringenberg

sudo usermod -aG plugdev mpd 

Siehe Benutzer und Gruppen.

/etc/mpd.conf

music_directory			"/media/music/"
playlist_directory		"/var/lib/mpd/playlists"
db_file				"/var/lib/mpd/tag_cache"
log_file			"/var/log/mpd/mpd.log"
pid_file			"/var/run/mpd/pid"
state_file			"/var/lib/mpd/state"
user				"mpd"
bind_to_address			"localhost"
input {
        plugin "curl"
}
audio_output {
        type    "pulse"
        name    "MPD PulseAudio Ausgabe"
}
filesystem_charset		"UTF-8"
id3v1_encoding			"UTF-8"

Siehe MPD.

edit: wenn du nicht PA sondern Alsa direkt verwendet willst, nimmst du statt den Zeilen:

audio_output {
        type    "pulse"
        name    "MPD PulseAudio Ausgabe"
}

diese:

audio_output {
       type            "alsa"
       name            "Soundkarte"
}

edit2: beim ersten Befehl Reihenfolge vertauscht, natürlich "Gruppe->Benutzer" - korrigiert

kerasi

(Themenstarter)

Anmeldungsdatum:
7. Juli 2008

Beiträge: 277

so super ich habe meine musiktitel jetzt drinen aber leider wird der song nicht abgespielt

aber fast haben wirs ☺

ach ja bei mir in der mpd.conf ist der eintrag

# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#
#port                           "6600"

auskommentiert ist das ok so?

Bilder

cornix Team-Icon

Avatar von cornix

Anmeldungsdatum:
9. März 2007

Beiträge: 4763

Wohnort: Ringenberg

cornix schrieb:

Steht vielleicht was interessantes im log?

cat /var/log/mpd/mpd.log