Streaming fails at track changeover

After a fresh install of Libretime from the current git version as of a few days ago (the GUI reports “LibreTime Version d5781d198”), all initially seemed well. This on on an AWS server using Debian Buster.
Apache is set up for https, and I installed the ssl enabled version of Icecast from Xiph.org (version 2.4.4-1).
Everything was looking fine with three streams set up, and ssl access to the streams on both ports 8000 and 8443 was OK.

The initial setup uses port 443 in /etc/airtime/airtime.conf as would be expected for an ssl installation.
With this configuration, after a scheduled show starts it will fail with the following error in /var/log/airtime/pypo/pypo.log:
[pypofile] [ERROR] Could not copy from https://kbfgstream.org/rest/media/3 to /var/tmp/airtime/pypo/cache/scheduler/3.mp3
[pypofile] [ERROR] 401 - Error occurred downloading file

The error in the log will appear right after scheduling a show. When the scheduled show time arrives the “On Air” light will briefly appear and then go off, with no streaming taking place.

A bit of Goggling led me to Use proper protocol in URL if port is set to 443 by hairmare · Pull Request #252 · LibreTime/libretime · GitHub
So I changed base_port in airtime.conf from 443 to 80, and I can schedule a show and it will start to play normally at the beginning of a scheduled show. But after two or three short (~3 minutes) tracks the streaming stops It will never stop during a track, always at the changeover to a new track. If I schedule hour long tracks the first track will play to completion and then it will fail to play the next track. Once it fails the “On Air” light goes off and the streaming client will show an “offline” status.

Last summer I had set up a similar setup on a Debian Buster server and never had any of these problems, so not sure where I am going wrong here.

Here are the logfiles at the point of failure (when using port 80 in airtime.conf):

/var/log/icecast2/error.log
[2021-07-01 08:06:25] INFO admin/admin_handle_request Received admin command metadata on mount “/kbfg-3”
[2021-07-01 08:06:25] INFO util/util_conv_string converting metadata from UTF-8 to ISO8859-1
[2021-07-01 08:06:25] INFO admin/command_metadata Metadata on mountpoint /kbfg-3 changed to “LibreTime - offline”
[2021-07-01 08:06:25] INFO admin/admin_handle_request Received admin command metadata on mount “/kbfg-2”
[2021-07-01 08:06:25] INFO util/util_conv_string converting metadata from UTF-8 to ISO8859-1
[2021-07-01 08:06:25] INFO admin/command_metadata Metadata on mountpoint /kbfg-2 changed to “LibreTime - offline”

/var/log/airtime/pypo-liquidsoap/ls_script.log
2021/07/01 08:06:20 [server:3] New client: 127.0.0.1.
2021/07/01 08:06:20 [lang:3] dynamic_source.get_id
2021/07/01 08:06:20 [server:3] Client 127.0.0.1 disconnected.
2021/07/01 08:06:25 [server:3] New client: 127.0.0.1.
2021/07/01 08:06:25 [server:3] Client 127.0.0.1 disconnected without saying goodbye…!
2021/07/01 08:06:25 [s4:3] Finished with “/var/tmp/airtime/pypo/cache/scheduler/13.mp3”.
2021/07/01 08:06:25 [cue_cut_7721:3] Cueing out…
2021/07/01 08:06:25 [amplify_7725:3] End of the current overriding.
2021/07/01 08:06:25 [cross_7728:3] No next track ready yet.
2021/07/01 08:06:25 [schedule_noise_switch:3] Switch to map_metadata_7800 with forgetful transition.
2021/07/01 08:06:25 [lang:3] transition called…
2021/07/01 08:06:25 [dummy(dot)4:3] Source failed (no more tracks) stopping output…
2021/07/01 08:06:25 [dummy(dot)3:3] Source failed (no more tracks) stopping output…

