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 Linux distribution without systemd or restart systemd-logind
to fix this problem.
systemctl restart systemd-logind
Related cards:
Desktop notification for failed systemd user services
You can execute systemctl --user --failed
to check for failed systemd user units. But let's face it: It's inconvenient and you'll probably miss failures. Better use desktop notifications.
~/.config/systemd/user/service.d/user-failure-notifi...
HowTo: Rebalance Elasticsearch Shards
If you end up with an Elasticsearch cluster which has a very different disk usage on it's nodes you can use these steps to rebalance the shards.
Before we begin it's important to understand how Elasticsearch defines [balance](https://www.elastic....
Get information about current running passenger processes
With passenger-status --show=requests
you can get a huge JSON showing current information about the running passenger processes.
This can be useful if you want to find out what a passenger process is doing at the moment (for e.g. if one worker...
Debug Puppet "Error: Failed to apply catalog: undefined method [...] for nil:NilClass"
If you get e.g. this error message when you try to run puppet agent:
Error: Failed to apply catalog: undefined method `strip' for nil:NilClass
you could have a very bad time debugging it. Because there will be no messages in the logs wh...
Use pg_repack to do a VACUUM FULL without holding an exclusive lock during processing
You can use pg_repack
to do a VACUUM FULL
without holding an exclusive lock during processing.
There is still a need of one exclusive lock at the beginning and the end of the repacking process. But in the time between, you can use the affecte...
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...
Intel Microcode Versions and Updates
Intel CPUs receive updates, including security relevant upgrades, through 2 channels:
- Firmware/UEFI BIOS updates can also update the microcode in CPUs. This is the preferred and persistent way
- the
intel-microcode
package can patch the micro...
HowTo apply Test Driven Development to Container Images
Apply Test Driven Development(TDD) to the process of building container images by defining test before writing code and automate the testing process. Iterate through the TDD cycle while developing and running the tests later in continuous integrat...
Useful PostgreSQL commands
on the bash (issued as postgres user)
Start/Stop/Restart PostgreSQL
pg_ctl -D $configdir start|stop|restart
Start/Stop/Restart the corresponding PostgreSQL using the given configuration directory. The configuration directory sh...
Lenovo Laptop BIOS Update with Linux
You will need to look here and find your own device. Look for the "bootable CD" download, which will give you an ISO file.
Then you need a Perl script from the interne...