Install xibo 1.81 on a Synology NAS

The link you setup between the containers is what permits the correct containers to talk to one another. We don’t set that variable anywhere.

OK.

Thank you for the help. So far I changed the environment variables how you suggested and blew out everything. Tried again and still the same. I will post all that you requested in the AM for me.

Thanks again Alex.

Hi, I have started something! I think I would rather stay with the old version so 1.7.7.
But a question I still have: Is there no one here who can help me here:
https://community.xibo.org.uk/t/html-code-embedded/9637
I really just want to know how and where to insert something?

@Kusselin
No worries on just wanting to stick to 1.7.7. But I think at some point you might want/need to upgrade. And since I as well as a few other people would like to see about getting the Docker version of Xibo functional on DSM6 units, I will continue on with building a walk through.

Hopefully someone else can assist you on your embedded code post.


@Alex

Here is my configuration. So I am not seeing a database created in the path /volume1/xibo-docker/web/cms/datbase that is on the unit. I would think that would get created when the cms-db container is fired up. chmod is 777. Not sure where exactly to look.

cms-web:
Advanced Settings:
Enable auto-restart

Volume:
/volume1/xibo-docker/web/cms/library - /shared/cms/library
/volume1/xibo-docker/web/cms/custom - /shared/cms/custom
/volume1/xibo-docker/web/cms/web/theme/custom - /shared/cms/web/theme/custom
/volume1/xibo-docker/web/backup - /shared/backup
/volume1/xibo-docker/web/cms/web/userscripts - /shared/cms/web/userscripts

Port Settings:
Local Port: 8888 - Container Port:80 TCP

Links:
Container Name: cms-xmr - Alias: 50001
Container Name: cms-db - Alias: mysql

Environment:
Variable: MYSQL_PASSWORD - Value: PASSWORD
Variable: MYSQL_USER - Value: cms
Variable: ServerName - Value: ABC.DOMAIN.COM
Variable: XMR_HOST - Value: cms-xmr

xibo-xmr:
Advanced Settings:
Enable auto-restart

Volume:
N/A

Port Settings:
Local Port: Auto - Container Port:50001 TCP
Local Port: 9505 - Container Port:9505 TCP

Links:
N/A

Environment:
N/A

cms-db:
Advanced Settings:
Enable auto-restart

Volume:
/volume1/xibo-docker/web/cms/datbase - /shared/database

Port Settings:
Local Port: Auto - Container Port:3306 TCP

Links:
N/A

Environment:
MYSQL_RANDOM_ROOT_PASSWORD - YES
MYSQL_DATABASE - cms
MYSQL_USER - cms

Log From cms-db after deleting the database folder and then recreating it and then starting cms-db