/var/log/airtime/pypo/pypo.log
2021-07-01 08:06:20,153 [pypofetch] [INFO ] Queue timeout. Fetching schedule manually
2021-07-01 08:06:20,805 [pypoliqqueue] [INFO ] New schedule received: <snipped 21347 characters> {‘2021YYY-07m-01d-15H-06M-25S’ ‘file_ready’: True}}
2021-07-01 08:06:20,808 [pypoliqqueue] [INFO ] waiting 4.19167s until next scheduled item
2021-07-01 08:06:20,856 [pypofetch] [INFO ] File ‘/var/tmp/airtime/pypo/cache/scheduler/10.mp3’ removed
2021-07-01 08:06:20,901 [pypofetch] [INFO ] File ‘/var/tmp/airtime/pypo/cache/scheduler/14.mp3’ removed
2021-07-01 08:06:20,901 [pypofetch] [INFO ] Loop #4
2021-07-01 08:06:25,002 [pypoliqqueue] [INFO ] waiting 198.99804s until next scheduled item

/var/log/daemon.log
Jul 1 08:06:25 airwave airtime-playout[3530]: Exception in thread Thread-25:
Jul 1 08:06:25 airwave airtime-playout[3530]: Traceback (most recent call last):
Jul 1 08:06:25 airwave airtime-playout[3530]: File “/usr/lib/python3.7/threading.py”, line 917, in _bootstrap_inner
Jul 1 08:06:25 airwave airtime-playout[3530]: self.run()
Jul 1 08:06:25 airwave airtime-playout[3530]: File “/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/timeout.py”, line 13, in run
Jul 1 08:06:25 airwave airtime-playout[3530]: self.result = func(*args, **kwargs)
Jul 1 08:06:25 airwave airtime-playout[3530]: File “/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/telnetliquidsoap.py”, line 111, in queue_push
Jul 1 08:06:25 airwave airtime-playout[3530]: annotation = create_liquidsoap_annotation(media_item)
Jul 1 08:06:25 airwave airtime-playout[3530]: File “/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/telnetliquidsoap.py”, line 22, in create_liquidsoap_annotation
Jul 1 08:06:25 airwave airtime-playout[3530]: media[“replay_gain”],
Jul 1 08:06:25 airwave airtime-playout[3530]: KeyError: ‘replay_gain’
Jul 1 08:06:25 airwave airtime-playout[3530]: 2021-07-01 08:06:25,002 [pypoliqqueue] [INFO ] waiting 198.99804s until next scheduled item
Jul 1 08:06:25 airwave airtime-liquidsoap[3717]: 2021/07/01 08:06:25 [server:3] New client: 127.0.0.1.
Jul 1 08:06:25 airwave airtime-liquidsoap[3717]: 2021/07/01 08:06:25 [server:3] Client 127.0.0.1 disconnected without saying goodbye…!
Jul 1 08:06:25 airwave airtime-liquidsoap[3717]: 2021/07/01 08:06:25 [s4:3] Finished with “/var/tmp/airtime/pypo/cache/scheduler/13.mp3”.
Jul 1 08:06:25 airwave airtime-liquidsoap[3717]: 2021/07/01 08:06:25 [cue_cut_7721:3] Cueing out…
Jul 1 08:06:25 airwave airtime-liquidsoap[3717]: 2021/07/01 08:06:25 [amplify_7725:3] End of the current overriding.
Jul 1 08:06:25 airwave airtime-liquidsoap[3717]: 2021/07/01 08:06:25 [cross_7728:3] No next track ready yet.
Jul 1 08:06:25 airwave airtime-liquidsoap[3717]: 2021/07/01 08:06:25 [schedule_noise_switch:3] Switch to map_metadata_7800 with forgetful transition.
Jul 1 08:06:25 airwave airtime-liquidsoap[3717]: 2021/07/01 08:06:25 [lang:3] transition called…
Jul 1 08:06:25 airwave airtime-liquidsoap[3717]: 2021/07/01 08:06:25 [dummy(dot)4:3] Source failed (no more tracks) stopping output…
Jul 1 08:06:25 airwave airtime-liquidsoap[3717]: 2021/07/01 08:06:25 [dummy(dot)3:3] Source failed (no more tracks) stopping output…
Jul 1 08:07:33 airwave dhclient[452]: XMT: Solicit on ens5, interval 108300ms.
Jul 1 08:09:00 airwave systemd[1]: Starting Clean php session files…
Jul 1 08:09:00 airwave systemd[1]: phpsessionclean.service: Succeeded.
Jul 1 08:09:00 airwave systemd[1]: Started Clean php session files.
Jul 1 08:09:21 airwave dhclient[452]: XMT: Solicit on ens5, interval 123350ms.
Jul 1 08:09:44 airwave airtime-liquidsoap[3717]: 2021/07/01 08:09:44 [server:3] New client: 127.0.0.1.
Jul 1 08:09:44 airwave airtime-playout[3530]: Exception in thread Thread-28:
Jul 1 08:09:44 airwave airtime-playout[3530]: Traceback (most recent call last):
Jul 1 08:09:44 airwave airtime-playout[3530]: File “/usr/lib/python3.7/threading.py”, line 917, in _bootstrap_inner
Jul 1 08:09:44 airwave airtime-playout[3530]: self.run()
Jul 1 08:09:44 airwave airtime-playout[3530]: File “/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/timeout.py”, line 13, in run
Jul 1 08:09:44 airwave airtime-playout[3530]: self.result = func(*args, **kwargs)
Jul 1 08:09:44 airwave airtime-playout[3530]: File “/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/telnetliquidsoap.py”, line 111, in queue_push
Jul 1 08:09:44 airwave airtime-playout[3530]: annotation = create_liquidsoap_annotation(media_item)
Jul 1 08:09:44 airwave airtime-playout[3530]: File “/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/telnetliquidsoap.py”, line 22, in create_liquidsoap_annotation
Jul 1 08:09:44 airwave airtime-playout[3530]: media[“replay_gain”],
Jul 1 08:09:44 airwave airtime-playout[3530]: KeyError: ‘replay_gain’
Jul 1 08:09:44 airwave airtime-playout[3530]: 2021-07-01 08:09:44,001 [pypoliqqueue] [INFO ] waiting 148.998688s until next scheduled item
Jul 1 08:09:44 airwave airtime-liquidsoap[3717]: 2021/07/01 08:09:44 [server:3] Client 127.0.0.1 disconnected without saying goodbye…!
Jul 1 08:11:25 airwave dhclient[452]: XMT: Solicit on ens5, interval 131860ms.

