2

I am trying to run a simple stream redirect with VLC as a 24/7 service on a Debian 12 VM. I'm seeing the following error in the log output.

Jan 28 20:15:10 iptv-vlc vlc[14523]: [hexid] main tls client debug: using tls client module "gnutls"
Jan 28 20:15:10 iptv-vlc vlc[14523]: [hexid] main tls client debug: resolving www.example.com ...
Jan 28 20:15:10 iptv-vlc vlc[14523]: [hexid] main tls client error: cannot resolve www.example.com port 443: System error
Jan 28 20:15:10 iptv-vlc vlc[14523]: [hexid] access stream error: HTTP connection failure

Obviously I have sanitized this. There are no connection issues to the server. When run interactively, the command works. The unit file follows.

[Unit]
Description=VLC streamer
After=multi-user.target

[Service] User=vlcuser Group=vlcuser Type=simple Restart=always RestartSec=10 ExecStart=/usr/bin/vlc -vv https://www.example.com/listen --sout '#rtp{dst=239.0.6.9,port=12345,mux=ts,ttl=16}'

[Install] WantedBy=default.target

I have tried different variations of Restart (always, on-failure) and Type (simple, oneshot, exec) options, as well as different targets (network-online, multi-user, default, and some others I don't remember). I also tried nesting the command in a script and setting ExecStart to that instead, but the outcome is always the same; VLC says it cannot resolve the domain and shuts down, putting the service into a dead state. This happens regardless of the service running on startup or with a systemctl start command.

Why does DNS appear to fail only when VLC is run as a systemd service?

FauxPaw
  • 21

0 Answers0