Answer the question
In order to leave comments, you need to log in
Why is it impossible to start the process through systemd, while starting manually works?
Good afternoon!
Ices2, which is a client for icecast2, is started manually in the terminal with the command
[email protected]:~$ /usr/bin/ices2 /etc/ices2/ices-alsa.xml
[2019-08-26 13:34:20] INFO ices-core/main IceS 2.0.2 started...
[2019-08-26 13:34:20] INFO input-alsa/alsa_open_module Opened audio device pulse
[2019-08-26 13:34:20] INFO input-alsa/alsa_open_module using 2 channel(s), 44100 Hz, buffer 500 ms
[2019-08-26 13:34:20] INFO input-alsa/alsa_open_module Starting metadata update thread
[2019-08-26 13:34:20] INFO signals/signal_usr1_handler Metadata update requested
[2019-08-26 13:34:20] INFO audio/downmix_initialise Enabling stereo->mono downmixing
[2019-08-26 13:34:20] INFO audio/resample_initialise Initialised resampler for 1 channels, from 44100 Hz to 22050 Hz
[2019-08-26 13:34:20] INFO encode/encode_initialise Encoder initialising in VBR mode: 1 channel(s), 22050 Hz, quality
[2019-08-26 13:34:20] WARN metadata/metadata_thread_signal Failed to open file "test" for metadata update: No such file or directory
[2019-08-26 13:34:20] INFO stream/ices_instance_stream Connected to server: localhost:8000/kupina
[Unit]
Description=Ices Service
After=network.target
Requires=icecast2.service
[Service]
Type=simple
ExecStart=/usr/bin/ices2 /etc/ices2/ices-alsa.xml
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
[email protected]:~$ systemctl status ices
● ices.service - Ices Service
Loaded: loaded (/etc/systemd/system/ices.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Mon 2019-08-26 14:14:00 MSK; 4s ago
Process: 14477 ExecStart=/usr/bin/ices2 /etc/ices2/ices-alsa.xml (code=exited, status=0/SUCCESS)
Main PID: 14477 (code=exited, status=0/SUCCESS)
авг 26 14:14:00 bigboss-server systemd[1]: Started Ices Service.
авг 26 14:14:00 bigboss-server ices2[14477]: ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection re
lines 1-8/8 (END)
[2019-08-26 14:14:00] INFO ices-core/main IceS 2.0.2 started...
[2019-08-26 14:14:00] EROR input-alsa/alsa_open_module Failed to open audio device pulse: Connection refused
[2019-08-26 14:14:00] EROR input/input_loop Couldn't initialise input module "alsa"
[2019-08-26 14:14:00] INFO ices-core/main Shutdown complete
Answer the question
In order to leave comments, you need to log in
right, obviously, it
’s possible to run it in the systemd from a specific user, try it from your
Hallelujah!
The problem was unexpectedly solved by changing the device parameter in the ices-alsa.xml config from the pulse value to the plughw: 1.0 value,
where 1.0 is the designation of my external Scarlett 2i2 USB sound card:
[email protected]:~$ aplay -l
**** Список PLAYBACK устройств ****
карта 1: USB [Scarlett 2i2 USB], устройство 0: USB Audio [USB Audio]
Подустройства: 1/1
Подустройство №0: subdevice #0
INFO ices-core/main IceS 2.0.2 started...
EROR input-alsa/alsa_open_module Sample format not available: Invalid argument
EROR input/input_loop Couldn't initialise input module "alsa"
INFO ices-core/main Shutdown complete
$ sudo xed /etc/systemd/user/ices.service
[Unit]
Description=Ices2 Service
[Service]
ExecStart=/usr/bin/ices2 /etc/ices2/ices-alsa.xml
Restart=always
RestartSec=20s
[Install]
WantedBy=default.target
$ sudo systemctl --user --global enable ices
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question