You are not logged in.

#1 2007-08-19 19:07:28

azwethinkweiz
Member
Registered: 2007-01-25
Posts: 101

MPD+Sonata

Sonata keeps crashing and saying not connected. So I do /etc/rc.d/mpd restart and it stops mpd succesfully but does not start it. Sometimes after reboot they will work fine...and sometimes when I open Sonata its not connecting. Anyone else having problems with MPD+Sonata? Or does anyone know how I moght fix this problem?


"The hardest thing is rendering a moment moving to fast to endure"

Offline

#2 2007-08-19 22:46:03

Preacher
Member
From: UK
Registered: 2006-09-26
Posts: 46

Re: MPD+Sonata

Just out of curiosity, have you properly setup your mpd.conf file, either in /etc/ or /home/user ?

Post your conf file and/or any errors and we can have a look see.


To be a preacher requires two apparently contradictory qualities: confidence and humility.

Offline

#3 2007-08-20 00:55:42

azwethinkweiz
Member
Registered: 2007-01-25
Posts: 101

Re: MPD+Sonata

Here is my /etc/mpd.conf. All should be ok because it was working fine earlier and suddenly started crashing on me. Also there are no errors in the log since 8/12/07 and they are errors regarding connecting to alsa...but that is fixed and ok now. Anywho here is the mpd.conf file...take a look maybe there is something wrong. Thanks.

Also I DO realize it says this is the example file...but I copied the sample to /etc/mpd.conf so it should be ok


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

######################## REQUIRED PATHS ########################
#music_directory                 "~/music"
#playlist_directory              "~/playlists"
#db_file                         "~/mpd.db"
#log_file                        "~/mpd.log"
#error_file                      "~/mpd.error"

music_directory                 "/home/nate/Music"
playlist_directory              "/var/lib/mpd/playlists"
db_file                         "/var/lib/mpd/mpd.db"
log_file                        "/var/log/mpd/mpd.log"
error_file                      "/var/log/mpd/mpd.error"

# Note: ~ is the home directory of user set in the "user" option
################################################################


######################## OPTIONAL PATHS ########################
#
# If you wish to use mpd --kill to stop MPD, then you must
# specify a file here in which to store MPD's process ID.
#
#pid_file                        "~/.mpd/mpd.pid"
pid_file                        "/var/run/mpd/mpd.pid"
#
# If specified, MPD will save its current state (playlist,
# current song, playing/paused, etc.) at exit.  This will be
# used to restore the session the next time it is run.
#
#state_file                      "~/.mpd/mpdstate"
state_file                      "/var/lib/mpd/mpdstate"
#
################################################################


######################## DAEMON OPTIONS ########################
#
# If started as root, MPD will drop root privileges and run as
# this user instead.  Otherwise, MPD will run as the user it was
# started by.  If left unspecified, MPD will not drop root
# privileges at all (not recommended).

user                            "nate"
# The address and port to listen on.
#
bind_to_address                 "127.0.0.1"
#bind_to_address                 "any"
#port                            "6600"
#
# Controls the amount of information that is logged.  Can be
# "default", "secure", or "verbose".
#
#log_level                       "default"
#
################################################################


########################## PERMISSIONS #########################
#
# MPD can require that users specify a password before using it.
# You may specify one ore more here, along with what users who
# log in with that password are allowed to do.
#
#password                        "password@read,add,control,admin"
#
# Specifies what permissions a user who has not logged in with a
# password has.  By default, all users have full access to MPD
# if no password is specified above, or no access if one or
# more passwords are specified.
#
#default_permissions             "read,add,control,admin"
#
################################################################


