You are not logged in.

#1 2009-01-22 14:03:05

buttface_mcgee
Member
Registered: 2007-11-02
Posts: 9

MPD + Icecast2 problem.. socket error

Hello everyone,

I use MPD as a source to icecast2 to stream music to my desktop.  I had this working with MPD 0.12 (I Think, I'm not sure what the previous version was) and Icecast 2.3.2.

A few days ago, I ran 'pacman -Syu' and updated MPD to 0.14.  After I did this, MPD could no longer connect to icecast.  Here is what I see in the logs:

==> /var/log/icecast/error.log <==
[2009-01-22  08:47:15] INFO connection/_handle_source_request Source logging in at mountpoint "/mpd.ogg"

==> /var/log/mpd/mpd.error <==
Jan 22 08:47 : shout: copy_ogg_buffer_to_shout_buffer: not enough buffer space!
Jan 22 08:47 : shout: Lost shout connection to localhost:8567: Socket error
Jan 22 08:47 : shout: Lost shout connection to localhost:8567: Socket error

==> /var/log/icecast/error.log <==
[2009-01-22  08:47:16] INFO format-vorbis/initial_vorbis_page seen initial vorbis header
[2009-01-22  08:47:16] INFO format-vorbis/initial_vorbis_page seen initial vorbis header
[2009-01-22  08:47:16] WARN format-vorbis/process_vorbis_page Problem parsing ogg vorbis header
[2009-01-22  08:47:16] EROR format-ogg/ogg_get_buffer Problem processing stream
[2009-01-22  08:47:16] INFO source/source_main listener count on /mpd.ogg now 0
[2009-01-22  08:47:16] INFO source/source_shutdown Source "/mpd.ogg" exiting

So it looks like MPD is connecting to icecast, but isn't sending it a proper ogg stream because of some kind of socket error. 

I have already tried the following steps to diagnose or solve the problem:

* I restarted both servers
* I updated the mpd.conf file to follow the new mpd.conf.example that came with 0.14
* I updated to mpd-git in AUR
* I tried increasing the queue size in icecast, in case there is a problem
* I verified that this is not an authentication problem
* I tried verbose logging in mpd... no dice.

Frankly I'm kind of stumped, I don't know what to do next.  Do you guys know what is happening?

Offline

#2 2009-01-22 14:07:20

buttface_mcgee
Member
Registered: 2007-11-02
Posts: 9

Re: MPD + Icecast2 problem.. socket error

Here is some relevant info:

mpd (MPD: Music Player Daemon) 0.14.1 

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright (C) 2008 Max Kellermann <max@duempel.org>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Supported formats:

mp3 mp2 ogg oga ogg oga flac wav au aiff aif aac m4a mp4 mpc wv wma asf wmv mpeg mpg avi vob mov qt swf rm swf mp1 mp2 mp3 mp4 m4a flac ogg wav au aiff aif ac3 aac mpc ape 

Supported outputs:

shout null fifo alsa ao oss
partial icecast.xml config file:
    <limits>
        <clients>3</clients>
        <sources>1</sources>
        <threadpool>5</threadpool>
        <queue-size>5242880</queue-size>
.....
    <listen-socket>
        <port>8567</port>
        <bind-address>127.0.0.1</bind-address>
        <!-- <shoutcast-mount>/stream</shoutcast-mount> -->
    </listen-socket>
audio_output {
        type                    "shout"
        encoding                "ogg"                   # optional
        name                    "MPD stream from toots"
        host                    "localhost"
        port                    "8567"
        mount                   "/mpd.ogg"
        password                "REMOVED"
#       quality                 "5.0"
        bitrate                 "192"
        format                  "44100:16:1"
        protocol                "icecast2"              # optional
        user                    "source"                # optional
        description             "My Stream Description" # optional
#       genre                   "jazz"                  # optional
        public                  "no"                    # optional
        timeout                 "30"                    # optional
}

Offline

#3 2009-01-22 15:01:09

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: MPD + Icecast2 problem.. socket error

i just did the upgrade and adjusted the config file; mine's working perfectly as before.

however, mpd no longer looks to ~/.mpdconf?

anyways here's a few of my configs incase you can spot any differences:

/etc/mpd.conf

######################## REQUIRED PATHS ########################
# Note: ~ is the home directory of user set in the "user" option
music_directory                 "/mnt/store/music"
playlist_directory              "~/.mpd/playlists"
db_file                         "~/.mpd/mpd.db"
log_file                        "~/.mpd/mpd.log"
error_file                      "~/.mpd/mpd.error"


######################## OPTIONAL PATHS ########################
pid_file                        "~/.mpd/mpd.pid"
state_file                      "~/.mpd/mpdstate"

######################## DAEMON OPTIONS ########################
user                            "patrick"

# The address and port to listen on.
bind_to_address                 "127.0.0.1"
port                            "6600"
# And for Unix Socket
#bind_to_address                "~/.mpd/socket"

######################### OTHER OPTIONS ########################
#gapless_mp3_playback                   "yes"
#save_absolute_paths_in_playlists       "no"
#metadata_to_use        "artist,album,title,track,name,genre,date,composer,performer,disc"

########################## AUDIO OUTPUT ########################
# Shout output (for streaming to Icecast):
audio_output {
        type                    "shout"
        encoding                "ogg"
        name                    "My Stream"
        host                    "localhost"
        port                    "8000"
        mount                   "/mpd.ogg"
        password                "xxxxx"
        #quality                 "5.0"
        bitrate                 "128"
        format                  "44100:16:1"
        protocol                "icecast2"
        user                    "source"                # optional
}

# ALSA output:
#audio_output {
#        type                    "alsa"
#        name                    "fake out"
         #device                  "hw:0,0"     # optional
         #format                  "44100:16:2" # optional
#}

#filesystem_charset             "UTF-8"
#id3v1_encoding                 "ISO-8859-1"

icecast.xml (comments removed for clarity)

<icecast>
    <limits>
        <clients>100</clients>
        <sources>2</sources>
        <threadpool>5</threadpool>
        <queue-size>524288</queue-size>
        <client-timeout>30</client-timeout>
        <header-timeout>15</header-timeout>
        <source-timeout>10</source-timeout>
        <burst-on-connect>1</burst-on-connect>
        <burst-size>65535</burst-size>
    </limits>

    <authentication>
        <!-- Sources log in with username 'source' -->
        <source-password>xxxxx</source-password>
        <!-- Relays log in username 'relay' -->
        <relay-password>xxxxx</relay-password>

        <!-- Admin logs in with the username given below -->
        <admin-user>patrick</admin-user>
        <admin-password>XXXXX</admin-password>
    </authentication>

    <hostname>localhost</hostname>

    <listen-socket>
        <port>8000</port>
    </listen-socket>
   
    <fileserve>1</fileserve>

    <paths>
        <!-- basedir is only used if chroot is enabled -->
        <basedir>/usr/share/icecast</basedir>

        <!-- Note that if <chroot> is turned on below, these paths must both
             be relative to the new root, not the original root -->
        <logdir>/usr/share/icecast/log</logdir>
        <webroot>/usr/share/icecast/web</webroot>
        <adminroot>/usr/share/icecast/admin</adminroot>

        <alias source="/" dest="/status.xsl"/>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
        <!-- <playlistlog>playlist.log</playlistlog> -->
        <loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
        <logsize>10000</logsize> <!-- Max size of a logfile -->
        <!-- If logarchive is enabled (1), then when logsize is reached
             the logfile will be moved to [error|access|playlist].log.DATESTAMP,
             otherwise it will be moved to [error|access|playlist].log.old.
             Default is non-archive mode (i.e. overwrite)
        -->
        <!-- <logarchive>1</logarchive> -->
    </logging>

    <security>
        <chroot>0</chroot>
        <changeowner>
            <user>icecast</user>
            <group>nobody</group>
        </changeowner>
    </security>
</icecast>

hope it helps

Offline

#4 2009-01-25 20:46:21

buttface_mcgee
Member
Registered: 2007-11-02
Posts: 9

Re: MPD + Icecast2 problem.. socket error

brisbin33, thanks!  Unfortunately, I cannot find a major difference in our configurations.  I am still having problems.

I will try using mp3 instead of ogg in the source

Offline

#5 2009-01-27 16:29:21

buttface_mcgee
Member
Registered: 2007-11-02
Posts: 9

Re: MPD + Icecast2 problem.. socket error

Hey, I noticed that there are multiple entries form some formats in the "supported outputs" for my version of MPD.... specifically, two for 'oga' and three for 'ogg'.  Could there be some stream compatibility issue because to this?

Offline

Board footer

Powered by FluxBB