Symptoms
Apache log files are not getting updates for webspaces hosted on NG web server.
The following error is logged to /var/log/messages
continuously:
Feb 10 10:49:51 ngweb1 /usr/sbin/log-dumper[548274]: Error on communication with redis: READONLY You can't write against a read only slave.
Another symptom of the problem can be failed "Creating virtual host directory structure" tasks with the output of:
User 'eXXXXXXX' does not exist
Cause
redis
package has been updated on the NG web host(s) from a foreign repository to higher version that supported, which also could bring the read-only configuration.
[root@ngweb1 ~]# yum info redis
Loaded plugins: fastestmirror, rhnplugin, security
Loading mirror speeds from cached hostfile
* cloudlinux-x86_64-server-6: de-proxy.cl-mirror.net
* epel: ftp.icm.edu.pl
Installed Packages
Name : redis
Arch : x86_64
Version : 3.2.11
Repo : epel
[root@ngweb1 ~]# grep read-only /etc/redis.conf
# Since Redis 2.6 by default slaves are read-only.
slave-read-only yes
This may occur if Cloudlinux updates enabled imunify360
repository automatically (/etc/yum.repos.d/cloudlinux-imunify360.repo
).
Resolution
1. Disable all foreign repositories, the only YUM repos to be left are:
cloudlinux-x86_64-server-6
pa-central-repo
2. Downgrade redis package:
# yum downgrade redis
3. Stop Redis
# service redis stop
4. Delete or move RDB dump from /var/lib/redis/
5. In PCP > Infrastructure > Service Nodes > node_name > 'General' tab press Sync data to redis button
6. Wait for Dump webspace data to redis task to finish.
7. Start Redis
# service redis start
Please be aware that Redis shutdown causes downtime of customers' websites. Please also make sure /etc/redis.conf
file does not contain slave-read-only
setting set to "yes" afterwards.