SyntaxError when uploading photo to media

Hello,

For the last 2 weeks we have been having some strange errors on our Xibo server (Ubuntu 16.04 LTS).
We started with the web interface being really really slow, and then this error started showing up:

I restarted the Xibo server, and when it came back online it seemed quicker, but then when we attempted to upload some images to the media library it started showing a similar error but about Network Address - getaddrinfo failed.

I thought I managed to resolve the issue by deleting some media library items that didn’t pull back a small thumbnail in case they were corrupt in some way.
It was going okay for 2 weeks but now when trying to upload an image to a zones playlist, we’re getting a syntax error: Unexpected token F in JSON at position 0

Can anyone assist please? If you need logs from the Xibo Server, please advise the command with this being Ubuntu I can get around but not 100%.

Thanks in advance :slight_smile:

Lee. :robot:

You can check logs from cms.
Have you check free space on all file systems?

df -h

Hi Dario,

Thanks for the reply. I have only just seen this with the Christmas break being in the middle.

I can see the log files on the cms but not sure what I’m looking for. There are a fair few errors from the players relating to the below (sorry if it looks horrible to read, I haven’t mastered pasting code on here yet):

78594 ea083f6 2018-12-17 14:01 PLAYER POST ERROR SIGNAGE-L1 [RequiredFilesAgentThread] ScheduleAgent - Run Exception in Run: Client found response content type of ‘text/html; charset=UTF-8’, but expected ‘text/xml’.The request failed with an empty response.

There is also a huge error that frequently appears like this one:

Exception in Run: Client found response content type of ‘text/plain;charset=UTF-8’, but expected ‘text/xml’.The request failed with the error message:–<?xml version=“1.0” encoding=“UTF-8”?><SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:ns1=“urn:xmds” xmlns:xsd=“XML Schema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/” SOAP-ENV:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><SOAP-ENV:Body><ns1:GetResourceResponse><resource xsi:type=“xsd:string”><!doctype html><html lang=“en”><head> <title>Xibo Open Source Digital Signage</title> <meta http-equiv=“X-UA-Compatible” content=“IE=edge” /> <meta name=“viewport” content=“width=[[ViewPortWidth]]” /> <meta http-equiv=“Content-Type” content=“text/html; charset=UTF-8” /> <!-- Copyright 2006-2018 Spring Signage Ltd. Part of the Xibo Open Source Digital Signage Solution. Released under the AGPLv3 or later. –> <style type=“text/css”> body { margin: 0; overflow: hidden; font-family: sans-serif, Arial, Verdana, “Trebuchet MS”; } h1, h2, h3, h4, p { margin-top: 0; } #iframe { border: 0; } .cycle-slide p, p.cycle-slide { margin-bottom:0; } </style> <link href=“fonts.css” rel=“stylesheet” media=“screen”><style type=“text/css”></style></head><!–[if lt IE 7 ]><body class=“ie6”><![endif]–><!–[if IE 7 ]><body class=“ie7”><![endif]–><!–[if IE 8 ]><body class=“ie8”><![endif]–><!–[if IE 9 ]><body class=“ie9”><![endif]–><!–[if (gt IE 9)|!(IE)]><!–><body><!–<![endif]–><div id=“content”></div></body><script type=“text/javascript” src=“jquery-1.11.1.min.js”></script><script type=“text/javascript” src=“xibo-layout-scaler.js”></script><script type=“text/javascript” src=“xibo-text-render.js”></script><script type=“text/javascript” src=“xibo-image-render.js”></script><script type=“text/javascript”> var options = {“type”:“ticker”,“fx”:“none”,“duration”:5,“durationIsPerItem”:true,“numItems”:0,“takeItemsFrom”:“start”,“itemsPerPage”:0,“randomiseItems”:0,“speed”:2,“originalWidth”:“483.0000”,“originalHeight”:“78.0000”,“previewWidth”:0,“previewHeight”:0,“scaleOverride”:0}; var items = [“<p style="text-align: center;"><span style="font-size: 48px;"><span style="color: #ffffff;">Classroom TimeTable</span></span></p>\r\n”]; $(document).ready(function() { $(“body”).xiboLayoutScaler(options); $(“#content”).xiboTextRender(options, items); $(“#content”).find(“img”).xiboImageRender(options); }); </script></html><!-- NUMITEMS=1 –><!-- DURATION=5 –></resource></ns1:GetResourceResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>There has been an unknown error with XMDS, it has been logged. Please contact your administrator.–.

