Re: "Could not create listener socket on port" error only when using systemd service
Petr Pisar <[email protected]> Tue, 17 Oct 2023 10:51:52 +0200
| Newsgroups | gmane.comp.audio.icecast.general |
|---|---|
| Message-ID | <[email protected]> |
V Mon, Oct 16, 2023 at 12:34:42PM -0700, Jordan Erickson napsal(a):
> On 10/16/23 10:37, Michael C Cambria wrote:
> > I'm using icecast via Fedora 37 package and systemd service to start.
> >
> > I've added multiple <listen-socket> but get:
> >
> > "EROR connection/connection_setup_sockets Could not create listener
> > socket on port xxx"
> *snip*
>
> That error sounds like it could either be an issue relating to which user is
> starting the Icecast daemon (f.e. typically only root can listen on ports <
> 1024), or there'salready a service running on the requested port (which you
> seem to have verified it's not).
>
> What are these multiple listening sockets you've got going btw? Sounds
> related. Post the part of the config for this if you're able.
>
It's rather caused by a SELinux policy which only allows icecast daemon to
listen on TCP/8000 port:
# sesearch --allow -s icecast_t -c tcp_socket
[...]
allow icecast_t port_type:tcp_socket name_bind; [ icecast_use_any_tcp_ports ]:True
allow icecast_t port_type:tcp_socket name_connect; [ icecast_use_any_tcp_ports ]:True
allow icecast_t port_type:tcp_socket { recv_msg send_msg }; [ icecast_use_any_tcp_ports ]:True
allow icecast_t soundd_port_t:tcp_socket { name_bind name_connect recv_msg send_msg };
If it's the cause, a corresponding log entry about denying the deamon to bind
a socket to the nonstandard port should appear in /var/log/audit/audit.log
when the deamon starts.
If one indeed wants to use any port by icecast, one can enable
icecast_use_any_tcp_ports SELinux boolean with
# setsebool icecast_use_any_tcp_ports on
The status can be queried like this:
# getsebool icecast_use_any_tcp_ports
icecast_use_any_tcp_ports --> on
-- Petr
_______________________________________________
Icecast mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/icecast
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE4/QvzhVoMKgDWObpT9GuwzZa978FAmUuSx8ACgkQT9GuwzZa 979kdBAAuDj7+kprkH3EmEv6qhiS8q01twfD387JZYxEnfIs8mnPcU3+MDLXNCQi 3wtiYnnT/38ef1KI/ZiQwQKXpPCJ23PIE9i9udshcD+ip0xRG1o5JX7Y8/hkizUz tYPtf2w5Pu1QloHZ8Z85m+z//156e4JKd3AsSMFv9xszYMNluPPiCbjerYiaZeTl FUFcEqD1BPTnMtWJLVEyRdOoU+uXWHEnGzB+hrEha8HZsBtlPiCShm4X1/ZPb1XZ Ny1NR0ra/dWkY5eWw/q7JM9qI3iaEOvEfitMF9iuAAPZZtz/XnihBw3Zod7UbFGu 6YY8j+ziB1H2NPR4AmFFXMfyM3fNPCUgrVoKd0Hckbw6azd6fbeMh1mbjsOisaO4 XAaSrw4CdeJkp4fs6F/A6u01RWkWxqk/AydpvSMYZrPCIsMKc90AJalMaX7ywYVD En7QMsHuU7U2Bz2I40FcOviUkNOwoAaCA/NeMiqK5jaDyiA5gYu79i/PY1kV9cMD kFmKsqCyD0D0JF5A3CwXxuQhCtesP8y163FPY0kAAJtqvZM9e8klsmnE//WqPfWB 5T6UTOQJojLc5RQI3M6QZjfks2AwyDjA65jfFDxhVbwzOLVIcae2H9ANE4bM7VE3 EyThQGfrJHkn5if8hgJSJL3BJRUmxvzQplntX7JMbYU0RUNUA5w= =cwCx -----END PGP SIGNATURE-----