In our monitoring, RabbitMQ queues like aliveness-test
may show up as unresponsive, with a ping timeout after 10 seconds. The logfile will generally read like this:
operation queue.delete caused a channel exception not_found: failed to perform operation on queue 'example' in vhost '/' due to timeout
For the aliveness-test
queue, you can can use this command to delete it:
rabbitmqctl eval 'rabbit_amqqueue:internal_delete({resource,<<"/">>,queue,<<"aliveness-test">>}).'
This queue is only used for monitoring if RabbitMQ is alive and processing things. It does not contain customer data and will automatically be re-created after deletion.
Related cards:
Delete specific Redis-DBs
To delete a specific redis-DB you need to use the FLUSHDB
-command in combination with the SELECT
-command. For more information have a look at the documentation for FLUSHDB and [SELECT](https://redis.io/com...
Exim: investigating frozen messages in the mailqueue
Investigate why mails are frozen
The exim documentation says:
Freezing occurs when a bounce message encounters a permanent failure because the...
Barman recovery fails with missing history file
When restoring a barman PITR backup you may encounter this error:
Copying required WAL segments.
EXCEPTION: {'ret': 2, 'err': '/bin/sh: 1: cannot open /var/lib/barman/foopostgres/wals/00000007.history: No such file\n', 'out': ''}
The rea...
How to Protect container images with production tag from ECR lifecycle rules
If you want to automatically delete old container images from your Elastic Container Registry, the solution is a quite simple ECR Lifecycle Rule that deletes images e.g. 7 days after they have been pushed to the registry.
If you however want to _...
dumping and restoring PostgreSQL databases
This card is just about creating simple PostgreSQL dumps. This is no instruction for a backup strategy nor a guide for SQL dump performance optimization.
Read before starting
- I will assume that all commands will be executed as local `postgr...
Repair broken etcd node
If one etcd node is no longer a member of the remaining etcd cluster or fails to connect you need to remove it from the cluster and then add it again:
- Stop etcd on the broken node :
sudo service etcd stop
- delete the data on the broken nod...
loginctl: Failed to look up user $USER: No such process
When you get this error message from e.g. loginctl show-user [...]
after you deleted a user from your system:
# $USER is the username you deleted
loginctl: Failed to look up user $USER: No such process
then you can either switch to a L...
Useful jq commands
jq
is great when dealing with JSON data. Check out the official jq Manual.
Content
- Select only specific keys
- Modify keys
- [Set default v...
Controlling multiple PostgreSQL installations on Debian/Ubuntu
Hint
This applies only to distributions based on Debian.
Requirement
You need to setup the PostgreSQL Apt Repository first.
If you have multiple Postgres versions install...
fix clamav freshclam failing database updates
If freshclam updates are failing even though the update servers are available and you find error messages like the following in the log you may have outdated or wrong data in freshclams data files:
Thu Mar 29 12:49:52 2018 -> ClamAV update pr...