I don’t think SSL has anything to do with the issues you’re having. I’m using a non-ssl setup at the moment and have the same issue. It appears that the issue is between the AutoDJ and liquidsoap according to most of the posts I’ve read, but at the moment no one really knows for certain. But your post DOES bring up a point I would like to see addressed. HOW did you go about setting up the IceCast2 with SSL precisely? I’ve tried a few times with no success. (I installed SSL for the http side of things for the website, but crashed Icecast2 when I attempted to set it up for SSL. If you have a breakdown of how you did it, or a link to a site that explained how to do it for a Libretime installation, I would appreciate it. (I play to a seperate website that only allows https and blocks any non https streams, so at this point I’m forced into using Azuracast with it’s limited programming features. I would greatly appreciate any pointers for issues you experienced as well.
Thanks!

Yes, I think that I’m dealing with two problems at the moment. As for installing ssl enabled icecast, Here’s how to install and set up icecast with ssl.

Use this guide to get the ssl enabled icecast installed:
Icecast Server/Installing latest version (official Xiph repositories) - XiphWiki

When I did my installation (on Debian Buster):
Temporarily comment out everything in /etc/apt/sources.list, then create the file /etc/apt/sources.list.d/icecast.list with only the following line:
deb Index of /repositories/multimedia:/xiph/xUbuntu_18.10 ./

Install the key: wget http://icecast.org/multimedia-obs.key
Verify the key: gpg multimedia-obs.key
Add the key: apt-key add multimedia-obs.key
One-step method: wget -qO - http://icecast.org/multimedia-obs.key | sudo apt-key add -
then: apt update && apt install icecast2
and then: comment out the line in /etc/apt/sources.list.d/icecast.list and uncomment everything previously commented in /etc/apt/sources.lst
before any update:
apt-mark hold icecast2 (otherwise apt will want to “upgrade” back to the non-ssl icecast. [apt-mark unhold icecast2 to undo]

After installation you can verify that you are using the ssl version with this command:
ldd /usr/bin/icecast2 | grep ssl
The result should be something like this:
libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007ff39933a000)
If blank, you are still using the non-ssl version.

Now install the certificate and set up icecast. Here is a good guide to use:
https://mediarealm.com.au/articles/icecast-https-ssl-setup-lets-encrypt/

Here are my exact steps:
certbot certonly --webroot-path="/usr/share/icecast2/web" -d ‘kbfgstream.org
When prompted, select the ‘webroot’ option
cat /etc/letsencrypt/live/kbfgstream.org-0001/fullchain.pem /etc/letsencrypt/live/kbfgstream.org-0001/privkey.pem > /etc/icecast2/stream.pem

chmod 666 /etc/icecast2/stream.pem
chown icecast2:icecast /etc/icecast2/stream.pem

In icecast.conf:
icecast2.xml:

8443
1

/etc/icecast2/stream.pem

If you would like to test the icecast ssl certificate, you can do it here:
Check SSL Certificate
Just enter your URL and port 8443 (most other online ssl test don’t allow anything other than port 443).

Hope this helps a bit.

1 Like

Hmmm… pasting my icecast.conf didn’t work so well, but you get the idea…

Thanks so much for all of the info! That was a lot of work to get that post put together, and I really appreciate it! I’m going to spend some time working on this and I’ll let you know how it turned out for me.
Again, I really appreciate your taking out the time to do this for me!
Thank You!

As it turns out, there is something amiss in my setup. The Certbot install has an error with the domain validation for some reason, so I’ll be looking into that for a while it seems. It really doesn’t make much of a difference at this point if the stream keeps going down though. I’m thinking I may just sit out a bit until the issues with the broadcast are corrected. I’m also a little concerned with the fact that this is running on old/outdated versions of Ubuntu, php and the rest. I’m going to make a donation of some sort to help the team out a little, in any case.

A few days ago I uninstalled Libretime and did a fresh reinstall from the latest git version (3.0.0-alpha.9-209-gcf75b14e2).

I’ve tried everything that I can think of in Libretime and Icecast settings, plus spent a lot of time playing with apache configs and modifying /etc/hosts, but no matter what I do, when creating a new show I get the same error in pypo.log when adding any content:

2021-07-12 18:59:33,367 [pypofile] [ERROR]  <Response [401]>
2021-07-12 18:59:33,370 [pypofile] [ERROR]  Could not copy from https://kbfgstream.org/rest/media/9 to /var/tmp/airtime/pypo/cache/scheduler/9.mp3
2021-07-12 18:59:33,371 [pypofile] [ERROR]  401 - Error occurred downloading file

Looking at /var/tmp/airtime/pypo/cache/scheduler shows nothing but zero byte files:

drwxr-xr-x 2 www-data www-data 4096 Jul 12 19:00 .
drwxr-xr-x 3 www-data www-data 4096 Jun 25 18:59 ..
-rw-r--r-- 1 www-data www-data    0 Jul 12 19:00 6.mp3
-rw-r--r-- 1 www-data www-data    0 Jul 12 19:00 9.mp3

In every case the Libretime status page shows all normal, and everything looks good on the streaming page.

Digging a bit deeper, something seems amiss earlier in the game. Here are some logs taken right after rebooting, and before even logging in to the web interface:
/var/log/airtime/pypo/pypo.log (at startup):

2021-07-12 17:25:07,861 [__main__] [INFO ]  ###########################################
2021-07-12 17:25:07,863 [__main__] [INFO ]  #             *** pypo  ***               #
2021-07-12 17:25:07,863 [__main__] [INFO ]  #   Liquidsoap Scheduled Playout System   #
2021-07-12 17:25:07,863 [__main__] [INFO ]  ###########################################
2021-07-12 17:25:07,863 [__main__] [INFO ]  Timezone: ('PST', 'PDT')
2021-07-12 17:25:07,863 [__main__] [INFO ]  UTC time: 2021-07-13 00:25:07.863760
2021-07-12 17:25:07,992 [version1] [INFO ]  Airtime API version found: 1.1
2021-07-12 17:25:07,992 [version1] [INFO ]  pypo is only compatible with API version: 1.1
2021-07-12 17:25:08,104 [__main__] [ERROR]  [Errno 111] Connection refused
2021-07-12 17:25:08,104 [__main__] [WARNI]  Liquidsoap doesn't appear to be running!, Sleeping and trying again
2021-07-12 17:25:09,117 [__main__] [INFO ]  Liquidsoap version string found 1.3.3
2021-07-12 17:25:09,119 [pypomessagehandler] [INFO ]  Initializing RabbitMQ stuff
2021-07-12 17:25:09,145 [pypofetch] [INFO ]  PypoFetch: init complete
2021-07-12 17:25:09,189 [mixins] [WARNI]  Broker connection error, trying again in 2.0 seconds: ConnectionRefusedError(111, 'Connection refused').
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/amqp-2.6.1-py3.7.egg/amqp/transport.py", line 138, in _connect
    host, port, family, socket.SOCK_STREAM, SOL_TCP)
  File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -9] Address family for hostname not supported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/kombu-4.6.10-py3.7.egg/kombu/utils/functional.py", line 344, in retry_over_time
    return fun(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/kombu-4.6.10-py3.7.egg/kombu/connection.py", line 870, in _connection_factory
    connection = self._establish_connection()
  File "/usr/local/lib/python3.7/dist-packages/kombu-4.6.10-py3.7.egg/kombu/connection.py", line 806, in _establish_connection
    conn = self.transport.establish_connection()
  File "/usr/local/lib/python3.7/dist-packages/kombu-4.6.10-py3.7.egg/kombu/transport/pyamqp.py", line 130, in establish_connection
    conn.connect()
  File "/usr/local/lib/python3.7/dist-packages/amqp-2.6.1-py3.7.egg/amqp/connection.py", line 314, in connect
    self.transport.connect()
  File "/usr/local/lib/python3.7/dist-packages/amqp-2.6.1-py3.7.egg/amqp/transport.py", line 78, in connect
    self._connect(self.host, self.port, self.connect_timeout)
  File "/usr/local/lib/python3.7/dist-packages/amqp-2.6.1-py3.7.egg/amqp/transport.py", line 149, in _connect
    "failed to resolve broker hostname"))
  File "/usr/local/lib/python3.7/dist-packages/amqp-2.6.1-py3.7.egg/amqp/transport.py", line 162, in _connect
    self.sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
