Tuesday, 27 October 2015

MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error

Just in case you encounter the error and some important data cannot be discarded on the running redis instance (someone changed permissions for the rdb file or its directory incorrectly, or running out of disk space), you can always redirect the rdb file to be written somewhere else.
Using redis-cli, you can do something like this:
CONFIG SET dir /tmp/some/directory/other/than/var
CONFIG SET dbfilename temp.rdb
After this, you might want to execute a BGSAVE command to make sure that the data will be written to the rdb file. Make sure that when you execute INFObgsave_in_progress is already 0(either the operation is successful or there is an error encountered). After that, you can now start backing up the generated rdb file somewhere safe.

If above method doesn't work, try this
config set stop-writes-on-bgsave-error no

Apache Proxy configuration file

<VirtualHost *:80>
        ServerName filter.whatshot.in
        ProxyRequests off
        TimeOut 0
        #ProxyTimeout 0
        KeepAliveTimeout 0
        #ProxyRequests off
        #ProxySet timeout=1800
        <Proxy *>
                Order deny,allow
                Allow from all
        </Proxy>
        #ProxyTimeout 0
        <Location />
                ProxyPass http://localhost:3000/
                ProxyPassReverse http://localhost:3000/
        </Location>
</VirtualHost>

Wednesday, 7 October 2015

How to install Redis 3.x on new CentOS 6.6 server

Pre installation Redis

#update and upgrade the linux
yum -y update
yum -y upgrade
#I like nano
yum install -y nano
#Install gcc & tcl, needed for compilation
yum install -y gcc*
yum install -y tcl

Install Redis
wget http://download.redis.io/releases/redis-3.0.1.tar.gz
tar xzf redis-3.0.1.tar.gz
cd redis-3.0.1
make
make test
make install
cd utils
chmod +x install_server.sh
./install_server.sh

Check Redis status/start/stop
nano /etc/redis/6379.conf
# find # requirepass foobared
#replace it with your password
requirepass somePassword
service redis_6379 restart