Fetch Remote Datasets task Exit: 0

To be completed by the original poster:

CMS Version

3.0.2

Player Type

Windows

Player Version

windows 3 R301.1-301

Issue

Fetch Remote Datasets task is not completing. The task displays a bug icon with “Exit: 0” displayed on a mouseover.

All remote datasets are in an active layout.

I do not get any notifications or entries in the error log indicating any reason why this task is failing. I have my log level set to debug.

When I re-enabled the task to run manually, I got the same exit code of 0 with the bug icon, but datasets were updated.

I found the following messages in the debug logs when attempting to refresh the remote datasets:

|5608|a37c3b3|2021-08-20 11:31|CONSOLE|GET|DEBUG|||SET @taskId='16'; SET @name='Fetch Remote Datasets'; SET @status='1'; SET @pid='0'; SET @configFile='/tasks/remote-dataset.task'; SET @class='\Xibo\XTR\RemoteDataSetFetchTask'; SET @options='[]'; SET @schedule='30 * * * *'; SET @lastRunDt='1629477074'; SET @lastRunMessage='# Fetching Remote-DataSets No results for NVMS Chromebooks No results for Lunch Menu Middle Mealviewer Remote No results for Lunch Menu High Mealviewer Remote No results for Lunch Menu Elementary Mealviewer Remote No results for ESC Remote Building Calendar Wednesday No results for ESC Remote Building Calendar Tuesday No results for ESC Remote Building Calendar Thursday No results for ESC Remote Building Calendar Monday No results for ESC Remote Building Calendar Friday Done '; SET @lastRunStatus='4'; SET @lastRunDuration='3614'; SET @lastRunExitCode='0'; SET @isActive='1'; SET @runNow='0'; UPDATE `task` SET `name` = @name, `status` = @status, `pid` = @pid, `configFile` = @configFile, `class` = @class, `options` = @options, `schedule` = @schedule, `lastRunDt` = @lastRunDt, `lastRunMessage` = @lastRunMessage, `lastRunStatus` = @lastRunStatus, `lastRunDuration` = @lastRunDuration, `lastRunExitCode` = @lastRunExitCode, `isActive` = @isActive, `runNow` = @runNow WHERE `taskId` = @taskId|
|5609|a37c3b3|2021-08-20 11:31|CONSOLE|GET|ERROR|||Task run error for taskId 16. E = SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'lastRunMessage' at row 1|

I am continuing to get this error. I was able to briefly bypass it by removing some older remote datasets, but I have added a few new ones and the following error comes up when I attempt to fetch remote datasets:
Task run error for taskId 19. E = SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘lastRunMessage’ at row 1

Hi, did you find a solution? We upgraded from 2.3.12 to 3.0.4 and now encountering the same error. RemoteDataSet task runs for about an hour (every 10 min.) and then errors out and stops.
Any tip is welcome :slight_smile:

I have not found a solution. Sometimes I can have tasks run for days without issues and other times it errors out on every update.

Thank you, for your reply. I now see the same varying times before it errors out. Hope this somehow can be fixed.

Last couple of weeks the task ran without errors. Now we activated some (earlier created) datasets and the same error is there again. Even a manual start will only sporadically end well.

Is there any step I can take to debug this thing?

Sorry to bump this. But manually reactivating the task multiple times per day is no fun.
Our conference center and department rosters are depending on remote datasets. In other words they are vital for our daily work (in our hospitals).

I’ll understand that there is no ready made fix, but I’m stuck at how to debug this problem. Hope someone at Xibo can give me any clues how to proceed!?

Thank you for your message and for providing the details about the error. The lastRunMessage entry referenced in the error has a character limit of 255. The character count in your lastRunMessage is beyond this limit:

# Fetching Remote-DataSets No results for NVMS Chromebooks No results for Lunch Menu Middle Mealviewer Remote No results for Lunch Menu High Mealviewer Remote No results for Lunch Menu Elementary Mealviewer Remote No results for ESC Remote Building Calendar Wednesday No results for ESC Remote Building Calendar Tuesday No results for ESC Remote Building Calendar Thursday No results for ESC Remote Building Calendar Monday No results for ESC Remote Building Calendar Friday Done

