Schedule problems after airtime restore - corrupt backup or else?
  • I hava Airtime installed on two desktops running Ubuntu 14.04; the installation/configuration is identical as I am using the second pc as ready to go fall back/back up solution in order to avoid down time in case of failure of the first desktop. I regularly perform backups of Airtime database and, from time to time, whenever I update my radio schedule and shows on one of the desktops, I restore the latest backup on the other one in order to keep the schedule up-to-date. This has always worked without any hassle until recently. From a few weeks, I've been experiencing a strange problem after each backup restore. The radio goes offline during some of the scheduled shows. When I check the calendar page of Airtime, all the shows are apparently populated. If I select "Show content" for the shows during which Airtime is off-line and indicates "Nothing scheduled", all the show content is there and shows correctly. But, if I select "Add/Remove content", the show looks empty of any content. This usually occurred with a given show on a sequence of several days, and, in the absence of a better solution, I simply repopulated the faulty shows and everything went back to normal. However, since yesterday, a new development has occurred that made things more complicated. Now, after repopulating the apparently "empty" shows, I get a sort of two superposed streams of the same show during the same period all along...
    My technical knowledge is rather limited and I don't know what to do to elucidate this issue and resolve it. It occurred to me that the backup might be corrupt. But, this has become a systematic feature of all backups restores. It might be that the Airtime deployed database itself got corupted and this is reproduced in the backups. Another hypothesis is that the database has become too large, which make it prone to errors during the backup/restore processes... But how can I remedy it? Is there a way to repair the faulty databse if this is the case? A clean install followed by a restore should obviously not resolve the problem...
    Please help!
  • 8 Comments sorted by
  • I had this a few times. It only happened on a couple of repeating shows.
    I deleted the offending shows and rebooted.
    As if by magic, when scrolling forwards a few weeks I found ghost remaining shows even out to 6 months!
    I deleted all of those and rescheduled the shows.
    If it doesnt allow you to schedule a repeating content show, then you missed a show in the future. Find that/those and delete.
    After a few hours of cussing I got to stability,
    Some months later - it did it again!
    I switched to the newer fork of airtime at libretime.org and nearly all my problems are gone. Plus I have some new features.

    No longer using Airtime or Libretime.
  • Thank you so much for this quick and useful response. Of course, I did consider to delete all the shows (or at least the faulty ones) tgen recreate and refill them from scratch (Thank god I have all of it in a word document). But it would be a huge work - my show cycle is built on sixty days. And, yes, this happens with repeating shows (with different content).
    Could you tell me more about this newer fork and how it works/gets installed. Do I have to uninstall Airtime and install a new program/version or is it something to install on top of my current instalked version? If you can explain the full procedure or point me to a good tutorial, I would be most grateful.
  • I found just deleting the shows did not work - it just recurred - double playing shows etc.
    I did have to scroll forwards a week at a time and clean it.
    Libretime is not perfect. It is a fork of Airtime Pro and has lots of stuff fixed in it. They are still fixing it.
    Have a wander around libretime.org and google libretime git.
    NOTE
    I found problems with Ubuntu 16 and Libretime - basically Libretime does NOT like PHP7. I use php 5.7 on Ubuntu 14.04

    The Lead dev uses Centos for libretime, so that may be even better. Details in the Git.

    I did a fresh install. I would suggest you do too or you may take your problem with you.




    Post edited by John Chewter at 2018-04-25 15:59:26
    No longer using Airtime or Libretime.
  • I will check all that. Thanks again. I even considered to go for the paid turnkey solution of Airtime Pro. But, the plan that fits my requiremenrts is far too expansive for me.
  • Get a 10$ a month vps and try it out. Or a free for 30 days one.
    I can install the base on Ubuntu trusty in minutes. Its easier than AT by miles.
    Post edited by John Chewter at 2018-04-25 16:22:30
    No longer using Airtime or Libretime.
  • You mean Libretime? I can do that. I have already a dedicated server on which I am running Shoutcast for Airtime that is installed locally on my desktop and a music forum.
  • I am reopening this topic in order to share the solution to this problem for the benefit of anyone facing the same issue. My son who is a developer investigated the matter and found out that the problem was due to the backup file getting too heavy. I t appeared that the most recent ones were thirty times bigger than the normal database backup. The reason is a huyge error log file showing all the error messages generated whenever the stream fails to get through to the server. Hence, all that was needed is clearing the log in question thus reducing the backup to a reasonable size. After that, when I restored the cleaned backup, the schedule worked normally.
    My son wrote a script that performs the database cleaning and we made a cron job with it in order to have the task performed at regular intervals. Ever since, the schedule problem never occured again.
    Here is the command:
    DELETE FROM cc_stream_setting WHERE keyname in ('s1_liquidsoap_error', 's2_liquidsoap_error');0
    This command is inserted in a file (cleanup_airtime_db.sql) and a script is made that launches that file (airtime_backup.sh).
    You need to have both files in the same location and run the shell script as root.
    You can also create a cron job for the script in question to be run periodically.
    I wanted to attach the files, but the file type is not allowed.
    Sorry if I am not using the right terminology. I only tried to describe what my son did to solve the problem.
  • Edit: the script name is: airtime_db_cleanup.sh