########################## AUDIO OUTPUT ########################
#
# MPD supports many audio output types, as well as playing
# through multiple audio outputs at the same time.  You can
# specify one or more here.  If you don't specify any, MPD will
# automatically scan for a usable audio output.
#
# 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
#}
#
# An example of an OSS output:
#
#audio_output {
#        type                    "oss"
#        name                    "My OSS Device"
#        device                  "/dev/dsp"   # optional
#        format                  "44100:16:2" # optional
#}
#
# An example of a shout output (for streaming to Icecast):
#
#audio_output {
#        type                    "shout"
#        name                    "My Shout Stream"
#        host                    "localhost"
#        port                    "8000"
#        mount                   "/mpd.ogg"
#        password                "hackme"
#        quality                 "5.0"
#        bitrate                 "128"
#        format                  "44100:16:1"
#        user                    "source"                # optional
#        description             "My Stream Description" # optional
#        genre                   "jazz"                  # optional
#        public                  "no"                    # optional
#}
#
# Force all decoded audio to be converted to this format before
# being passed to the audio outputs.
#
#audio_output_format             "44100:16:2"
#
################################################################


############################# MIXER ############################
#
# MPD needs to know what mixer settings to change when you
# adjust the volume.  If you don't specify one here, MPD will
# pick one based on which ones it was compiled with support for.
#
# An example for controlling an ALSA mixer:
#
#mixer_type                      "alsa"
#mixer_device                    "default"
#mixer_control                   "PCM"
#
# An example for controlling an OSS mixer:
#
#mixer_type                      "oss"
#mixer_device                    "/dev/mixer"
#mixer_control                   "PCM"
#
# If you want MPD to adjust the volume of audio sent to the
# audio outputs, you can tell it to use the software mixer:
#
#mixer_type                      "software"
#
################################################################


######################### NORMALIZATION ########################
#
# Specifies the type of ReplayGain to use.  Can be "album" or
# "track".  ReplayGain will not be used if not specified.  See
# <http://www.replaygain.org> for more details.
#
#replaygain                      "album"
#
# Sets the pre-amp used for files that have ReplayGain tags.
#
#replaygain_preamp               "0"
#
# Enable on the fly volume normalization.  This will cause the
# volume of all songs played to be adjusted so that they sound
# as though they are of equal loudness.
#
#volume_normalization            "no"
#
################################################################


########################### BUFFERING ##########################
#
# The size of the buffer containing decoded audio.  You probably
# shouldn't change this.
#
#audio_buffer_size               "2048"
#
# How much of the buffer to fill before beginning to play.
#
#buffer_before_play              "0%"
#
# Similar options for the HTTP stream buffer.  If you hear
# skipping while playing HTTP streams, you may wish to increase
# these.
#
#http_buffer_size                "128"
#http_prebuffer_size             "25%"
#
################################################################


########################### HTTP PROXY #########################
#
# Specifies the HTTP proxy to use for playing HTTP streams.
#
#http_proxy_host                 "proxy.isp.com"
#http_proxy_port                 "8080"
#http_proxy_user                 "user"
#http_proxy_password             "password"
#
################################################################


############################# LIMITS ###########################
#
# These are various limits to prevent MPD from using too many
# resources.  You should only change them if they start
# restricting your usage of MPD.
#
#connection_timeout              "60"
#max_connections                 "5"
#max_playlist_length             "16384"
#max_command_list_size           "2048"
#max_output_buffer_size          "8192"
#
################################################################


###################### CHARACTER ENCODINGS #####################
#
# If file or directory names do not display correctly, then you
# may need to change this.  In most cases it should be either
# "ISO-8859-1" or "UTF-8".  You must recreate your database
# after changing this (use mpd --create-db).
#
#filesystem_charset              "ISO-8859-1"
#
# The encoding that ID3v1 tags should be converted from.
#
#id3v1_encoding                  "ISO-8859-1"
#
################################################################


######################### OTHER OPTIONS ########################
#
# The metadata types MPD will recognize.
#
#metadata_to_use                  "artist,album,title,track,name,genre,date,composer,performer,disc"
#
# Enable this if you wish to use your MPD created playlists in
# other music players.
#save_absolute_paths_in_playlists "no"
#
################################################################

Last edited by azwethinkweiz (2007-08-20 00:56:48)


"The hardest thing is rendering a moment moving to fast to endure"

Offline

#4 2007-08-20 09:31:53

Preacher
Member
From: UK
Registered: 2006-09-26
Posts: 46

Re: MPD+Sonata

Have looked at the mpd.conf file and everything looks fine.  I assume that you have removed the comments from the ALSA output and mixer sections to resolve your ALSA problem.
First stop the mpd daemon, then from the console, try

