Cms on linux can't start after installation

Hi,

I am trying to install CMS on linux ubuntu - I followed the instructions and installed docker, socker compose and xibo cms.

I handled the group issue according to the post installation docker manual.

When I run docker-compose up -d for the first time, I keep getting the following error:
ERROR: for b2c3958d21e2_xibo_cms-db_1 Cannot start service cms-db: error while creating mount source path ‘/opt/xibo/shared/db’: mkdir /opt/xibo: read-only file system

ERROR: for cms-db Cannot start service cms-db: error while creating mount source path ‘/opt/xibo/shared/db’: mkdir /opt/xibo: read-only file system
ERROR: Encountered errors while bringing up the project.

Thank you for your message. The errors suggest that you have not set the correct permissions on the opt/xibo directory. Could you try setting the directory to have read and write permissions and confimr if the issue persists?

Can you also confirm you are running the command as an admin or that you are adding sudo to the beginning of the command?

Many Thanks.

Hi,

yarivzip@yarivzip-Latitude-E7450:/opt$ cd xibo/
yarivzip@yarivzip-Latitude-E7450:/opt/xibo$ ls -l
total 104
-rw-rw-r-- 1 root root 1135 Aug 22 2019 cms_custom-ports.yml.template
-rw-rw-r-- 1 root root 805 Aug 22 2019 cms_remote-mysql.yml
-rwxrwxr-x 1 root root 2791 Mar 23 16:35 config.env
-rw-rw-r-- 1 root root 2783 Aug 22 2019 config.env.template
-rw-rw-r-- 1 root root 1861 Aug 22 2019 config.env.template-remote-mysql
-rw-rw-r-- 1 root root 1059 Aug 22 2019 docker-compose.yml
-rw-rw-r-- 1 root root 34520 Aug 22 2019 LICENSE
-rwxrwxr-x 1 root root 0 Mar 23 15:55 ps.tx
-rw-rw-r-- 1 root root 2088 Aug 22 2019 README.md
-rwxrwxr-x 1 root root 14997 Aug 22 2019 xibo-docker.tar.gz
-rw-rw-r-- 1 root root 14997 Aug 22 2019 xibo-docker.tar.gz.1
yarivzip@yarivzip-Latitude-E7450:/opt/xibo$

I think this is ok in terms of read and write access but I keep getting the same error.
I run it with sudo

yarivzip@yarivzip-Latitude-E7450:/opt$ ls -l
total 20
drwxrwxr-x 4 root root 4096 Mar 23 13:47 containerd
drwxrwxr-x 3 root root 4096 Dec 22 2018 google
drwxrwxr-x 4 root root 4096 Dec 20 2018 teamviewer
drwxrwxr-x 2 root root 4096 Mar 23 14:27 test
drwxrwxr-x 2 root root 4096 Mar 23 16:37 xibo
yarivzip@yarivzip-Latitude-E7450:/opt$

Thank you for the info about your permissions, could you also check the permissions on the opt/xibo/shared directory, as well as the sub directories under shared?

Many Thanks.

I don’t see any folder called “shared” under Xibo folder

I added a folder called ‘shared’ but I still get the same errors

Any idea? I made all the installation steps as required. Twice.
I remember when I installed Docker on windows I had to set a shred folder through the Docker UI.
What did I get wrong?

My apologies for the delayed reply. The issue is indeed related to the Permissions on your filesystem and you are not using a Root/Admin account to install your CMS and execute the commands. Please log into your Ubuntu machine as root and run the command again, can you confirm if this resolves your issue?

Many Thanks.

Hi,

It’s a Linux machine I use for development. I’m a newbie in Linux but as far as I understand I’m the admin and I have root access. In addition I use sudo for all the commands.

Yariv

Thank you for your reply. Please provide the following screenshots:

  • A screenshot showing the contents of your xibo directory.
  • A screenshot that shows the sudo docker-compose up -d command being run from the xibo directory and the response you receive.
  • A screenshot of the result of running sudo docker ps -a.

Many Thanks.

I created the “shared” folder. It wasn’t there after the installation.
yarivzip@yarivzip-Latitude-E7450:~$ cd /opt/xibo
yarivzip@yarivzip-Latitude-E7450:/opt/xibo$ ls -l
total 108
-rw-rw-r-- 1 root root 1135 Aug 22 2019 cms_custom-ports.yml.template
-rw-rw-r-- 1 root root 805 Aug 22 2019 cms_remote-mysql.yml
-rwxrwxr-x 1 root root 2791 Mar 23 16:35 config.env
-rw-rw-r-- 1 root root 2783 Aug 22 2019 config.env.template
-rw-rw-r-- 1 root root 1861 Aug 22 2019 config.env.template-remote-mysql
-rw-rw-r-- 1 root root 1059 Aug 22 2019 docker-compose.yml
-rw-rw-r-- 1 root root 34520 Aug 22 2019 LICENSE
-rwxrwxr-x 1 root root 0 Mar 23 15:55 ps.tx
-rw-rw-r-- 1 root root 2088 Aug 22 2019 README.md
drwxrwxrwx 3 root root 4096 Mar 24 16:29 shared
-rwxrwxr-x 1 root root 14997 Aug 22 2019 xibo-docker.tar.gz
-rw-rw-r-- 1 root root 14997 Aug 22 2019 xibo-docker.tar.gz.1
yarivzip@yarivzip-Latitude-E7450:/opt/xibo$

yarivzip@yarivzip-Latitude-E7450:/opt/xibo$ sudo docker-compose up -d
[sudo] password for yarivzip:
Starting b2c3958d21e2_xibo_cms-db_1 … error
Starting xibo_cms-xmr_1 …

ERROR: for b2c3958d21e2_xibo_cms-db_1 Cannot start service cms-db: error while creating mount source path ‘/opt/xibo/shared/db’: mkdir /opt/xibo: read-only filStarting xibo_cms-xmr_1 … done

ERROR: for cms-db Cannot start service cms-db: error while creating mount source path ‘/opt/xibo/shared/db’: mkdir /opt/xibo: read-only file system
ERROR: Encountered errors while bringing up the project.
yarivzip@yarivzip-Latitude-E7450:/opt/xibo$

yarivzip@yarivzip-Latitude-E7450:/opt/xibo$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
639c8e91bcc0 xibosignage/xibo-xmr:release-0.7 “/entrypoint.sh” 44 hours ago Up 58 seconds 0.0.0.0:9505->9505/tcp, 50001/tcp xibo_cms-xmr_1
df74cb8c4dd4 hello-world “/hello” 44 hours ago Exited (0) 44 hours ago sad_leakey
ea6201e8f203 hello-world “/hello” 45 hours ago Exited (0) 45 hours ago hungry_kowalevski
b2c3958d21e2 mysql:5.6 “docker-entrypoint.s…” 45 hours ago Created 3306/tcp b2c3958d21e2_xibo_cms-db_1
yarivzip@yarivzip-Latitude-E7450:/opt/xibo$

Thank you for the details. Please can you run sudo su and confirm your password when prompted. You should see that your user will instead have a # at the end rather than the $. Then can you try to up your CMS again please?

Many Thanks.

Hi Daniel,

This is what I see now:
yarivzip@yarivzip-Latitude-E7450:~$ sudo su
[sudo] password for yarivzip:
root@yarivzip-Latitude-E7450:/home/yarivzip# cd /opt/xibo
root@yarivzip-Latitude-E7450:/opt/xibo# docker-compose up -d
Starting xibo_cms-xmr_1 …
Starting b2c3958d21e2_xibo_cms-db_1 … error

ERROR: for b2c3958d21e2_xibo_cms-db_1 Cannot start service cms-db: error while Starting xibo_cms-xmr_1 … done
e system

ERROR: for cms-db Cannot start service cms-db: error while creating mount source path ‘/opt/xibo/shared/db’: mkdir /opt/xibo: read-only file system
ERROR: Encountered errors while bringing up the project.
root@yarivzip-Latitude-E7450:/opt/xibo#

Thanks,
Yariv

Hi Daniel,

This is what I see now:

yarivzip@yarivzip-Latitude-E7450:~$ sudo su
[sudo] password for yarivzip:
root@yarivzip-Latitude-E7450:/home/yarivzip# cd /opt/xibo
root@yarivzip-Latitude-E7450:/opt/xibo# docker-compose up -d
Starting xibo_cms-xmr_1 …
Starting b2c3958d21e2_xibo_cms-db_1 … error

ERROR: for b2c3958d21e2_xibo_cms-db_1 Cannot start service cms-db: error while Starting xibo_cms-xmr_1 … done
e system

ERROR: for cms-db Cannot start service cms-db: error while creating mount source path ‘/opt/xibo/shared/db’: mkdir /opt/xibo: read-only file system
ERROR: Encountered errors while bringing up the project.
root@yarivzip-Latitude-E7450:/opt/xibo#

Thanks,

Yariv

‫בתאריך יום ד׳, 25 במרץ 2020 ב-13:24 מאת ‪Daniel via Xibo Community‬‏ <‪noreply@xibo.org.uk‬‏>:‬

Thanks for the update on this. As a test could you create the /opt/xibo/shared/db directory that it requires and ensure that it has read and write permissions?

If this does not resolve the issue, I would suggest deleting the /opt/xibo directory and starting again, but this time be sure to follow all of the steps as root.

Many Thanks.

Hi,
Already tried to add a /shared/db folder with write permissions.
Do you mean I have to delete /opt/xibo and install CMS or install docker and docker compose as well?

Thanks,
Yariv

Thanks for the reply. Could you try installing CMS please, you should not need to reinstall docker and docker compose.

Many Thanks.

I made a fresh installation. Everything from scratch after removing the previous installation. Same thing. I have a Xibo folder with no shared folder in it

Hi Daniel,

I moved to a virtual Linux machine and the setup completed successfully.
root@xibo-Virtual-Machine:/opt/xibo# docker-compose up -d
Recreating xibo_cms-db_1 … done
Recreating xibo_cms-xmr_1 … done
Recreating xibo_cms-web_1 … done

I added a password for mysql in config.env

when I try to open cms in firefox I get the following error:
Fatal Error - sorry this shouldn’t happen. SQLSTATE[HY000] [1045] Access denied for user ‘cms’@‘172.18.0.3’ (using password: YES)

I created the docker group and checked it’s ok

Thanks,
Yariv