Draft Publish Only Fails When Scheduled

Hello,

I have set up a new Xibo instance after failing to be able to upgrade certain details. During the publish for certain items, we have times that we want to make after-hours changes with Xibo (2.1.0). However, while a draft will publish just fine if done immediately, and “Publish @ XYZ time” drafts fail.

Draft Failed To Publish On Schedule

As you can see, ther are three items that failed to publish; all were changes that I published “later” per the schedule dropdown:

Publish Later Dialog

Publishes Fine Manually




There are no details in the log, so I cannot easily determine why these publishes failed to go automatically. If I click on the draft rows, and tell it to publish now, it works just fine; so the layout is not the issue. I logged in tonight to discover none of the changes I had set up published after hours. Any ideas?

Thanks,

Paul

Thank you for your message and for the information you have passed on about the issue you are experiencing.

I have been testing the Publish Date functionality in 2.1.0 and I have not yet encountered the same errors. What happens if you schedule a Publish to occur after for example 10 minutes rather than much later? Does the Layout still fail to Publish?

I would like to propose a test on your system, as I am unable to replicate this on my own:

  • Create a Layout and set it to Publish in 5 minute’s time.
  • Go to the Report Fault option in your CMS and follow the steps.
  • When the option appears, Turn On Debugging.
  • Continue with the steps and choose Open in a new Window when the option appears. Do not close the original window/tab as you will need to return to it later.
  • On the new tab/window, wait for the layout to attempt to publish at the time specified. Once you have seen the Layout failed to publish, close this tab and return to the original one.
  • Continue with the steps and choose Collect and Save when the option appears.
  • Finally continue with the steps and choose Turn Off Debugging

You should now have a troubleshoot.zip file, which will contain the logs from your CMS. If you can provide me with those links, I can look into what is happening with your CMS when the Publish later functionality fails.

Many Thanks.

Dan,
Thank you for your response. I believe I did a publish for 10 minutes as well as one for hours away, but I cannot recall with enough accuracy to not test it again for the shorter duration. Let me set up the tests as you requested, and add those details here.

Thanks,

Paul

Hi Paul,

Sounds great, looking forward to hearing how the tests went. Hopefully we can capture the error and see what is happening.

Many Thanks.

Dan,

PFA the ZIP file as requested (Sign in to your account).

Also, here are a few screenshots during the process:

image


image


image


image


image


After clicking “Publish Now” after the failure, it published immediately:

image

Dan,

I did some MySQL tracing as well. I see where the layout is updated, and where the publish is scheduled:


