How to make redis throw exception on write error? - caching

Even if there is issue in writing to disk during snapshoting, redis doesn't throw any errors. There are no errors related to write fail in redis server logs. It simply says 0 MB of memory used by copy-on-write in logs. Therefore we are not able to figure out whether there is issue in writing to disk or everything is normal. Even if we manually remove write permission on path, it doesn't throw any error. My question is how to make redis throw error when there is issue in writing to disk? We want to do some automation whenever we detects errors in logs. Is there any settings we have to change to make redis throw error, in case if it is failed to write on disk?

You can set enable RDB snapshot, and configure stop-writes-on-bgsave-error yes.
With this configuration, Redis stops accepting write requests once it fails to do background save on disk.

Related

Couldn’t acquire exclusive lock on DB at ‘/eventstore/db’

I’m trying to install eventstore on ubuntu 20.04 but everytime I run evenstored --what-if (as root or as simple user, or as sudo) I get the following error message : Couldn't acquire exclusive lock on DB at '/eventstore/db'..
I tried many things :
I tried ensuring that eventstore user and group were owner of the folder.
reinstalling eventstore
rebooting server
stop process with systemctl stop eventstore and starting it back again
I also tried launching service first (as root / sudo or simple user) before using eventstored --what-if.
I can’t figure out why I keep getting this message as if many instance of eventstore where launched at the same time.
EDIT :
Here is my config file (/etc/eventstore/eventstore.conf)
# Paths
Db: /eventstore/db
Index: /eventstore/index
Log: /eventstore/logs
# Certificates configuration
CertificateFile: /etc/eventstore/certs/cert.crt
CertificatePrivateKeyFile: /etc/eventstore/certs/privkey.key
TrustedRootCertificatesPath: /etc/ssl/certs
CertificateReservedNodeCommonName: "*.mathob-jehanno.com"
# Network configuration
IntIp: 37.187.2.103
ExtIp: 37.187.2.103
IntHostAdvertiseAs: mathob-jehanno.com
ExtHostAdvertiseAs: mathob-jehanno.com
HttpPort: 2113
IntTcpPort: 1112
EnableExternalTcp: false
EnableAtomPubOverHTTP: false
# Projections configuration
RunProjections: None
It happened to me previously. I was running v20 without supplying the necessary settings like the certificates were missing. The server crashed because of this, but the last message you see is this Couldn't acquire exclusive lock on DB at '/eventstore/db'. You might look close and see if it's a warning, and the real reason for the crash is mentioned earlier in the stack trace of the original error.
Ok so
First of all, comments helped a lot :
this error message is following another one which give more detail about what the problem is.
One thing to know is that eventstored --what-if is supposed to be run while service is not running so user need to stop the service before (systemctl stop eventstore).
I then changed the path to db, index and logs file to match the default value (it prevented me some permissions error).

[Error]: Failed to run command with error: Error Domain=Parse Code=428

I get this error sometimes when trying to save things to Parse or to fetch data from it.
This is not constant and appear once in a while making the operation to fail.
I have contacted Parse for that. Here is their answer:
Starting on 4/28/2016, apps that have not migrated their database may see a "428" error code if the request cannot be handled by the remaining shared pool of resources. If you see this error in your logs, we highly recommend migrating the database for your app without delay.
Means this happens because of starting this date all apps are on low priority but those who started DB migration. So, Migration of the DB should resolve that.

Redis throughs (ERR operation not permitted) error even after properly running for 1 to 2 hrs

I have used Redis in my project for Caching purpose, I used Spring for that set up, You can go through the below mentioned link to understand what I did in my project.
http://caseyscarborough.com/blog/2014/12/18/caching-data-in-spring-using-redis/
This code was running fine in production environment (Rhel 7- EC2 instance) from last 6 to 8 months. Now suddenly it started giving "ERR operation not permitted" error
org.springframework.dao.InvalidDataAccessApiUsageException: ERR operation not permitted; nested exception is redis.clients.jedis.exceptions.JedisDataException: ERR operation not permitted
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:44)
Due to this we are unable to fetch the data from Redis server. Hence our application doesn't work properly.
I did search on this issue, I have gone through the links like
redis (error) ERR operation not permitted
This says to check "requirepass" in redis.conf file whether its commented or not, But when I saw redis.conf file in production environment its commented out.
Even through its commented I ran below mentioned command on redis-cli
"AUTH foobared"
After runing the above mentioned command, It didn't work.
Note : But when we kill the running instance of Redis and Restart it, It will start working properly then it doesn't give "ERR operation not permitted" error.
After Restart of Redis the system start working properly for another one to two hours, then again same issue arises and it will again goes off after I restart the Redis server.
Note : I tried upgrading Redis server from 2.6 to 3 even though it didn't work
Is your Redis exposed to the internet?
It's possibly a CONFIG SET requirepass attack.
See this SO question and #antirez comments here

unexpected mongo exit code 100 with meteor on windows

I am keep getting this error message when I run "meteor" on cmd on windows.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Can't start Mongo server.
MongoDB had an unspecified uncaught expection.
This can be caused by MongoDB being unable to write to a local database.
Check that you have permissions to write to .meteor/local. mongoDB does not support filesystems like NFS that do not allow file locking.
This happens right after I downloaded meteor and created my first project. I already tried resetting the project. I saw people recommend removing the lock file in db folder. However, when I check .meteor/local/db, its empty.
Try to reset Meteor.
-Meteor reset
-Meteor
Update Meteor.
-meteor update --release 1.4.0.1
Your username could be the problem.
In my case, it works fine when I moved the project's folder to other user's folder.
Check that you have permissions to write to .meteor/local. mongoDB does not support filesystems like NFS that do not allow file locking.
This is probably your problem.
If you use GitHub for your project, I'd strongly recommend you clone your project from GitHub into your Documents directory, and try running meteor again from there.
Don't copy your existing folder to Documents, because you'll just copy the existing busted permissions. If you're not familiar with the Windows folder permissions model, you're going to have a bad time dealing with this problem.

SQLException like archiver error. Connect internal only, until freed

can any one give me an idea regarding this below error:
2011-02-11 05:48:42,858
-[c=STATS_VITALS] Error running system monitor for connectionCloseTime:
java.sql.SQLException: ORA-00257: archiver error.
Connect internal only, until freed.
java.sql.SQLException: ORA-00257: archiver error.
Connect internal only, until freed.
This usually occurs when the system encounters an error while trying to archive a redo log. Was this working previously and it just failed now for the first time, or is this a new installation? Do you know where your logs are being archived? If so, check to see if that location is out of space as a first step. Once you have more information we might be able to help you a little more effectively.

Resources