2021-07-12 17:25:09,192 [pypoliqqueue] [INFO ]  waiting indefinitely for schedule
2021-07-12 17:25:09,201 [recorder] [INFO ]  RecorderFetch: init complete
2021-07-12 17:25:09,350 [telnetliquidsoap] [INFO ]  streams.live_dj_stop

2021-07-12 17:25:09,350 [telnetliquidsoap] [INFO ]  streams.master_dj_stop

2021-07-12 17:25:09,350 [telnetliquidsoap] [INFO ]  streams.scheduled_play_start

2021-07-12 17:25:09,350 [telnetliquidsoap] [INFO ]  b'vars.stream_metadata_type 0\n'
2021-07-12 17:25:09,350 [telnetliquidsoap] [INFO ]  b'vars.station_name KBFG 107.3 FM\n'
2021-07-12 17:25:09,351 [telnetliquidsoap] [INFO ]  b'vars.default_dj_fade 0.000\n'
2021-07-12 17:25:09,380 [recorder] [INFO ]  Started...
2021-07-12 17:25:09,639 [recorder] [INFO ]  Parsing recording show schedules...
2021-07-12 17:25:09,639 [recorder] [INFO ]  Bootstrap recorder schedule received: {'shows': [], 'is_recording': False, 'server_timezone': 'America/Los_Angeles'}
2021-07-12 17:25:09,639 [recorder] [INFO ]  Bootstrap complete: got initial copy of the schedule
2021-07-12 17:25:09,664 [pypofetch] [ERROR]  Unable to fetch schedule
2021-07-12 17:25:09,664 [pypofetch] [ERROR]  byte indices must be integers or slices, not str
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/pypofetch.py", line 460, in manual_schedule_fetch
    self.schedule_data = self.api_client.get_schedule()
  File "/usr/local/lib/python3.7/dist-packages/api_clients-2.0.0-py3.7.egg/api_clients/version2.py", line 61, in get_schedule
    start = isoparse(item["starts"])