The development team are aware of the issue and will fix this. I will also update this post with a link to the issue report so you can track its progress.

Many Thanks.

Here is a link to the issue so you can track the fix:

You can also apply the new patch for the fix to your current CMS installs by entering the following into your command line:

docker-compose exec cms-web bash
cd /var/www/cms
apk add patch
curl -sL https://github.com/PeterMis/xibo-cms/commit/18cc3e05337e09d62e57218d3df4a2b15836f478.diff | patch -p1
exit

Could you apply the patch using the above commands and confirm if the issue is resolved?

Many Thanks.

Hi Dan, I manually adjusted Tasks.php with the lines from the commit. The apk-command did not work for me, probably due to our firewall. And as it is weekend now and our infrastructure department is not available, I did it this way.
But the good news is that it seems to work :smiley:. I’m very, very, very happy!
I will monitor for the coming hours, but I suspect this was all what’s needed.

Did I say I’m very happy with this fix? :wink: So thank you very much for your support, really appreciate it!

Regards, Harm

1 Like

20h later; task is still running without problems.

1 Like

I am getting this error again. Task 19 is “Fetch Remote Datasets” for me. I’m running 3.0.8

Task run error for taskId 19. E = SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'lastRunMessage' at row 1

Hi Callen_Magnuson, thank you for the update. I have been trying to replicate your issue on 3.0.8 and so far I have had no luck getting that error to appear.

Please can you send me screenshots showing:

  • The error in your 3.0.8 CMS.
  • The lastRunMessage for your Fetch Remote Dataset task from the last run. If you go to the Tasks page in your CMS and highlight the tick under the Last Status column for the task it will show the message being returned.

Many Thanks.

Here are the two screenshots.


Thank you for your screenshots of the issue. Below is a link to the Task.php where you can see the fix for the issue you reported was resolved. The fix begins on line 503 and ends on line 506. Please can you go to lib/Controller/Task.php for your local install and make sure that the same appears on lines 503-506?

Many Thanks.

The lines are identical

Thank you for confirming that the lines are the same in your Task.php file. Please can you run the following query in your CMS database and confirm the output?

describe `task`;

This guides explains how to run commands against your database when using a docker based installation:

Many Thanks.

MySQL [cms]> describe `task`;
+-----------------+--------------+------+-----+---------+----------------+
| Field           | Type         | Null | Key | Default | Extra          |
+-----------------+--------------+------+-----+---------+----------------+
| taskId          | int(11)      | NO   | PRI | NULL    | auto_increment |
| name            | varchar(254) | NO   |     | NULL    |                |
| class           | varchar(254) | NO   |     | NULL    |                |
| status          | tinyint(4)   | NO   |     | 2       |                |
| pid             | int(11)      | YES  |     | NULL    |                |
| options         | text         | YES  |     | NULL    |                |
| schedule        | varchar(254) | YES  |     | NULL    |                |
| lastRunDt       | int(11)      | YES  |     | NULL    |                |
| lastRunMessage  | varchar(254) | YES  |     | NULL    |                |
| lastRunStatus   | tinyint(4)   | NO   |     | 0       |                |
| lastRunDuration | smallint(6)  | YES  |     | NULL    |                |
| lastRunExitCode | smallint(6)  | YES  |     | NULL    |                |
| isActive        | tinyint(4)   | NO   |     | 1       |                |
| runNow          | tinyint(4)   | NO   |     | 1       |                |
| configFile      | varchar(254) | NO   |     | NULL    |                |
| lastRunStartDt  | int(11)      | YES  |     | NULL    |                |
+-----------------+--------------+------+-----+---------+----------------+
16 rows in set (0.001 sec)

I am still having this issue, and as of the latest release, all of the above troubleshooting gives identical results.