mpd --verbose

Post the output which should be something like:

[~]$ mpd --verbose
binding to address for 127.0.0.1
setFsCharset: fs charset is: UTF-8
libFLAC supports OggFLAC, initializing OggFLAC support
reading DB
opening pid file
[~]$ daemonized!
writing pid file

To be a preacher requires two apparently contradictory qualities: confidence and humility.

Offline

#5 2007-08-20 12:43:10

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: MPD+Sonata

I think you're missing this line:

port "6600"

Or whatever your port is set to.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#6 2007-08-20 13:16:38

Hohoho
Member
Registered: 2007-06-23
Posts: 222

Re: MPD+Sonata

Try changing the user in the config to "mpd"

Most likely its a permission problem, if you use a user different than mpd, make sure the user has the permissions to write properly to the paths you specify.

Last edited by Hohoho (2007-08-20 13:17:30)

Offline

#7 2007-08-20 13:25:28

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: MPD+Sonata

finferflu wrote:

I think you're missing this line:

port "6600"

Or whatever your port is set to.

You don't actually need that.  It sets 6600 by default.


Cthulhu For President!

Offline

#8 2007-08-20 14:29:18

azwethinkweiz
Member
Registered: 2007-01-25
Posts: 101

Re: MPD+Sonata

mpd --verbose gices me this:

mpd --verbose
binding to address for 127.0.0.1
problem opening log file "/var/log/mpd/mpd.log" (config line 14) for writing


"The hardest thing is rendering a moment moving to fast to endure"

Offline

#9 2007-08-20 14:35:38

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: MPD+Sonata

The user that runs mpd (nate) probably hasn't got write permissions on /var/log/mpd/mpd.log. I've set my log file to ~/mpd.log.

Offline

#10 2007-08-20 16:54:38

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: MPD+Sonata

I was having a similar problem just now. My mpd.log file was 2gigs in size so I deleted that and now things work just fine again. I don't know how this file got so large but is there a way in which I could keep this from happening again? Thanks.

Offline

#11 2007-08-20 20:06:24

Preacher
Member
From: UK
Registered: 2006-09-26
Posts: 46

Re: MPD+Sonata

You need to check whether you actually have a directory/folder called /var/log/mpd/ and that you have write permissions for this.

Hope that helps!


To be a preacher requires two apparently contradictory qualities: confidence and humility.

Offline

#12 2007-08-20 23:36:26

azwethinkweiz
Member
Registered: 2007-01-25
Posts: 101

Re: MPD+Sonata

Nope...no luck so far. Deleted all the stuff in the log, changed permissions for /var/log/mpd/mpd.log removed and reinstalled mpd and sopnata and reconfigured. Still not working. I dont get it. Everytime I install mpd+Sonata on Arch it works for a while then suddenly stops.


"The hardest thing is rendering a moment moving to fast to endure"

Offline

#13 2007-08-20 23:45:13

MrWeatherbee
Member
Registered: 2007-08-01
Posts: 277

Re: MPD+Sonata

azwethinkweiz wrote:

Nope...no luck so far. Deleted all the stuff in the log, changed permissions for /var/log/mpd/mpd.log removed and reinstalled mpd and sopnata and reconfigured. Still not working. I dont get it. Everytime I install mpd+Sonata on Arch it works for a while then suddenly stops.

I think your best bet is to forget about trying to use MPD with any directories outside your own user directories and with any user other than the currently logged in user (i.e., yourself).