TypeError: byte indices must be integers or slices, not str
2021-07-12 17:25:09,828 [pypofetch] [ERROR]  Unable to fetch schedule
2021-07-12 17:25:09,828 [pypofetch] [ERROR]  byte indices must be integers or slices, not str
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/pypofetch.py", line 460, in manual_schedule_fetch
    self.schedule_data = self.api_client.get_schedule()
  File "/usr/local/lib/python3.7/dist-packages/api_clients-2.0.0-py3.7.egg/api_clients/version2.py", line 61, in get_schedule
    start = isoparse(item["starts"])
TypeError: byte indices must be integers or slices, not str
2021-07-12 17:25:10,015 [pypofetch] [ERROR]  Unable to fetch schedule
2021-07-12 17:25:10,019 [pypofetch] [ERROR]  byte indices must be integers or slices, not str
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/pypofetch.py", line 460, in manual_schedule_fetch
    self.schedule_data = self.api_client.get_schedule()
  File "/usr/local/lib/python3.7/dist-packages/api_clients-2.0.0-py3.7.egg/api_clients/version2.py", line 61, in get_schedule
    start = isoparse(item["starts"])
TypeError: byte indices must be integers or slices, not str
2021-07-12 17:25:10,200 [pypofetch] [ERROR]  Unable to fetch schedule
2021-07-12 17:25:10,201 [pypofetch] [ERROR]  byte indices must be integers or slices, not str
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/pypofetch.py", line 460, in manual_schedule_fetch
    self.schedule_data = self.api_client.get_schedule()
  File "/usr/local/lib/python3.7/dist-packages/api_clients-2.0.0-py3.7.egg/api_clients/version2.py", line 61, in get_schedule
    start = isoparse(item["starts"])
TypeError: byte indices must be integers or slices, not str
2021-07-12 17:25:10,340 [pypofetch] [ERROR]  Unable to fetch schedule
2021-07-12 17:25:10,343 [pypofetch] [ERROR]  byte indices must be integers or slices, not str
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/pypofetch.py", line 460, in manual_schedule_fetch
    self.schedule_data = self.api_client.get_schedule()
  File "/usr/local/lib/python3.7/dist-packages/api_clients-2.0.0-py3.7.egg/api_clients/version2.py", line 61, in get_schedule
    start = isoparse(item["starts"])
TypeError: byte indices must be integers or slices, not str
2021-07-12 17:25:10,344 [pypofetch] [INFO ]  Loop #1
2021-07-12 17:25:11,206 [mixins] [WARNI]  Broker connection error, trying again in 4.0 seconds: ConnectionRefusedError(111, 'Connection refused').
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/amqp-2.6.1-py3.7.egg/amqp/transport.py", line 138, in _connect
    host, port, family, socket.SOCK_STREAM, SOL_TCP)
  File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -9] Address family for hostname not supported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/kombu-4.6.10-py3.7.egg/kombu/utils/functional.py", line 344, in retry_over_time
    return fun(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/kombu-4.6.10-py3.7.egg/kombu/connection.py", line 870, in _connection_factory
    connection = self._establish_connection()
  File "/usr/local/lib/python3.7/dist-packages/kombu-4.6.10-py3.7.egg/kombu/connection.py", line 806, in _establish_connection
    conn = self.transport.establish_connection()
  File "/usr/local/lib/python3.7/dist-packages/kombu-4.6.10-py3.7.egg/kombu/transport/pyamqp.py", line 130, in establish_connection
    conn.connect()
  File "/usr/local/lib/python3.7/dist-packages/amqp-2.6.1-py3.7.egg/amqp/connection.py", line 314, in connect
    self.transport.connect()
  File "/usr/local/lib/python3.7/dist-packages/amqp-2.6.1-py3.7.egg/amqp/transport.py", line 78, in connect
    self._connect(self.host, self.port, self.connect_timeout)
  File "/usr/local/lib/python3.7/dist-packages/amqp-2.6.1-py3.7.egg/amqp/transport.py", line 149, in _connect
    "failed to resolve broker hostname"))
  File "/usr/local/lib/python3.7/dist-packages/amqp-2.6.1-py3.7.egg/amqp/transport.py", line 162, in _connect
    self.sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
2021-07-12 17:25:15,217 [mixins] [INFO ]  Connected to amqp://airtime:**@127.0.0.1:5672//airtime

pypo.log about 7 minutes later:

