icecast2 жрет трафик без подключения юзеров

Проблемы с установкой, настройкой и работой системных и сетевых программ.

Модераторы: GRooVE, alexco

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
Сергей M
проходил мимо

icecast2 жрет трафик без подключения юзеров

Непрочитанное сообщение Сергей M » 2008-12-02 17:31:15

Freebsd 6.0; сабж есть в нете, а решения нет...


<relay>
<server>radio.svitonline.com</server>
<port>80</port>
<mount>/radio-mfm</mount>
<local-mount>/hit.mp3</local-mount>
<relays-on-demand>1</relays-on-demand>
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>

<relay>
<server>radio.svitonline.com</server>
<port>80</port>
<mount>/radio-stilnoe</mount>
<local-mount>/trance.mp3</local-mount>
<relays-on-demand>1</relays-on-demand> # брал просто on-demand, то самое
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>

<relay>
<server>radio.rivne.net</server>
<port>8000</port>
<mount>/</mount>
<local-mount>/trek.mp3</local-mount>
<relays-on-demand>1</relays-on-demand>
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>


<logsize>1000</logsize> <!-- Max size of a logfile --> # и это не работает...

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

mymymy
сержант
Сообщения: 224
Зарегистрирован: 2008-05-16 21:23:38
Откуда: Москва

Re: icecast2 жрет трафик без подключения юзеров

Непрочитанное сообщение mymymy » 2008-12-03 6:56:46

так он же ест трафик только тогда, когда слушают. Иначе спит
Комменты к статье http://www.lissyara.su/?id=1544
yakuzzza, 2007-11-07 в 0:25:47

"Строка <on-demand>1</on-demand> - говорит, что icecast2 будет работать в качестве демона, так же это дает значительное преимущество перед shoutcast-ом, он не занимает полосу, когда радио никто не слушает."

Это не режим демона ;) On-demand - переводится как "по запросу", а вот понимание верное, поток идет из Интернета только если кто-то слушает радио.
По-крайне мере именно так у меня и происходит.Нет подключений пользователей,которые слушают,нет расхода трафика
Вот конфиг мой..

Код: Выделить всё

<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>
        <!-- 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>PASS</source-password>
        <!-- Relays log in username 'relay' -->
        <relay-password>PASS</relay-password>

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






    <!-- 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>
    <directory>
        <yp-url-timeout>15</yp-url-timeout>
        <yp-url>http://www.oddsock.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 can use these two if you only want a single listener -->
    <!--<port>8000</port> -->
    <!--<bind-address>127.0.0.1</bind-address>-->



<!-- You may have multiple <listener> elements -->
    <listen-socket>
        <port>8000</port>
        <bind-address>10.1.1.205</bind-address>
    </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>
    -->


<relay>
        <server>81.88.113.18</server>
        <port>1072</port>
        <mount>/</mount>
        <local-mount>/radio_pop.mp3</local-mount>
        <on-demand>1</on-demand>
        <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>

<relay>
	<server>209.51.161.54</server>
	<port>8072</port>
	<mount>/</mount>
	<local-mount>/radio_rock.mp3</local-mount>
	<on-demand>1</on-demand>
	<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
	</relay>


<relay>
	<server>aol.streams.bassdrive.com</server>
	<port>8012</port>
	<mount>/</mount>
	<local-mount>/radio_BassDrive.mp3</local-mount>
	<on-demand>1</on-demand>
	<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
	</relay>
						    


#http://stream.loveradio.ru:8000/Loveradio_128_stereo.mp3
<relay>
	<server>193.164.131.191</server>
	<port>8000</port>
	<mount>/</mount>
	<local-mount>/radio_RuMix.mp3</local-mount>
	<on-demand>1</on-demand>
	<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
	</relay>



<relay>
	<server>85.17.7.231</server>
	<port>8090</port>
	<mount>/</mount>
	<local-mount>/radio_KINO.mp3</local-mount>
	<on-demand>1</on-demand>
	<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
	</relay>

#213.251.169.142

<relay>
	<server>213.251.169.142</server>
	<port>8000</port>
	<mount>/</mount>
	<local-mount>/radio_RRadio.mp3</local-mount>
	<on-demand>1</on-demand>
	<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
	</relay>





#----------------------------------------------------------------------------
<relay>
        <server>mp3.nashe.ru</server>
        <port>80</port>
        <mount>/nashe-128</mount>
        <local-mount>/nashe.mp3</local-mount>
        <on-demand>1</on-demand>
        <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
	</relay>
<relay>
        <server>92.48.107.38</server>
	<port>8529</port>
	<mount>/</mount>
	<local-mount>/subfm.mp3</local-mount>
	<on-demand>1</on-demand>
	<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
	</relay>
<relay>
        <server>88.191.78.249</server>
        <port>8078</port>
        <mount>/</mount>
        <local-mount>/jazz.mp3</local-mount>
        <on-demand>1</on-demand>
        <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
        </relay>
<relay>
        <server>rusradio.10gb.ru</server>
        <port>8000</port>
        <mount>/</mount>
        <local-mount>/rusradio-berlin.mp3</local-mount>
        <on-demand>1</on-demand>
        <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
        </relay>
