PostgreSQL FATAL: Peer Authentication Failed for User Postgres

Recently, I upgraded a server running Ubuntu 22.04 to 24.04, that also comes with PostgreSQL 16. For some odd reasons, the Postgres server was not managed by Ansible, and changes previously made to Postgres 15 was not recorded. I noticed that the backup database (pg_dump) was not working properly, the backup database size was just a few kilobytes. Let’s investigate, shall we? root@toto:/etc/cron.daily# ./postgresql-backup pg_dump: error: connection to server on socket "/var/run/postgresql/....

June 21, 2024 · 4 min · 666 words · kenno

Postgres: Getting Permission Denied for Schema Public

I recently upgraded the PostgreSQL server on one my server from version 14 to 16. Why the big jump? This was due to the OS running on this server was upgraded from Ubuntu 22.04 to 24.04. When the database was restored from the database dump, the application that requires that the database detects the new version and tried to perform the database migration. That’s when it failed and produced the following error message:...

June 21, 2024 · 3 min · 556 words · kenno

How to use auto-update in Podman

I have a Podman container that needs periodically manual update once in a while. I’d like this container to auto-update, and found that this was possible with podman auto-updates feature. Essentially, I need to set a label for the container - --label io.containers.autoupdate=registry. More details with and very good explanation about this topic is available at a Red Hat Enable Sysadmin article titled “How to use auto-updates and rollbacks in Podman”....

June 15, 2024 · 2 min · 378 words · kenno

How to upgrade openSUSE 15.5 to 15.6 using the cli

The following note shows how to use Zypper to do a live distribution upgrade of openSUSE Leap 15.5 to openSUSE Leap 15.6. thounchey3:~ # cat /etc/os-release NAME="openSUSE Leap" VERSION="15.5" ID="opensuse-leap" ID_LIKE="suse opensuse" VERSION_ID="15.5" PRETTY_NAME="openSUSE Leap 15.5" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:leap:15.5" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/" DOCUMENTATION_URL="https://en.opensuse.org/Portal:Leap" LOGO="distributor-logo-Leap" Check for the 3 required repositories, ensure they are enabled.` thounchey3:~ # zypper lr -u Repository priorities are without effect. All enabled repositories share the same priority. # | Alias | Name | Enabled | GPG Check | Refresh | URI ---+-----------------------------+---------------------------------------------------------------------------------------------+---------+-----------+---------+------------------------------------------------------------------------ 1 | repo-backports-debug-update | Update repository with updates for openSUSE Leap debuginfo packages from openSUSE Backports | No | ---- | ---- | http://download....

June 12, 2024 · 4 min · 785 words · kenno

Delete unused ENIs on AWS with AWS CLI

So I want to clean up Elastic Network Interfaces (ENIs) that were created for testing and no longer needed, and I want to use AWS CLI to do that. For me, I know that all unused ENIs will have their status as “available”. So I will find all those ENIs and will delete them. ➜ aws ec2 describe-network-interfaces --filters Name=status,Values=available \ --query 'NetworkInterfaces[].{NetworkInterfaceId:NetworkInterfaceId,Description:Description}' [ { "NetworkInterfaceId": "eni-0dc616df583312345", "Description": "2nd nic in 2b az" }, { "NetworkInterfaceId": "eni-0bf98b53cf1b12345", "Description": "2nd nic" }, { "NetworkInterfaceId": "eni-034bcff8ceef12345", "Description": "test-eni" }, { "NetworkInterfaceId": "eni-09adbc3a20c912345", "Description": "Test 2nd eni on custom subnet 2a AZ" } ] Next, I need to feed each of the values of “NetworkInterfaceId” to the delete command aws ec2 delete-network-interface, which takes only 1 NetworkInterfaceId at a time....

June 9, 2024 · 2 min · 271 words · kenno

Installing Xe Guest Utilities on OpenSUSE Leap 15.5

This is a quick note on how to install xe-guest-utilities on OpenSUSE Leap 15.5. Unlike other distros like AlmaLinux where xe-guest-utilities is provided by EPEL repository, on OpenSUSE Leap, this package is available in the guest-tools.iso disk. At least, I was not able to find any similar package on OpenSUSE’s repositories which provide this Xe guest utilities. Therefore, we first need to attach the guest-tools.iso disk to the VM. On Xen Orchestra web ui, perform the following:...

June 2, 2024 · 2 min · 382 words · kenno

Wicked keeps DUID on OpenSuse 15 even when NIC is replaced

I have migrated a VM running on Proxmox to Xcpng host. Despite the imported VM on Xcpng has a new NIC with new MAC address, it still retained old IP address asssigned to the old MAC of the VM running on Proxmox. The VM is running OpenSUSE Leap 15.5 and use wicked for network management. How to fix this? Spoiler alert, I figured out how to fix it. First, let’s run some commands to display some information....

May 31, 2024 · 2 min · 395 words · kenno

How to upgrade FreeBSD 13.2 to 14.0

I just found out that FreeBSD 13.2-RELEASE will be end-of-life support within 1 month time from now. It’s time to upgrade FreeBSD on one of nas boxes to 14.0-RELEASE. The following is to capture the steps used to perform the upgrade. It’s similar to my old post. SSH into the server, and run tmux or screen. You really don’t want to lose SSH connection during the upgrade. $ ssh kenno@nas2 $ tmux Check the current running version of FreeBSD: root@nas2:~ # freebsd-version 13....

May 29, 2024 · 5 min · 873 words · kenno

Rust cannot find derive macro `Serialize` in this scope

While trying out some Rust exercises, I came across the following error: $ cargo run --bin iter2 Compiling tutor-web-app-ssr v0.1.0 (/home/kenno/dev/rust/chapter7/ezytutors/tutor-web-app-ssr) error: cannot find derive macro `Serialize` in this scope --> tutor-web-app-ssr/src/bin/iter2.rs:17:10 | 17 | #[derive(Serialize, Deserialize)] | ^^^^^^^^^ | note: `Serialize` is imported here, but it is only a trait, without a derive macro --> tutor-web-app-ssr/src/bin/iter2.rs:5:26 | 5 | use serde::{Deserialize, Serialize}; | ^^^^^^^^^ error: cannot find derive macro `Deserialize` in this scope --> tutor-web-app-ssr/src/bin/iter2....

May 22, 2024 · 1 min · 157 words · kenno

How to generate Let's Encrypt SSL cert for Bitnami Lightsail

So you just setup a new shiny WordPress website on a Lightsail (WordPress) instance. Now, you’ve been told to setup an SSL certificate for your website domain. What to do? The following steps show how to generate a free SSL certificate provided by Let’s Encrypt. bitnami@ip-172-26-12-25:~$ sudo /opt/bitnami/bncert-tool ---------------------------------------------------------------------------- Welcome to the Bitnami HTTPS Configuration tool. ---------------------------------------------------------------------------- Domains Please provide a valid space-separated list of domains for which you wish to configure your web server....

May 22, 2024 · 2 min · 410 words · kenno