2021-07-12 17:31:50,344 [pypofetch] [INFO ]  Queue timeout. Fetching schedule manually
2021-07-12 17:31:50,392 [pypofetch] [ERROR]  Unable to fetch schedule
2021-07-12 17:31:50,393 [pypofetch] [ERROR]  byte indices must be integers or slices, not str
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/pypofetch.py", line 460, in manual_schedule_fetch
    self.schedule_data = self.api_client.get_schedule()
  File "/usr/local/lib/python3.7/dist-packages/api_clients-2.0.0-py3.7.egg/api_clients/version2.py", line 61, in get_schedule
    start = isoparse(item["starts"])
TypeError: byte indices must be integers or slices, not str
2021-07-12 17:31:50,434 [pypofetch] [ERROR]  Unable to fetch schedule
2021-07-12 17:31:50,434 [pypofetch] [ERROR]  byte indices must be integers or slices, not str
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/pypofetch.py", line 460, in manual_schedule_fetch
    self.schedule_data = self.api_client.get_schedule()
  File "/usr/local/lib/python3.7/dist-packages/api_clients-2.0.0-py3.7.egg/api_clients/version2.py", line 61, in get_schedule
    start = isoparse(item["starts"])
TypeError: byte indices must be integers or slices, not str
2021-07-12 17:31:50,470 [pypofetch] [ERROR]  Unable to fetch schedule
2021-07-12 17:31:50,471 [pypofetch] [ERROR]  byte indices must be integers or slices, not str
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/pypofetch.py", line 460, in manual_schedule_fetch
    self.schedule_data = self.api_client.get_schedule()
  File "/usr/local/lib/python3.7/dist-packages/api_clients-2.0.0-py3.7.egg/api_clients/version2.py", line 61, in get_schedule
    start = isoparse(item["starts"])
TypeError: byte indices must be integers or slices, not str
2021-07-12 17:31:50,509 [pypofetch] [ERROR]  Unable to fetch schedule
2021-07-12 17:31:50,509 [pypofetch] [ERROR]  byte indices must be integers or slices, not str
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/pypofetch.py", line 460, in manual_schedule_fetch
    self.schedule_data = self.api_client.get_schedule()
  File "/usr/local/lib/python3.7/dist-packages/api_clients-2.0.0-py3.7.egg/api_clients/version2.py", line 61, in get_schedule
    start = isoparse(item["starts"])
TypeError: byte indices must be integers or slices, not str
2021-07-12 17:31:50,545 [pypofetch] [ERROR]  Unable to fetch schedule
2021-07-12 17:31:50,545 [pypofetch] [ERROR]  byte indices must be integers or slices, not str
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/airtime_playout-1.0-py3.7.egg/pypo/pypofetch.py", line 460, in manual_schedule_fetch
    self.schedule_data = self.api_client.get_schedule()
  File "/usr/local/lib/python3.7/dist-packages/api_clients-2.0.0-py3.7.egg/api_clients/version2.py", line 61, in get_schedule
    start = isoparse(item["starts"])
TypeError: byte indices must be integers or slices, not str
2021-07-12 17:31:50,546 [pypofetch] [INFO ]  Loop #2

/var/log/airtime/zendphp.log (at startup):