Regarding the disk space, yeah I checked this. all seems fine though, here is the output below:
PGS-Signage%20disk%20space

Thanks,

Lee.

Not a Xibo export myself.

It seems that database doesn’t cope with performance requirements. Check that isn’t getting hit by external request. If it’s a dedicated server, don’t open mysql to internet.
Check port publishing with netstat -ntelpd|grep 3306, if it says something like 0.0.0.0:3306 or ::::3306, check that firewall it’s enabled and blocking ports (of course you could be using another config, which can’t be covered here)
It seems that you are not using docker, and apache is answering with utf8 encoding. I wouldn’t know how to do that, but there are a lot of situations that could lead to that.

Docker is awesome. as sysadmin myself, encourage to use it.

Thanks for the quick reply.

We are already running the docker install on Ubuntu.
Installed following the docker install guide on the Xibo site.
Interestingly though, I’ve just ran the command “Sudo docker ps -a” to check the container status’ and it looks as though the SQL database crashed about an hour ago when I last tried loading the Media library on the CMS.

Also - when I run the netstat command, there is nothing running on port 3306 apparently…?

It looks like the SQL database crashes every time I load up the Media library on the CMS… any ideas why that could be?

Lee.

Thats ok if you use docker. Mysql is running in its own container.

run docker-compose logs cms-db to check if there is something notable.

It seems to be going around in a loop doing some recovery or something?.. below are the logs:

cms-db_1 | Version: ‘5.6.40’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 MySQL Community Server (GPL)
cms-db_1 | 2019-01-02 13:07:26 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
cms-db_1 | 2019-01-02 13:07:26 0 [Note] mysqld (mysqld 5.6.40) starting as process 1 …
cms-db_1 | 2019-01-02 13:07:26 1 [Note] Plugin ‘FEDERATED’ is disabled.
cms-db_1 | 2019-01-02 13:07:26 1 [Note] InnoDB: Using atomics to ref count buffer pool pages
cms-db_1 | 2019-01-02 13:07:26 1 [Note] InnoDB: The InnoDB memory heap is disabled
cms-db_1 | 2019-01-02 13:07:26 1 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
cms-db_1 | 2019-01-02 13:07:26 1 [Note] InnoDB: Memory barrier is not used
cms-db_1 | 2019-01-02 13:07:26 1 [Note] InnoDB: Compressed tables use zlib 1.2.3
cms-db_1 | 2019-01-02 13:07:26 1 [Note] InnoDB: Using Linux native AIO
cms-db_1 | 2019-01-02 13:07:28 1 [Note] InnoDB: Using CPU crc32 instructions
cms-db_1 | 2019-01-02 13:07:28 1 [Note] InnoDB: Initializing buffer pool, size = 128.0M
cms-db_1 | 2019-01-02 13:07:28 1 [Note] InnoDB: Completed initialization of buffer pool
cms-db_1 | 2019-01-02 13:07:30 1 [Note] InnoDB: Highest supported file format is Barracuda.
cms-db_1 | 2019-01-02 13:07:30 1 [Note] InnoDB: Log scan progressed past the checkpoint lsn 6667349083
cms-db_1 | 2019-01-02 13:07:30 1 [Note] InnoDB: Database was not shutdown normally!
cms-db_1 | 2019-01-02 13:07:30 1 [Note] InnoDB: Starting crash recovery.
cms-db_1 | 2019-01-02 13:07:30 1 [Note] InnoDB: Reading tablespace information from the .ibd files…
cms-db_1 | 2019-01-02 13:07:33 1 [Note] InnoDB: Restoring possible half-written data pages
cms-db_1 | 2019-01-02 13:07:33 1 [Note] InnoDB: from the doublewrite buffer…
cms-db_1 | InnoDB: Doing recovery: scanned up to log sequence number 6667350562
cms-db_1 | 2019-01-02 13:07:36 1 [Note] InnoDB: Starting an apply batch of log records to the database…
cms-db_1 | InnoDB: Progress in percent: 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
cms-db_1 | InnoDB: Apply batch completed
cms-db_1 | 2019-01-02 13:07:36 1 [Note] InnoDB: 128 rollback segment(s) are active.
cms-db_1 | 2019-01-02 13:07:36 1 [Note] InnoDB: Waiting for purge to start
cms-db_1 | 2019-01-02 13:07:36 1 [Note] InnoDB: 5.6.40 started; log sequence number 6667350562
cms-db_1 | 2019-01-02 13:07:36 1 [Note] Server hostname (bind-address): ‘’; port: 3306
cms-db_1 | 2019-01-02 13:07:36 1 [Note] IPv6 is available.
cms-db_1 | 2019-01-02 13:07:36 1 [Note] - ‘::’ resolves to ‘::’;
cms-db_1 | 2019-01-02 13:07:36 1 [Note] Server socket created on IP: ‘::’.
cms-db_1 | 2019-01-02 13:07:36 1 [Warning] Insecure configuration for --pid-file: Location ‘/var/run/mysqld’ in the path is accessible to all OS users. Consider choosing a different directory.
cms-db_1 | 2019-01-02 13:07:37 1 [Warning] ‘proxies_priv’ entry ‘@ root@167e569b2e43’ ignored in --skip-name-resolve mode.
cms-db_1 | 2019-01-02 13:07:38 1 [Note] Event Scheduler: Loaded 0 events
cms-db_1 | 2019-01-02 13:07:38 1 [Note] mysqld: ready for connections.
cms-db_1 | Version: ‘5.6.40’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 MySQL Community Server (GPL)
cms-db_1 | 2019-01-02 13:11:17 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
cms-db_1 | 2019-01-02 13:11:18 0 [Note] mysqld (mysqld 5.6.40) starting as process 1 …
cms-db_1 | 2019-01-02 13:11:18 1 [Note] Plugin ‘FEDERATED’ is disabled.
cms-db_1 | 2019-01-02 13:11:18 1 [Note] InnoDB: Using atomics to ref count buffer pool pages
cms-db_1 | 2019-01-02 13:11:18 1 [Note] InnoDB: The InnoDB memory heap is disabled
cms-db_1 | 2019-01-02 13:11:18 1 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
cms-db_1 | 2019-01-02 13:11:18 1 [Note] InnoDB: Memory barrier is not used
cms-db_1 | 2019-01-02 13:11:18 1 [Note] InnoDB: Compressed tables use zlib 1.2.3
cms-db_1 | 2019-01-02 13:11:18 1 [Note] InnoDB: Using Linux native AIO
cms-db_1 | 2019-01-02 13:11:18 1 [Note] InnoDB: Using CPU crc32 instructions
cms-db_1 | 2019-01-02 13:11:20 1 [Note] InnoDB: Initializing buffer pool, size = 128.0M
cms-db_1 | 2019-01-02 13:11:20 1 [Note] InnoDB: Completed initialization of buffer pool
cms-db_1 | 2019-01-02 13:11:24 1 [Note] InnoDB: Highest supported file format is Barracuda.
cms-db_1 | 2019-01-02 13:11:24 1 [Note] InnoDB: The log sequence numbers 4951981838 and 4951981838 in ibdata files do not match the log sequence number 6667412413 in the ib_logfiles!
cms-db_1 | 2019-01-02 13:11:24 1 [Note] InnoDB: Database was not shutdown normally!
cms-db_1 | 2019-01-02 13:11:24 1 [Note] InnoDB: Starting crash recovery.
cms-db_1 | 2019-01-02 13:11:24 1 [Note] InnoDB: Reading tablespace information from the .ibd files…
cms-db_1 | 2019-01-02 13:11:43 1 [Note] InnoDB: Restoring possible half-written data pages
cms-db_1 | 2019-01-02 13:11:43 1 [Note] InnoDB: from the doublewrite buffer…
cms-db_1 | 2019-01-02 13:11:58 1 [Note] InnoDB: 128 rollback segment(s) are active.
cms-db_1 | 2019-01-02 13:11:58 1 [Note] InnoDB: Waiting for purge to start
cms-db_1 | 2019-01-02 13:11:58 1 [Note] InnoDB: 5.6.40 started; log sequence number 6667412413
cms-db_1 | 2019-01-02 13:11:59 1 [Note] Server hostname (bind-address): '
’; port: 3306
cms-db_1 | 2019-01-02 13:11:59 1 [Note] IPv6 is available.
cms-db_1 | 2019-01-02 13:11:59 1 [Note] - ‘::’ resolves to ‘::’;
cms-db_1 | 2019-01-02 13:11:59 1 [Note] Server socket created on IP: ‘::’.
cms-db_1 | 2019-01-02 13:11:59 1 [Warning] Insecure configuration for --pid-file: Location ‘/var/run/mysqld’ in the path is accessible to all OS users. Consider choosing a different directory.
cms-db_1 | 2019-01-02 13:12:00 1 [Warning] ‘proxies_priv’ entry ‘@ root@167e569b2e43’ ignored in --skip-name-resolve mode.
cms-db_1 | 2019-01-02 13:12:03 1 [Note] Event Scheduler: Loaded 0 events
cms-db_1 | 2019-01-02 13:12:03 1 [Note] mysqld: ready for connections.
cms-db_1 | Version: ‘5.6.40’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 MySQL Community Server (GPL)
cms-db_1 | 2019-01-02 13:16:58 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
cms-db_1 | 2019-01-02 13:16:58 0 [Note] mysqld (mysqld 5.6.40) starting as process 1 …
cms-db_1 | 2019-01-02 13:16:58 1 [Note] Plugin ‘FEDERATED’ is disabled.
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Using atomics to ref count buffer pool pages
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: The InnoDB memory heap is disabled
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Memory barrier is not used
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Compressed tables use zlib 1.2.3
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Using Linux native AIO
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Using CPU crc32 instructions
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Initializing buffer pool, size = 128.0M
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Completed initialization of buffer pool
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Highest supported file format is Barracuda.
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Log scan progressed past the checkpoint lsn 6667442027
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Database was not shutdown normally!
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Starting crash recovery.
cms-db_1 | 2019-01-02 13:16:58 1 [Note] InnoDB: Reading tablespace information from the .ibd files…
cms-db_1 | 2019-01-02 13:16:59 1 [Note] InnoDB: Restoring possible half-written data pages
cms-db_1 | 2019-01-02 13:16:59 1 [Note] InnoDB: from the doublewrite buffer…
cms-db_1 | InnoDB: Doing recovery: scanned up to log sequence number 6667442085
cms-db_1 | InnoDB: 1 transaction(s) which must be rolled back or cleaned up
cms-db_1 | InnoDB: in total 1 row operations to undo
cms-db_1 | InnoDB: Trx id counter is 449576192
cms-db_1 | 2019-01-02 13:17:00 1 [Note] InnoDB: Starting an apply batch of log records to the database…
cms-db_1 | InnoDB: Progress in percent: 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
cms-db_1 | InnoDB: Apply batch completed
cms-db_1 | 2019-01-02 13:17:00 1 [Note] InnoDB: 128 rollback segment(s) are active.

The errors from the CMS do suggest a problem with the SQL server. What CMS version is this please?

You could try recreating the containers to give you a clean start (your data won’t be lost).

1 Like

Thanks for the reply Alex,

We are on the latest I believe, 1.8.10.
Xibo%20Containers
This all seems to be issues around Media, as when I click on the Media library on the CMS, it loads the page but fails to load any images greater than 1MB in size also.

I’m happy to give recreating the containers a try and see what happens. Could you let me know how I do that on Ubuntu please?

Thanks,
Lee.

So latest is 1.8.11.

I’d suggest you upgrade incase you’re seeing something that has already been addressed.

If you just want to recreate the containers without upgrading, then issue docker-compose down then docker-compose up -d, adding any -f flag as needed for your setup.

Thanks Alex, didn’t realise there was an update available. I will update to 1.8.11 and see if that resolves the issues.

Thanks,
Lee.

Hi Alex,

I have now updated to 1.8.11 and this is still happening.
Everything logs in okay, the CMS comes up and running fine, still connected to the displays and has the users and layouts all in tact.
The same thing happens though, when I click on the Media library on the left, it seems to crash. It takes about 4 minutes and then this message appears still:
Media%20Crash%20Error

Is there a way to wipe the media library/database without affecting the layout/designs? We have the jpgs offline in a shared folder so we can easily re-upload these, I just wouldn’t want to re-design our layouts again.

Regards,
Lee.

You can’t do that no - because layouts are linked to media items.

If you re-uploaded them they’d be different images in the systems eyes so they wouldn’t tie in to your layouts.

What we need to do is understand why you’re getting an error.

How many media items do you have in the library?

Server the CMS containers was being run on didn’t have sufficient RAM. Increasing the RAM resolved it.