<relay>
	<server>radio.spark-media.ru</server>
	<port>8000</port>
	<mount>/europaplus</mount>
	<local-mount>/europa.mp3</local-mount>
	<on-demand>1</on-demand>
	<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
	</relay>
<relay>
	<server>80.70.231.195</server>
	<port>9045</port>
	<mount>/</mount>
	<local-mount>/dolgoff.mp3</local-mount>
	<on-demand>1</on-demand>
	<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
	</relay>
<relay>
          <server>sunfm.ru</server>
          <port>8000</port>
          <mount>/</mount>
      <local-mount>/sanfm.mp3</local-mount>
          <on-demand>1</on-demand>
      <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
     </relay>
<relay>
      <server>83.222.4.42</server>
      <port>8880</port>
      <mount>/</mount>
      <local-mount>/shanson.mp3</local-mount>
      <on-demand>1</on-demand>
      <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>
    
<relay>
    <server>radio.retro-retro.ru</server>
    <port>8000</port>
    <mount>/</mount>
    <local-mount>/retro.mp3</local-mount>
    <on-demand>1</on-demand>
    <relay-shoutcast>0</relay-shoutcast>
</relay>

<relay>
    <server>mixfm.com.ua</server>
    <port>8128</port>
    <mount>/</mount>
    <local-mount>/mixfm.mp3</local-mount>
    <on-demand>1</on-demand>
    <relay-shoutcast>0</relay-shoutcast>
</relay>

<relay>
    <server>radio.corbina.ru</server>
    <port>8100</port>
    <mount>/</mount>
    <local-mount>/ultra.mp3</local-mount>
    <on-demand>1</on-demand>
    <relay-shoutcast>0</relay-shoutcast>
</relay>

<relay>
    <server>16bit.fm</server>
    <port>9500</port>
    <mount>/</mount>
    <local-mount>/16bit.mp3</local-mount>
    <on-demand>1</on-demand>
    <relay-shoutcast>0</relay-shoutcast>
</relay>

<relay>
    <server>radio.silver.ru</server>
    <port>8000</port>
    <mount>/</mount>
    <local-mount>/silver.mp3</local-mount>
    <on-demand>1</on-demand>
    <relay-shoutcast>0</relay-shoutcast>
</relay>

<relay>
    <server>85.21.79.5</server>
    <port>9054</port>
    <mount>/</mount>
    <local-mount>/bigbeat.mp3</local-mount>
    <on-demand>1</on-demand>
    <relay-shoutcast>0</relay-shoutcast>
</relay>

<relay>
    <server>radio.globalz.ru</server>
    <port>8080</port>
    <mount>/nonstop</mount>
    <local-mount>/global.mp3</local-mount>
    <on-demand>1</on-demand>
    <relay-shoutcast>0</relay-shoutcast>
</relay>

<relay>
    <server>w02-sw01.akadostream.ru</server>
    <port>8108</port>
    <mount>/radiosport128.mp3</mount>
    <local-mount>/sport</local-mount>
    <on-demand>1</on-demand>
    <relay-shoutcast>0</relay-shoutcast>
</relay>

<relay>
    <server>radio.echo.msk.ru</server>
    <port>8000</port>
    <mount>/</mount>
    <local-mount>/echo_msk.mp3</local-mount>
    <on-demand>1</on-demand>
    <relay-shoutcast>0</relay-shoutcast>
</relay>

<relay>
    <server>85.21.79.5</server>
    <port>8071</port>
    <mount>/</mount>
    <local-mount>/ragnarok.mp3</local-mount>
    <on-demand>1</on-demand>
    <relay-shoutcast>0</relay-shoutcast>
    </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>

    <!-- 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>
    -->

    <paths>
		<!-- basedir is only used if chroot is enabled -->
        <basedir>/usr/local/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>/var/log/icecast</logdir>
        <webroot>/usr/local/share/icecast/web</webroot>
        <adminroot>/usr/local/share/icecast/admin</adminroot>
        <!-- <pidfile>/usr/local/share/icecast/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>0</chroot>
        <!--  -->
        <changeowner>
            <user>nobody</user>
            <group>nogroup</group>
        </changeowner>
        
	
	
    </security>
</icecast>

Сергей М
проходил мимо

Re: icecast2 жрет трафик без подключения юзеров

Непрочитанное сообщение Сергей М » 2008-12-03 10:47:59

Конекта от юзеров нету, но trafshow показывает активное соединение (из relay) и бегут пакетики из нета.
Ощущение что <on-demand>1</on-demand> не работает.
Может порт 3389 (в локалку) воспринимает по другому, rdp.....
Как фряхе сказать, что порт 3389 это не rdp, а icecast ?
Другой порт проверить немного проблемно, но нада посмотреть.

Сергей М
проходил мимо

Re: icecast2 жрет трафик без подключения юзеров

Непрочитанное сообщение Сергей М » 2008-12-03 16:10:42

Всем спасибо, вопрос решил. Icecast был старой версии... Переставил на новую и :good: