0

Short: When run the script manually it works, at boot time i get the VLC error

core access out error: socket bind error: Permission denied


I want to run a command at boot time, so I created a systemd script.

[Unit]
Description=Stars Shairport and VLC 

[Service]
Type=oneshot
User=shairport-sync
Group=shairport-sync
ExecStart=/bin/sh -c "sleep 5;shairport-sync | cvlc - --sout '#transcode{acodec=mpga,ab=128,channels=2,samplerate=44100}:standard{access=http,mux=ogg,dst=192.168.4.147:8080}' --demux=rawaud --rawaud-channels=2 --rawaud-samplerate=44100"
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

This Script is run as user shairport-sync, created like this (followd by a tutorial)

$ getent group shairport-sync &>/dev/null || sudo groupadd -r shairport-sync >/dev/null
$ getent passwd shairport-sync &> /dev/null || sudo useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null

When I execute the script manually everything is working fine. When I enable the Service to start at boot time I get the error messages below

sh[393]: [74001790] core access out error: socket bind error: Permission denied
sh[393]: [74001790] core access out error: cannot create socket(s) for HTTP host
sh[393]: [74001790] access_output_http access out error: cannot start HTTP server
sh[393]: [74000b28] stream_out_standard stream out error: no suitable sout access module for `http/ogg://192.168.4.147:8080'
sh[393]: [74000788] core stream output error: stream chain failed for `transcode{acodec=mpga,ab=128,channels=2,samplerate=44100}:standard{access=http,mux=...8.4.147:8080}'
sh[393]: [74200508] core input error: cannot start stream output instance, aborting

When looking for open ports 8080 is not used yet.

1

Ok, i played around a bit and solved the problem myself. When i change the Dst-IP from 192.168.4.147:8080 to 0.0.0.0:8080 VLC stops complaining and starts the service listening at 0.0.0.0:8080 without problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.