Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stream démarre et s'arrête immédiatement

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Forum Francophone
View previous topic :: View next topic  
Author Message
zanton



Joined: 06 Nov 2009
Posts: 5

PostPosted: Fri Nov 06, 2009 2:16 pm    Post subject: Stream démarre et s'arrête immédiatement Reply with quote

Bonjour à tous,

J'interviens ici car je ne parviens pas à faire fonctionner le couple mpd+icecast sur mon nas synology 207+ qui tourne sur un linux custo par le constructeur.
J'utilise mpd depuis de trèèèès longues années et il tourne actuellement sur mon nas auquel j'ai greffé une carte son usb - aucun problème de ce coté.

J'ai donc créé un nouveau fichier mpd-iceast.conf qui reprend la même base de données de musique que le mpd.conf "classique" mais dans lequel j'ai modifié les fichiers de log, error, pid et state. J'ai fait les changements qui vont bien au niveau de l'audio_output et je le fais tourner sur le port 6700.

Neanmoins j'ai un problème : mpd a l'air de bien se connecter à l'icecast mais dés que je lance une chanson (via sonata), le processus de mpd tombe immédiatement. Dans les logs j'ai ça :

icecast, error.log:

Citation
[2009-11-06 08:20:26] INFO connection/_handle_source_request Source logging in at mountpoint "/mpd.ogg"
[2009-11-06 08:20:26] INFO source/get_next_buffer End of Stream /mpd.ogg
[2009-11-06 08:20:26] INFO source/source_main listener count on /mpd.ogg now 0
[2009-11-06 08:20:26] INFO source/source_shutdown Source "/mpd.ogg" exiting


icecast, access.log:

Citation
127.0.0.1 - - [06/Nov/2009:08:20:26 +0000] "SOURCE /mpd.ogg HTTP/1.0" 200 19 "-" "MPD" 1


mpd-icecast.log

Citation
avahi: Failed to create client: Daemon not running


Je n'ai rien dans mpd-icecast.error.


J'ai essayé de lancer mpd en ayant kill icecast et dans le mpd-icecast.log j'ai cette ligne là au lieu de l'actuelle :

Citation
output: Failed to open "My Shout Stream" [shout]: problem opening connection to shout server localhost:8000: Couldn't connect


Ces messages suggèrent donc que mpd arrive bien à se connecter à icecast. Par contre dès que je lance une chanson le flux a l'air de tomber directement : connexion puis deconnexion immédiate (le error.log de icecast) et en 2e effet kiss cool, la mort du process mpd.

Je ne comprends pas bien ce qui se passe et ce que je rate :/

Merci pour votre aide !
Back to top
View user's profile Send private message
jcr
Modérateur français
Modérateur français


Joined: 14 Apr 2006
Posts: 544
Location: France, Auvergne

PostPosted: Fri Nov 06, 2009 4:48 pm    Post subject: Reply with quote

la ligne:
avahi: Failed to create client: Daemon not running

laisse penser à une erreur quelconque dans la config de mpd-icecast ou de ices.

postes ta config (en masquant le mot de passe), ainsi que ta config icecast.
_________________
Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
zanton



Joined: 06 Nov 2009
Posts: 5

PostPosted: Fri Nov 06, 2009 6:14 pm    Post subject: Reply with quote