2017-04-20T04:06:32.163862Z 0 [Warning] Changed limits: max_open_files: 4096 (requested 5000)
stdout
04:06:32
2017-04-20T04:06:32.164003Z 0 [Warning] Changed limits: table_open_cache: 1967 (requested 2000)
stdout
04:06:32
2017-04-20T04:06:32.376675Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
stdout
04:06:32
2017-04-20T04:06:32.379185Z 0 [Note] mysqld (mysqld 5.7.18) starting as process 1 ...
stdout
04:06:32
2017-04-20T04:06:32.387068Z 0 [Note] InnoDB: PUNCH HOLE support available
stdout
04:06:32
2017-04-20T04:06:32.387208Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
stdout
04:06:32
2017-04-20T04:06:32.387243Z 0 [Note] InnoDB: Uses event mutexes
stdout
04:06:32
2017-04-20T04:06:32.387281Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
stdout
04:06:32
2017-04-20T04:06:32.387310Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
stdout
04:06:32
2017-04-20T04:06:32.387339Z 0 [Note] InnoDB: Using Linux native AIO
stdout
04:06:32
2017-04-20T04:06:32.387945Z 0 [Note] InnoDB: Number of pools: 1
stdout
04:06:32
2017-04-20T04:06:32.388236Z 0 [Note] InnoDB: Using CPU crc32 instructions
stdout
04:06:32
2017-04-20T04:06:32.391063Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
stdout
04:06:32
2017-04-20T04:06:32.413191Z 0 [Note] InnoDB: Completed initialization of buffer pool
stdout
04:06:32
2017-04-20T04:06:32.416546Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
stdout
04:06:32
2017-04-20T04:06:32.516104Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
stdout
04:06:32
2017-04-20T04:06:32.710406Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
stdout
04:06:32
2017-04-20T04:06:32.710780Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
stdout
04:06:32
2017-04-20T04:06:32.859173Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
stdout
04:06:32
2017-04-20T04:06:32.861180Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
stdout
04:06:32
2017-04-20T04:06:32.861262Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
stdout
04:06:32
2017-04-20T04:06:32.862067Z 0 [Note] InnoDB: Waiting for purge to start
stdout
04:06:32
2017-04-20T04:06:32.912390Z 0 [Note] InnoDB: 5.7.18 started; log sequence number 12132574
stdout
04:06:32
2017-04-20T04:06:32.913231Z 0 [Note] Plugin 'FEDERATED' is disabled.
stdout
04:06:32
2017-04-20T04:06:32.913671Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
stdout
04:06:32
2017-04-20T04:06:32.916877Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170420  4:06:32
stdout
04:06:32
2017-04-20T04:06:32.942588Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
stdout
04:06:32
2017-04-20T04:06:32.943483Z 0 [Warning] CA certificate ca.pem is self signed.
stdout
04:06:32
2017-04-20T04:06:32.947868Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
stdout
04:06:32
2017-04-20T04:06:32.947955Z 0 [Note] IPv6 is available.
stdout
04:06:32
2017-04-20T04:06:32.948018Z 0 [Note]   - '::' resolves to '::';
stdout
04:06:32
2017-04-20T04:06:32.948076Z 0 [Note] Server socket created on IP: '::'.
stdout
04:06:32
2017-04-20T04:06:32.993903Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
stdout
04:06:32
2017-04-20T04:06:32.994104Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
stdout
04:06:32
2017-04-20T04:06:32.994220Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
stdout
04:06:32
2017-04-20T04:06:32.994457Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
stdout
04:06:33
2017-04-20T04:06:33.065147Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
stdout
04:06:33
2017-04-20T04:06:33.126646Z 0 [Note] Event Scheduler: Loaded 0 events
stdout
04:06:33
2017-04-20T04:06:33.127042Z 0 [Note] mysqld: ready for connections.
stdout
04:06:33
Version: '5.7.18'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
stdout
04:06:33
2017-04-20T04:06:33.127093Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check. 
stdout
04:06:33
2017-04-20T04:06:33.127153Z 0 [Note] Beginning of list of non-natively partitioned tables
stdout
04:06:33
2017-04-20T04:06:33.171669Z 0 [Note] End of list of non-natively partitioned tables
stdout

According to the Docker documentation, shouldn’t the random password be in there somewhere?

cms-web log:
Waiting for MySQL to start - max 300 seconds
stdout
04:14:44
MySQL started
stdout
04:14:45
ERROR 1130 (HY000): Host ‘172.17.0.4’ is not allowed to connect to this MySQL server
stdout
04:14:45
New install
stdout
04:14:45
Provisioning Database
stdout
04:14:45
ERROR 1130 (HY000): Host ‘172.17.0.4’ is not allowed to connect to this MySQL server
stdout
04:14:45
ERROR 1130 (HY000): Host ‘172.17.0.4’ is not allowed to connect to this MySQL server
stdout
04:14:45
ERROR 1130 (HY000): Host ‘172.17.0.4’ is not allowed to connect to this MySQL server
stdout
04:14:45
Configuring Database Settings
stdout
04:14:45
ERROR 1130 (HY000): Host ‘172.17.0.4’ is not allowed to connect to this MySQL server
stdout
04:14:45
ERROR 1130 (HY000): Host ‘172.17.0.4’ is not allowed to connect to this MySQL server
stdout
04:14:45
ERROR 1130 (HY000): Host ‘172.17.0.4’ is not allowed to connect to this MySQL server
stdout
04:14:45
ERROR 1130 (HY000): Host ‘172.17.0.4’ is not allowed to connect to this MySQL server
stdout
04:14:45
ERROR 1130 (HY000): Host ‘172.17.0.4’ is not allowed to connect to this MySQL server
stdout
04:14:45
ERROR 1130 (HY000): Host ‘172.17.0.4’ is not allowed to connect to this MySQL server
stdout
04:14:45
Setting up Maintenance
stdout
04:14:45
ERROR 1130 (HY000): Host ‘172.17.0.4’ is not allowed to connect to this MySQL server
stdout
04:14:45
ERROR 1130 (HY000): Host ‘172.17.0.4’ is not allowed to connect to this MySQL server
stdout
04:14:45
Configuring Backups
stdout
04:14:46
Configuring Maintenance
stdout
04:14:46
Running maintenance
stdout

I tried to set MYSQL_ROOT_HOST to the ip of cms-web, but that didn’t work either.

So first up there are some issues with this.

cms-web:
Advanced Settings:
Enable auto-restart

Volume:
/volume1/xibo-docker/web/cms/library - /shared/cms/library
/volume1/xibo-docker/web/cms/custom - /shared/cms/custom
/volume1/xibo-docker/web/cms/web/theme/custom - /shared/cms/web/theme/custom
/volume1/xibo-docker/web/backup - /shared/backup
/volume1/xibo-docker/web/cms/web/userscripts - /shared/cms/web/userscripts

Volumes inside the container are not in /shared. The correct locations are in the docker-compose file:

So for example:
/volume1/xibo-docker/web/cms/library - /var/www/cms/library

would be correct.

Port Settings:
Local Port: 8888 - Container Port:80 TCP

Links:
Container Name: cms-xmr - Alias: 50001
Container Name: cms-db - Alias: mysql

Environment:
Variable: MYSQL_PASSWORD - Value: PASSWORD
Variable: MYSQL_USER - Value: cms
Variable: ServerName - Value: ABC.DOMAIN.COM
Variable: XMR_HOST - Value: cms-xmr

xibo-xmr:
Advanced Settings:
Enable auto-restart

Volume:
N/A

Port Settings:
Local Port: Auto - Container Port:50001 TCP
Local Port: 9505 - Container Port:9505 TCP

You don’t need the first definition there. Port 50001 is for internal use only and shouldn’t be exposed.

Links:
N/A

Environment:
N/A

cms-db:
Advanced Settings:
Enable auto-restart

Volume:
/volume1/xibo-docker/web/cms/datbase - /shared/database

Same issue here as the web container. The proper volume path is /var/lib/mysql

Port Settings:
Local Port: Auto - Container Port:3306 TCP

Again, the MySQL container should not be being exposed, so there’s no need for this mapping.

Links:
N/A

Environment:
MYSQL_RANDOM_ROOT_PASSWORD - YES
MYSQL_DATABASE - cms
MYSQL_USER - cms

Pretty sure that the MYSQL_RANDOM_ROOT_PASSWORD value should be yes not YES You also need to pass in the same MYSQL_PASSWORD variable you gave the web container.

@alex,

Thank you for the feedback! I will try those edits.

As a a note, I setup the directories as shown here. Did I mis-read that?

Port Settings concerning the Local Ports with Auto settings, are settings automatically generated by the Synology Docker App. Not sure why, Once, I have everything running I will try to remove those and see what happens.

I now see data in teh database directory, but still I see errors pertaining to the cms@xxx.xxx.xxx.xxx user.

In that, /shared refers to your host machine.

You’ll need to destroy the container each time. The database and user are only created on the MySQL containers first run.

ok I burned the containers, started new, and still I see

 ERROR 1045 (28000): Access denied for user 'cms'@'172.17.0.4' (using password: YES)
stdout
08:02:58

I should had noted that I reverted to the original setup of not defining the password, and the ServerName.

So the MySQL container isn’t creating the database and user correctly.

It does so solely on the presence of the MYSQL_USER, MYSQL_DATABASE, and MYSQL_PASSWORD environment variables when the container very first starts up.

One of those is missing, or differs from what’s being given to the web container. As before, you’ll need to destroy the container, and remove any locally stored data (/volume1/xibo-docker/web/cms/datbase if that’s still where you have it stored) before you can make another attempt.

Note also you say “still I see”, but this is a very different error from the one you showed before ERROR 1130 (HY000): Host '172.17.0.4' is not allowed to connect to this MySQL server

Thank you Alex for all the help. I was able to finally get the cms-web container to talk to the cms-db container. I can log into the cms via docker from the internet. I had to use both MYSQL_PASSWORD and MYSQL_ROOT_PASSWORD on both containers to get it to work for some reason.

Left on the walk-through for me is to get SSL working and also figure out how to get the data from a previous cms imported. I saw a few post and things on the website to explain this, so I am hopeful that the rest will be fairly easy.


UPDATE

I was able to successfully import the database and library from Xibo 1.8 to 1.8.1 Xibo Docker. I also was successful in setting up the reverse proxy. As soon as I can get everything documented, I am hoping to post a walk through for someone to try and then make suggestions on improving it.

Once again Thank You to Alex who has been great in pointing out what I was doing wrong and making suggestions on where to look.

1 Like

Here it is. Please make suggestions for changes.

I’m a Docker-newbie: After three whole days, yes three!!, with installation-trials of xibo/mysql containers, me seems, that we have a big mistake. The corresponding /shared Folder is not the Synology proper public-folder (/WEB) Folder but the Docker proper public-folder (/DOCKER). That is important for the cms-web Container and his volume path. My trials refers sadly to the WEB-Folder. Now, after changing to the DOCKER-Folder, all containers running very well.
example:
/docker/path-to-your-cms - /var/www/cms/custom

sten,

I am trying to follow you on this. It sounds like you had some trouble with the file locations and needed to place them in a different location and then link to them. My Synology NAS is setup just as my guide says, and I have not had any issues, so I am a bit puzzled.

Are you suggesting that not using the location you have chosen should lead to problems?

#cslaughter

Yes, that is true. My first choice for the container-configuration > cms-web > volume path was the /WEB folder (He will be auto-generated by Synology WebStation). That becomes any problems with MySQL (cache, permission …), Apache and so on. Only after choosing the /DOCKER folder as volume path, running all that fine.

Interesting. Can you please tell me which version of the DMS you are running on your Synology? Also which model it is?

Shure:

Synology DS218+ (intel J3355)
MySQL 8.0.2
Xibo latest (now 1.8.2)

DMS version please??


I am running at the moment a Sysnology DS216+II, with I believe a different processor. But for this application I don't think that matters much. I would think that the DSM version or the difference in the way permissions are configured may be leading to a different outcome for you.

I did have a non-docker version of Xibo installed previously, and that may have called for some permission changes. However, we have used the same setup on another Synology NAS, sorry I don’t have the model number, and it worked as well. That unit did not have a previously installed version of Xibo.

Hey, my Station is still running under DSM 6.1.x
I can´t say what the different to older DSM-versions. But you will find preinstalled Docker only on intel-Synology like 216+II or 218+. Others modells with docker are listed on Synology website.

I am running on DSM 6.1.3-15152 Update 4, I am not sure which version was installed when I started.

No one else has mentioned having the issue you ran into. I might add some notes to the tutorial if I hear of others having an issue.