Layout Update
46254 Query UPDATE layout SET status = 3, modifiedDT = ‘2019-09-13 15:12:12’ WHERE layoutId IN (
SELECT region.layoutId
FROM lkplaylistplaylist
INNER JOIN playlist
ON playlist.playlistId = lkplaylistplaylist.parentId
INNER JOIN region
ON region.regionId = playlist.regionId
WHERE lkplaylistplaylist.childId = ‘124’


Layout Scheduled
46297 Query START TRANSACTION
46297 Query UPDATE layout SET publishedDate = ‘2019-09-13 15:15:00’ WHERE layoutId = ‘42’
46297 Query COMMIT
46297 Quit


But I see nowhere after that where any updates are performed for the layout:

Only Two Updates for Layout


However, if I manually publish, I see this (truncated):

Truncated Portion of Manual Publish
46507 Query UPDATE layout SET status = 3, modifiedDT = ‘2019-09-13 15:28:57’ WHERE layoutId = ‘42’
46507 Query DELETE FROM lkcampaignlayout WHERE layoutId = ‘42’
46507 Query DELETE FROM layout WHERE layoutid = ‘42’
46510 Query INSERT INTO auditlog (logDate, userId, entity, message, entityId, objectAfter)
VALUES (‘1568402937’, ‘1’, ‘Layout’, ‘Layout Deleted’, ‘42’, ‘{"layoutId":42}’)
46510 Query INSERT INTO auditlog (logDate, userId, entity, message, entityId, objectAfter)
VALUES (‘1568402937’, ‘1’, ‘Layout’, ‘Deleted draft for 43’, ‘42’, ‘{"parentId":" > 43"}’)
46507 Query UPDATE layout
SET layout = ‘Xibo Staff Test’,
description = NULL,
duration = ‘5’,
modifiedDT = ‘2019-09-13 15:28:57’,
retired = ‘0’,
width = ‘3840’,
height = ‘2160’,
backgroundImageId = NULL,
backgroundColor = ‘#000000’,
backgroundzIndex = ‘0’,
status = ‘3’,
publishedStatusId = ‘1’,
userId = ‘1’,
schemaVersion = ‘3’,
statusMessage = NULL,
enableStat = ‘0’
WHERE layoutID = ‘43’
46510 Query INSERT INTO auditlog (logDate, userId, entity, message, entityId, objectAfter)
VALUES (‘1568402937’, ‘1’, ‘Layout’, ‘Updated Draft’, ‘43’, ‘{"publishedStatusId":"2 > 1","status":"1 > 3"}’)
46507 Query INSERT INTO layouthistory (campaignId, layoutId, publishedDate)
VALUES (‘9’, ‘43’, ‘2019-09-13 15:28:57’)


It does not seem like something is triggering properly when the draft is scheduled. I hope these additional details help you in researching the problem.

Thanks,

Paul

Thank you for the logs and other information. I wondered if you could confirm if this is a Custom or Docker based installation?

The next thing for us to check is that your Regular Maintenance task is running correctly. Please go to the Tasks option in your CMS and make sure that the Regular Maintenance Task has a tick in Active and Last Status. If they have not been configured or are not running successfully, this could explain your issue. If possible, please provide screenshots of the Task page.

Many Thanks.

Dan,

Thank you for the reply. This is a Custom Installation, using IIS as the webserver. I followed the “recommended” guide for Windows, and had no errors during installation. Here is a screenshot of the Active Tasks:

Active Tasks
image

In the scheduling, it seems like Regular Maintenance is not specifically scheduled:
Scheduled Publish
image

Tasks Scheduled After Publish Request
image

As well, after the time for the publish to occur, we see this:

Publishing
image

Tasks

In reviewing, it seems like the Scheulded Tasks are set up as a CRON entry to occur every 5 minutes for Regular Maintenance:

Regular Maintenance Schedule

However, it seems the execution never occurs; every minute, it only shows that it is scheduled for the next minute. Is this specific feature required to be run in Linux, so that CRON is available for scheduling?

Thanks,

Paul

Thank you for the screenshots of the Tasks page. It looks like none of your Tasks are currently working.

I can see in your Next Run Column that it keeps updating to a future time, but you don’t have any information in your Last Run column, which suggests the Tasks are not actually running. Last Status is also a cross which again suggests the Tasks are not actually running.

When you schedule a Layout to Publish at a later date, it is your Regular Maintenance Task that will actually Publish the Layout. If it never runs, this explains why the Layout never gets Published this way.

You will need to investigate why your Tasks are not running, perhaps they have not been fully configured yet, which explains why none of them are working. Below is a link to the XTR Tasks documentation for further information:

https://xibo.org.uk/docs/setup/xtr-routine-tasks

Many Thanks.

1 Like

Dan,

Many thanks; I will review and advise what I find.

Thanks,

Paul

Dan,

I found that this was, indeed, the problem. I have corrected the issues, and publishing is going along according to schedule now. Many thanks; I am uncertain why this was not set up properly the first time.

Thanks,

Paul

1 Like

This is great news! Thanks for confirming the issue is resolved by configuring your tasks. hard to say why it was not configured initially but I hope correcting the issue did not cause too much trouble.

This should be the end of the issues with scheduled publishing, I hope you are able to continue using Xibo without issue.

Many Thanks.

1 Like