Voici le icecast.xml :
Code:
<icecast>
    <limits>
        <clients>10</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>
        <!-- If enabled, this will provide a burst of data when a client
             first connects, thereby significantly reducing the startup
             time for listeners that do substantial buffering. However,
             it also significantly increases latency between the source
             client and listening client.  For low-latency setups, you
             might want to disable this. -->
        <burst-on-connect>1</burst-on-connect>
        <!-- same as burst-on-connect, but this allows for being more
             specific on how much to burst. Most people won't need to
             change from the default 64k. Applies to all mountpoints  -->
        <burst-size>65535</burst-size>
    </limits>

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

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

    <!-- set the mountpoint for a shoutcast source to use, the default if not
         specified is /stream but you can change it here if an alternative is
         wanted or an extension is required
    <shoutcast-mount>/live.nsv</shoutcast-mount>
    -->

    <!-- Uncomment this if you want directory listings -->
    <!--
    <directory>
        <yp-url-timeout>15</yp-url-timeout>
        <yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
    </directory>
     -->

    <!-- This is the hostname other people will use to connect to your server.
    It affects mainly the urls generated by Icecast for playlists and yp
    listings. -->
    <hostname>localhost</hostname>

    <!-- You may have multiple <listener> elements -->
    <listen-socket>
        <port>8000</port>
        <!-- <bind-address>127.0.0.1</bind-address> -->
        <!-- <shoutcast-mount>/stream</shoutcast-mount> -->
    </listen-socket>
    <!--
    <listen-socket>
        <port>8001</port>
    </listen-socket>
    -->

    <!--<master-server>127.0.0.1</master-server>-->
    <!--<master-server-port>8001</master-server-port>-->
    <!--<master-update-interval>120</master-update-interval>-->
    <!--<master-password>hackme</master-password>-->

    <!-- setting this makes all relays on-demand unless overridden, this is
         useful for master relays which do not have <relay> definitions here.
         The default is 0 -->
    <!--<relays-on-demand>1</relays-on-demand>-->

    <!--
    <relay>
        <server>127.0.0.1</server>
        <port>8001</port>
        <mount>/example.ogg</mount>
        <local-mount>/different.ogg</local-mount>
        <on-demand>0</on-demand>

        <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
    </relay>
    -->

    <!-- Only define a <mount> section if you want to use advanced options,
         like alternative usernames or passwords
    <mount>
        <mount-name>/example-complex.ogg</mount-name>

        <username>othersource</username>
        <password>hackmemore</password>

        <max-listeners>1</max-listeners>
        <dump-file>/tmp/dump-example1.ogg</dump-file>
        <burst-size>65536</burst-size>
        <fallback-mount>/example2.ogg</fallback-mount>
        <fallback-override>1</fallback-override>
        <fallback-when-full>1</fallback-when-full>
        <intro>/example_intro.ogg</intro>
        <hidden>1</hidden>
        <no-yp>1</no-yp>
        <authentication type="htpasswd">
                <option name="filename" value="myauth"/>
                <option name="allow_duplicate_users" value="0"/>
        </authentication>
        <on-connect>/home/icecast/bin/stream-start</on-connect>
        <on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
    </mount>

    <mount>
        <mount-name>/auth_example.ogg</mount-name>
        <authentication type="url">
            <option name="mount_add"       value="http://myauthserver.net/notify_mount.php"/>
            <option name="mount_remove"    value="http://myauthserver.net/notify_mount.php"/>
            <option name="listener_add"    value="http://myauthserver.net/notify_listener.php"/>
            <option name="listener_remove" value="http://myauthserver.net/notify_listener.php"/>
        </authentication>
    </mount>

    -->

    <fileserve>1</fileserve>

    <paths>
      <!-- basedir is only used if chroot is enabled -->
        <basedir>/opt/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>/log</logdir>
        <webroot>/web</webroot>
        <adminroot>/admin</adminroot>
        <!-- <pidfile>/icecast.pid</pidfile> -->

        <!-- Aliases: treat requests for 'source' path as being for 'dest' path
             May be made specific to a port or bound address using the "port"
             and "bind-address" attributes.
          -->
        <!--
        <alias source="/foo" dest="/bar"/>
          -->
        <!-- Aliases: can also be used for simple redirections as well,
             this example will redirect all requests for http://server:port/ to
             the status page
          -->
        <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>1</chroot>
        <changeowner>
            <user>icecast</user>
            <group>icecast</group>
        </changeowner>
    </security>
</icecast>


Voici le mpd-icecast.conf :
Code:
# An example configuration file for MPD
# See the mpd.conf man page for a more detailed description of each parameter.

