Darkice fails at boot, works after systemctl restart

I have searched the existing open and closed issues

Required Information

  • _DIETPI_VERSION_CORE=9

  • G_DIETPI_VERSION_SUB=1

  • G_DIETPI_VERSION_RC=1

  • G_GITBRANCH=‘master’

  • G_GITOWNER=‘MichaIng’

  • G_LIVE_PATCH_STATUS[0]=‘not applicable’

  • Distro version | bookworm 0

  • Kernel version | Linux 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

  • Architecture | arm64

  • SBC model | RPi Zero 2 W

  • Power supply used | Official Raspberry Pi Micro USB

  • SD card used | 16GB SanDisk Ultra

Additional Information

  • Software title | Icecast - Darkice
  • Fresh install of Dietpi

Steps to reproduce

  1. After the solution in Icecast Darkice issues darkice was finally working, however…
  2. After booting, darkice fails. After restarting it with systemctl restart darkice, it works.

Actual behaviour (after boot)

root@ZERO2CAM01:~# journalctl -u darkice
Apr 22 14:05:33 ZERO2CAM01 systemd[1]: Started darkice.service - DarkIce (DietPi).
Apr 22 14:05:34 ZERO2CAM01 darkice[411]: DarkIce 1.3 live audio streamer, http://code.google.com/p/darkice/
Apr 22 14:05:34 ZERO2CAM01 darkice[411]: Copyright (c) 2000-2007, Tyrell Hungary, http://tyrell.hu/
Apr 22 14:05:34 ZERO2CAM01 darkice[411]: Copyright (c) 2008-2013, Akos Maroy and Rafael Diniz
Apr 22 14:05:34 ZERO2CAM01 darkice[411]: This is free software, and you are welcome to redistribute it
Apr 22 14:05:34 ZERO2CAM01 darkice[411]: under the terms of The GNU General Public License version 3 or
Apr 22 14:05:34 ZERO2CAM01 darkice[411]: any later version.
Apr 22 14:05:34 ZERO2CAM01 darkice[411]: Using config file: /etc/darkice.cfg
Apr 22 14:05:34 ZERO2CAM01 darkice[411]: Using ALSA DSP input device: hw:0,0
Apr 22 14:05:34 ZERO2CAM01 darkice[411]: Using POSIX real-time scheduling, priority 4
Apr 22 14:05:34 ZERO2CAM01 darkice[411]: DarkIce: TcpSocket.cpp:251: connect error [111]
Apr 22 14:05:34 ZERO2CAM01 systemd[1]: darkice.service: Main process exited, code=exited, status=255/EXCEPTION
Apr 22 14:05:34 ZERO2CAM01 systemd[1]: darkice.service: Failed with result 'exit-code'.

After systemctl restart darkice:

Apr 22 14:17:56 ZERO2CAM01 systemd[1]: Started darkice.service - DarkIce (DietPi).
Apr 22 14:17:56 ZERO2CAM01 darkice[1234]: DarkIce 1.3 live audio streamer, http://code.google.com/p/darkice/
Apr 22 14:17:56 ZERO2CAM01 darkice[1234]: Copyright (c) 2000-2007, Tyrell Hungary, http://tyrell.hu/
Apr 22 14:17:56 ZERO2CAM01 darkice[1234]: Copyright (c) 2008-2013, Akos Maroy and Rafael Diniz
Apr 22 14:17:56 ZERO2CAM01 darkice[1234]: This is free software, and you are welcome to redistribute it
Apr 22 14:17:56 ZERO2CAM01 darkice[1234]: under the terms of The GNU General Public License version 3 or
Apr 22 14:17:56 ZERO2CAM01 darkice[1234]: any later version.
Apr 22 14:17:56 ZERO2CAM01 darkice[1234]: Using config file: /etc/darkice.cfg
Apr 22 14:17:56 ZERO2CAM01 darkice[1234]: Using ALSA DSP input device: hw:0,0
Apr 22 14:17:56 ZERO2CAM01 darkice[1234]: Using POSIX real-time scheduling, priority 4

Extra details

After updating to 9.3.0, might the solution in Icecast Darkice issues be causing issues?

Looks like darkice trying to connect to icecast before icecast is listening. :thinking:
But by default the is set in the service:

Requires=icecast2.service
After=icecast2.service

Did you change anything in the service config?

Hey @Jappe

So as Joulinar recommended in Icecast Darkice issues - #10 by Joulinar

I changed the #User to root;

[Unit]
Description=DarkIce (DietPi)
Requires=icecast2.service
After=icecast2.service

[Service]
User=root
Group=dietpi
ExecStart=/usr/bin/darkice

[Install]
WantedBy=multi-user.target

And in /etc/darkice.cfg I changed the channels amount to work with the microphone, but I suspect that won’t affect the service’s startup.

This topic was automatically closed 178 days after the last reply. New replies are no longer allowed.