So, instead of trying to use /var/log/* or var/run/*, for example, move everything MPD-related to directories such as ~/.somethingorother and only use your user name as the "user" (seems you have already done the latter). I have experimented / hacked around* with other locations for the files and can't get anything but home locations to work.

I'd be interested to see what others have done if they got other directories / other "user"'s to work, but it just seemed a lost cause to me.



Edit:

* by "experimented / hacked around", I mean I tried creating an "mpd" user and group, adding normal users to it, giving proper permissions to the various users and groups, etc., etc. and nothing seems to work except relegating everything to home files and directories. Of course this is okay if you have only yourself to consider, but what if you need other users to access the database in a common "system" location? I see alternatives, but it really seems odd that it is so difficult to set users and permissions in a functioning, straight-forward way. Again, I'm sure someone has it figured out, but it's got me baffled to the point I've given up and just stuck things where they work.

Last edited by MrWeatherbee (2007-08-20 23:57:14)

Offline

#14 2007-08-21 02:12:14

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: MPD+Sonata

daedalusman wrote:

I was having a similar problem just now. My mpd.log file was 2gigs in size so I deleted that and now things work just fine again. I don't know how this file got so large but is there a way in which I could keep this from happening again? Thanks.

Disable logging in mpd.conf, or choose a more restrictive logging option.


I am a gated community.

Offline

#15 2007-08-21 07:38:55

jordanmthomas
Member
Registered: 2007-07-10
Posts: 33

Re: MPD+Sonata

I was having the same problem a while back.  I could connect to mpd sometimes, but not all the time.  mpd didn't complain when I started it either, so the solution eluded me for a while.
For me, it turned out lo wasn't up.  I'm sure you're not dumb like me and you've probably already made sure lo is up, but it might be worth a stab to make sure it is.

Last edited by jordanmthomas (2007-08-21 07:40:08)

Offline

#16 2007-08-21 22:47:18

azwethinkweiz
Member
Registered: 2007-01-25
Posts: 101

Re: MPD+Sonata

OK...moved everything to ~/ and mpd works. However when I reboot with music playing mpd *should* pick up playing where it left off when i rebooted, but it doesn't. In fact when I open sonata after reboot there is nothing in my current playlist. and as it always was before it would open with everything in current that was there when I rebooted and start playing the music where it left off automatically as soon as mpd started with the rest of the daemons. Any ideas?


"The hardest thing is rendering a moment moving to fast to endure"

Offline

#17 2007-08-22 02:19:37

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: MPD+Sonata

state_file                      "~/.mpd/mpdstate"

Put that in your mpd.conf and then create the mpdstate file there and that should do it.

Offline

#18 2007-08-22 08:06:04

Vyazovoi
Member
From: Russia
Registered: 2007-07-31
Posts: 14
Website

Re: MPD+Sonata

sorry, but try to learn `man mpd` and `man mpd.conf` before posting your questions.

Offline

#19 2007-08-25 07:24:23

azwethinkweiz
Member
Registered: 2007-01-25
Posts: 101

Re: MPD+Sonata

ok...Ive tried everything to solve this that I can think of...don't really understand the problem though. Mpd and Sonata are both woking perfectly now except one issue. In Sonata have it set to auto update when I connect which it does. But it doesn't add everything from the music directory. mpd.log shows it being added but it doesnt show up in Sonata. Any clues?


"The hardest thing is rendering a moment moving to fast to endure"

Offline

#20 2007-08-25 16:38:24

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: MPD+Sonata

azwethinkweiz wrote:

ok...Ive tried everything to solve this that I can think of...don't really understand the problem though. Mpd and Sonata are both woking perfectly now except one issue. In Sonata have it set to auto update when I connect which it does. But it doesn't add everything from the music directory. mpd.log shows it being added but it doesnt show up in Sonata. Any clues?

I just tested it and it worked here..

When you start sonata, does it show "updating mpd" in the statusbar? After that text goes away, the update should be complete.


I am a gated community.

Offline

#21 2007-08-25 20:15:10

azwethinkweiz
Member
Registered: 2007-01-25
Posts: 101

Re: MPD+Sonata

No...it doesnt show that in the satus bar. But it's set to automatically update...and the mpd log shows the music has been added it just doesnt show in sonata.

Is there a way I can manually update the library?

Last edited by azwethinkweiz (2007-08-25 20:15:45)


"The hardest thing is rendering a moment moving to fast to endure"

Offline

#22 2007-08-25 20:46:15

azwethinkweiz
Member
Registered: 2007-01-25
Posts: 101

Re: MPD+Sonata

Hehehe...nevermind. I got it updated manually. But if anyone knows why it isnt updating automatically that be swell. LOL. Permissons on mpd.db are fine and in the correct place. I dont know what else to check


"The hardest thing is rendering a moment moving to fast to endure"

Offline

Board footer

Powered by FluxBB