######################## REQUIRED PATHS ########################
music_directory    "/volume1/musique/"
playlist_directory    "/opt/mpd/Playlists"
db_file                         "/opt/mpd/mpd.db"
log_file                        "/opt/mpd/mpd-icecast.log"
error_file                      "/opt/mpd/mpd-icecast.error"
################################################################


######################## 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                        "/opt/mpd/mpd-icecast.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                      "/opt/mpd/mpd-icecaststate"
#
################################################################


######################## 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                            "nobody"
#
# The address and port to listen on.
#
#bind_to_address                 "any"
port                            "6700"
#
# 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                "******"
#        quality                 "5.0"
        bitrate                 "128"
        format                  "44100:16:1"
#        user                    "source"                # optional
#        description             "My Stream Description" # optional
#        genre                   "jazz"                  # optional
#        public                  "no"                    # optional
}
#audio_output {
#   type "oss"
#   name "fake out"
#   driver "null"
#}
#
# 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                   "Master"
#
# 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"
#
################################################################
Back to top
View user's profile Send private message
jcr
Modérateur français
Modérateur français


Joined: 14 Apr 2006
Posts: 544
Location: France, Auvergne

PostPosted: Fri Nov 06, 2009 6:52 pm    Post subject: Reply with quote

Il manque une section mount pour ton mpd.ogg

par exemple:
Code:

    <mount>
        <mount-name>/mpd.ogg</mount-name>
    </mount>


Le serveur icecast n'ayant pas d epoint d emontage sous le nom utilisé par le client, droppe la connexion immédiatement.
_________________
Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
zanton



Joined: 06 Nov 2009
Posts: 5

PostPosted: Fri Nov 06, 2009 11:55 pm    Post subject: Reply with quote

J'ai rajouté
Code:
    <mount>
        <mount-name>/mpd.ogg</mount-name>
    </mount>
juste avant <fileserve>1</fileserve> en étant sûr qu'il ne soit pas commenté, puis j'ai arrêté et redémarré icecast et mpd mais j'ai toujours le même problème Sad
Back to top
View user's profile Send private message
jcr
Modérateur français
Modérateur français


Joined: 14 Apr 2006
Posts: 544
Location: France, Auvergne

PostPosted: Sat Nov 07, 2009 12:27 am    Post subject: Reply with quote

C'est assez strange alors..

J'ai plius de 250 streams icecast en service, en tous genres pour mes clients, et aucun n'a ce problème.
_________________
Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
zanton



Joined: 06 Nov 2009
Posts: 5

PostPosted: Mon Nov 09, 2009 1:55 pm    Post subject: Reply with quote

Est-ce que l'avahi-daemon est uilisé ? J'ai fait des recherches dessus et la plupart des gens cherchent à la désinstaller. J'ai vu que le binaire était installé sur mon nas et je me demande si le mieux ne serait pas de le démarrer tout simplement.

Déjà eu à faire quelque chose dans ce genre là ?

Pour info, j'ai essayé avec le type "httpd" et pas "shout", donc sans icecast, et j'ai le même problème avec la même erreur liée à avahi-daemon dans le log.

Merci pour ton aide en tout cas !


Last edited by zanton on Mon Nov 09, 2009 2:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
jcr
Modérateur français
Modérateur français


Joined: 14 Apr 2006
Posts: 544
Location: France, Auvergne

PostPosted: Mon Nov 09, 2009 2:00 pm    Post subject: Reply with quote

Là pour l'utilisation d'avahi, ça dépend plus ou moins des distris. Sur mes serveurs, je n'utilise rien de tout ça... Mais à voir et testes en lançant avahi. Et regardes à tout hasard s'il n'y aurait pas du SElinux qui traine sans les bonnes règles..
Fedora, par exemple, n'a pas en standard les règles pour mpd et icecast, on doit les rajouter (ou désactiver SElinux)
_________________
Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Forum Francophone All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber