nless
April 5, 2017, 9:50am
1
While upgrading from 1.7.8 to 1.8 (Docker) i got this messsage (in my Browser) after starting with remote DB Config ->
docker-compose -f cms_remote-mysql.yml up -d
Fatal Error - sorry this shouldn’t happen. Failed to create cache path.
System: centOS 7, selinux is off.
Status for dockerd shows only this warning message:
dockerd-current[953]: AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.18.0.3. Set the 'S…his message
alex
April 5, 2017, 10:36am
2
The cache directory should created as part of the setup routine.
If you run docker ps
to get the name of your cms-web
container, then run
docker exec -ti name_cms-web_1 bash
You’ll get a console inside the container.
mkdir /var/www/cms/cache
chown -R www-data.www-data /var/www/cms/cache
exit
Will create the cache directory required.
nless
April 5, 2017, 11:30am
3
There was already a /var/www/cms/cache folder with follow rights:
drwxrwxr-x. 2 www-data www-data 6 Mar 9 08:49 cache
The “cache” folder is empty in the container xibodocker_cms-web_1
alex
April 5, 2017, 11:44am
4
And you still get the same error in the web interface?
What about the cache directory in shared/cms/library/cache
?
If that there?
nless
April 5, 2017, 12:29pm
5
Yes, there is a folder in
shared/cms/library/cache
drwxr-x—. 3 33 33 18 5. Apr 14:13 cache
And inside is a stash folder:
drwxr-x—. 3 33 33 18 5. Apr 14:13 .
drwxr-xr-x. 5 33 33 4096 5. Apr 10:10 …
drwxr-x—. 3 33 33 29 16. Jun 2016 stash
I restarted docker-compose, but the Error is still there…
alex
April 5, 2017, 12:31pm
6
Can you check what the permissions are on that folder from inside the container.
It’ll be /var/www/cms/library/cache
alex
April 5, 2017, 1:12pm
8
That looks reasonable.
I think I would delete the containers, and try bringing them up again
docker-compose down
docker-compose -f cms_remote-mysql.yml up -d
nless
April 5, 2017, 1:34pm
9
Sorry, but that does not help.
Here the Status of the Docker-Application Container Engine, maybe it helps:
alex
April 5, 2017, 4:07pm
10
I think I might have twigged what the issue is.
In your remote MySQL database, please run the following
UPDATE setting SET value="/var/www/cms/library/", userChange=0, userSee=0 where setting="LIBRARY_LOCATION";
Because the system isn’t “importing” a database, it isn’t running the setup steps here:
sleep 1
# Check if there's a database file to import
if [ -f "/var/www/backup/import.sql" ]
then
echo "Attempting to import database"
echo "Importing Database"
mysql -D $MYSQL_DATABASE -u $MYSQL_USER -p$MYSQL_PASSWORD -h $MYSQL_HOST -P $MYSQL_PORT -e "SOURCE /var/www/backup/import.sql"
echo "Configuring Database Settings"
# Set LIBRARY_LOCATION
mysql -D $MYSQL_DATABASE -u $MYSQL_USER -p$MYSQL_PASSWORD -h $MYSQL_HOST -P $MYSQL_PORT -e "UPDATE \`setting\` SET \`value\`='/var/www/cms/library/', \`userChange\`=0, \`userSee\`=0 WHERE \`setting\`='LIBRARY_LOCATION' LIMIT 1"
mysql -D $MYSQL_DATABASE -u $MYSQL_USER -p$MYSQL_PASSWORD -h $MYSQL_HOST -P $MYSQL_PORT -e "UPDATE \`setting\` SET \`value\`='Apache', \`userChange\`=0, \`userSee\`=0 WHERE \`setting\`='SENDFILE_MODE' LIMIT 1"
# Set XMR public/private address
mysql -D $MYSQL_DATABASE -u $MYSQL_USER -p$MYSQL_PASSWORD -h $MYSQL_HOST -P $MYSQL_PORT -e "UPDATE \`setting\` SET \`value\`='tcp://$XMR_HOST:50001', \`userChange\`=0, \`userSee\`=0 WHERE \`setting\`='XMR_ADDRESS' LIMIT 1"
# Configure Maintenance
echo "Setting up Maintenance"
mysql -D $MYSQL_DATABASE -u $MYSQL_USER -p$MYSQL_PASSWORD -h $MYSQL_HOST -P $MYSQL_PORT -e "UPDATE \`setting\` SET \`value\`='Protected' WHERE \`setting\`='MAINTENANCE_ENABLED' LIMIT 1"
You’ll want to run the SQL above, plus:
UPDATE setting SET value='Apache', userChange=0, userSee=0 WHERE setting='SENDFILE_MODE' LIMIT 1;
Then once the upgrade has finished, you’ll need to set the XMR Private address to be tcp://localhost:50001
and the XMR Public address appropriately for the DNS name of your server, eg tcp://my.server.com:9505
nless
May 3, 2017, 8:23am
11
The database commands have helped.
After the update, but now comes the following error:
Configuration error
Problem copying the file into the libraries folder
alex
May 3, 2017, 8:25am
12
Check the permissions on the library and cache folders inside the container. They should be owned by www-data.www-data
recursively.
nless
May 3, 2017, 8:58am
13
Inside the container looks all right:
alex
May 3, 2017, 9:01am
14
It’s the contents of the library and cache directories we’re interested in. That doesn’t show us what the permissions on those are.
If you ran chown -R www-data.www-data library cache
from that same directory (/var/www/cms
), that should sort them out if they are wrong.
I also noticed in my earlier post, the setting for the library path is subtly wrong. You should run the following SQL in the database:
UPDATE setting SET value="/var/www/cms/library/", userChange=0, userSee=0 where setting="LIBRARY_LOCATION";
The trailing slash is important and may be the cause of the issue you see.
nless
May 3, 2017, 11:22am
15
I ran the new corrected SQL command but the error is still there.
Inside of /var/www/cms/cache and /var/www/cms/library:
alex
May 3, 2017, 11:43am
16
What if you now down and up the containers (to get fresh ones)
docker-compose down
docker-compose pull
docker-compose up -d
(adding the -f for your external MySQL file)
Beyond that I can’t think what can be causing the issue. Perhaps see if anything is recorded in the log table in the database?
nless
May 3, 2017, 12:08pm
17
In the log Table i find this here:
nless
May 3, 2017, 12:10pm
18
This folder and file does not exist in the container:
alex
May 3, 2017, 1:34pm
19
Correct it doesn’t.
That should be /var/www/cms/library/temp, which should exist.
The missing trailing slash was what the last SQL update statement should have resolved.
Did you recreate the containers, as that should have flushed any caches that were holding the incorrect value.
Worth also deleting anything in shared/cms/library/cache
directory.
1 Like
nless
May 3, 2017, 1:50pm
20
I recreate the containers, but it works only after deleting anything in shared/cms/library/cache directory.
Now it works (on the Test-System) HAPPY .
Is there an Auto-Update function in 1.8 to 1.8.1 or i have to do the same Upgrade witch the new Docker Container etc. ?