Ошибка при исполнении systemctl status ezstream

Рейтинг: 0Ответов: 1Опубликовано: 15.07.2023

Устанавливаю ezstream. В процессе установки ввожу команду systemctl status ezstream и получаю следующее:

● ezstream.service - ezstream
     Loaded: loaded (/etc/systemd/system/ezstream.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2023-07-15 15:45:26 MSK; 2min 48s ago
   Main PID: 11555 (code=exited, status=217/USER)

systemd[1]: ezstream.service: Scheduled restart job, restart counter is at 5.
systemd[1]: Stopped ezstream.
systemd[1]: ezstream.service: Start request repeated too quickly.
systemd[1]: ezstream.service: Failed with result 'exit-code'.
systemd[1]: Failed to start ezstream

Я подумал, что не выдал нужные права файлу /etc/icecast2/ezstream.xml, но

ezstream[11768]: /etc/icecast2/ezstream.xml: world readable
ezstream[11768]: stream: default: no configuration

Файл /etc/icecast2/ezstream.xml:

<ezstream>
<url>http://ip_адрес/stream</url>
<sourcepassword>hackme</sourcepassword>
<format>MP3</format>
<filename>/music/playlist.m3u</filename>
<shuffle>0</shuffle>
<playlist_program>0</playlist_program>
<svrinfoname>Name</svrinfoname>
<svrinfourl>http://ip_адрес/stream</svrinfourl>
<svrinfogenre>Ofther</svrinfogenre>
<svrinfodescription>Description</svrinfodescription>
<svrinfobitrate>128</svrinfobitrate>
<svrinfochannels>2</svrinfochannels>
<svrinfosamplerate>44100</svrinfosamplerate>
<svrinfopublic>1</svrinfopublic>
<reencode>
<enable>1</enable>
<encdec>
<format>MP3</format>
<match>.mp3</match>
<decode>lame -f --preset cbr 128 --bitwidth 16 "@T@"  -</decode>
</encdec>
</reencode>
</ezstream>

Что делать в данной ситуации?

Ответы

▲ 0

Строка (code=exited, status=217/USER) в выводе systemctl status ezstream указывает на то, что пользователь, от имени которого вы пытаетесь стартовать процесс, не существует. Создайте его.

Далее, проверьте отступы, xml-формат чувствителен к этому.

Также приведу вам пример рабочего конфига. У меня ezstream v 1.0.1 (Я рекомендую ставить ее, а не последнюю 1.0.2, потому что последняя ведет себя нестабильно порой). Чтобы установить ее, можете найти deb-пакет, например, на сайте pkgs.org.

Конфиг EZSTREAM

<?xml version="1.0" encoding="UTF-8"?>
<ezstream>
  <servers>
    <server>
      <hostname>localhost</hostname>
      <url>http://127.0.0.1:8000/humor</url>
      <password>password123</password>
    </server>
  </servers>

  <streams>
    <stream>
                <mountpoint>/humor</mountpoint>
                <format>MP3</format>
                <shuffle>0</shuffle>
                <playlist_program>0</playlist_program>
                <svrinfoname>Музыкальная станция(Юмор)</svrinfoname>
                <svrinfogenre>Talk</svrinfogenre>
                <svrinfodescription>Радио</svrinfodescription>
                <svrinfobitrate>256</svrinfobitrate>
                <svrinfochannels>2</svrinfochannels>
                <svrinfosamplerate>44100</svrinfosamplerate>
                <svrinfopublic>1</svrinfopublic>
    </stream>
  </streams>

  <intakes>
    <intake>
      <filename>/home/humor/playlist.txt</filename>
    </intake>
  </intakes>

</ezstream>

И мой конфиг Icecast2 на всякий случай:

<icecast>
    <location>Russia</location>
    <admin>aposazhennikov@localhost</admin>


    <limits>
        <clients>100</clients>
        <sources>10</sources>
        <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>
        <source-password>password123</source-password>
        <relay-password>password123</relay-password>
        <admin-user>admin</admin-user>
        <admin-password>password123</admin-password>
    </authentication>


    <hostname>127.0.0.1</hostname>
    <listen-socket>
        <port>8000</port>
    </listen-socket>

        <mount>
                <mount-name>/humor</mount-name>
                <password>password123</password>
                <max-listeners>10</max-listeners>
                <max-listener-duration>36000</max-listener-duration>

                <charset>UTF-8</charset>
                <public>1</public>
                <stream-name>Юмористическая станция </stream-name>
                <stream-description>Радио</stream-description>
                <genre>Talk</genre>
                <bitrate>128</bitrate>
                <type>application/mp3</type>
                <subtype>mp3</subtype>
                <burst-size>65536</burst-size>
                <mp3-metadata-interval>4096</mp3-metadata-interval>
        </mount>
    <http-headers>
        <header name="Access-Control-Allow-Origin" value="*" />
    </http-headers>



    <fileserve>1</fileserve>

    <paths>
        <basedir>/etc/icecast2</basedir>
        <logdir>/etc/icecast2/logs</logdir>
        <webroot>/etc/icecast2/web</webroot>
        <adminroot>/etc/icecast2/admin</adminroot>
        <alias source="/" destination="/status.xsl"/>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
        <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
        <logsize>10000</logsize> <!-- Max size of a logfile -->
    </logging>

    <security>
        <chroot>1</chroot>
        <changeowner>
            <user>icecast2</user>
            <group>icecast2</group>
        </changeowner>
    </security>
</icecast>