2021-07-12T17:25:08-07:00 INFO (6): kbfgstream.org Registered Component: pypo@52.88.234.152
2021-07-12T17:25:09-07:00 INFO (6): kbfgstream.org Registered Component: show-recorder@52.88.234.152
2021-07-12T17:25:10-07:00 INFO (6): kbfgstream.org Notifying RabbitMQ to send message to pypo
2021-07-12T17:25:10-07:00 ERR (3): kbfgstream.org [ErrorController.php:26 - errorAction()] - stream_socket_client(): unable to connect to tcp://127.0.0.1:5672 (Connection refused)
2021-07-12T17:25:10-07:00 ERR (3): kbfgstream.org [ErrorController.php:27 - errorAction()] - #0 [internal function]: PhpAmqpLib\Wire\IO\StreamIO->error_handler(2, 'stream_socket_c...', '/usr/share/airt...', 134, Array)
#1 /usr/share/airtime/php/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php(134): stream_socket_client('tcp://127.0.0.1...', 111, 'Connection refu...', 3, 4, Resource id #14)
#2 /usr/share/airtime/php/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(196): PhpAmqpLib\Wire\IO\StreamIO->connect()
#3 /usr/share/airtime/php/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(180): PhpAmqpLib\Connection\AbstractConnection->connect()
#4 /usr/share/airtime/php/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPStreamConnection.php(51): PhpAmqpLib\Connection\AbstractConnection->__construct('airtime', 'airtime', '/airtime', false, 'AMQPLAIN', NULL, 'en_US', Object(PhpAmqpLib\Wire\IO\StreamIO), 0)
#5 /usr/share/airtime/php/airtime_mvc/application/models/RabbitMq.php(23): PhpAmqpLib\Connection\AMQPStreamConnection->__construct('127.0.0.1', '5672', 'airtime', 'airtime', '/airtime')
#6 /usr/share/airtime/php/airtime_mvc/application/models/RabbitMq.php(50): Application_Model_RabbitMq::sendMessage('airtime-pypo', 'direct', true, '{"event_type":"...')
#7 /usr/share/airtime/php/airtime_mvc/application/controllers/ApiController.php(1212): Application_Model_RabbitMq::SendMessageToPypo('reset_liquidsoa...', Array)
#8 /usr/share/airtime/php/vendor/zf1s/zend-controller/library/Zend/Controller/Action.php(516): ApiController->rabbitmqDoPushAction()
#9 /usr/share/airtime/php/vendor/zf1s/zend-controller/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('rabbitmqDoPushA...')
#10 /usr/share/airtime/php/vendor/zf1s/zend-controller/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#11 /usr/share/airtime/php/vendor/zf1s/zend-application/library/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#12 /usr/share/airtime/php/vendor/zf1s/zend-application/library/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#13 /usr/share/airtime/php/airtime_mvc/application/airtime-boot.php(84): Zend_Application->run()
#14 /usr/share/airtime/php/airtime_mvc/public/index.php(68): require_once('/usr/share/airt...')
#15 {main}
2021-07-12T17:25:10-07:00 ERR (3): kbfgstream.org [ErrorController.php:54 - errorAction()] - An internal application error has occurred.: ErrorException: stream_socket_client(): unable to connect to tcp://127.0.0.1:5672 (Connection refused) in /usr/share/airtime/php/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php:134
Stack trace:
#0 [internal function]: PhpAmqpLib\Wire\IO\StreamIO->error_handler(2, 'stream_socket_c...', '/usr/share/airt...', 134, Array)
#1 /usr/share/airtime/php/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php(134): stream_socket_client('tcp://127.0.0.1...', 111, 'Connection refu...', 3, 4, Resource id #14)
#2 /usr/share/airtime/php/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(196): PhpAmqpLib\Wire\IO\StreamIO->connect()
#3 /usr/share/airtime/php/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(180): PhpAmqpLib\Connection\AbstractConnection->connect()
#4 /usr/share/airtime/php/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPStreamConnection.php(51): PhpAmqpLib\Connection\AbstractConnection->__construct('airtime', 'airtime', '/airtime', false, 'AMQPLAIN', NULL, 'en_US', Object(PhpAmqpLib\Wire\IO\StreamIO), 0)
#5 /usr/share/airtime/php/airtime_mvc/application/models/RabbitMq.php(23): PhpAmqpLib\Connection\AMQPStreamConnection->__construct('127.0.0.1', '5672', 'airtime', 'airtime', '/airtime')
#6 /usr/share/airtime/php/airtime_mvc/application/models/RabbitMq.php(50): Application_Model_RabbitMq::sendMessage('airtime-pypo', 'direct', true, '{"event_type":"...')
#7 /usr/share/airtime/php/airtime_mvc/application/controllers/ApiController.php(1212): Application_Model_RabbitMq::SendMessageToPypo('reset_liquidsoa...', Array)
#8 /usr/share/airtime/php/vendor/zf1s/zend-controller/library/Zend/Controller/Action.php(516): ApiController->rabbitmqDoPushAction()
#9 /usr/share/airtime/php/vendor/zf1s/zend-controller/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('ra

I don’t know what is going on here, but I can’t think of anything else to do. Strange that last summer I did a Libretime install on an AWS server with Debian Buster and had absolutely no problems.

Has anyone done a successful install of an ssl enabled Libretime in the past couple of weeks? I’m not sure if I’m hitting a bug, or just missing something obvious.

Did you see this issue Output going offline when tracks are playing?? and this other post here in discourse “Libre Time - offline after a few tracks"?