<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Archiwa Patching - soban</title>
	<atom:link href="https://soban.pl/category/patching/feed/" rel="self" type="application/rss+xml" />
	<link>https://soban.pl/category/patching/</link>
	<description>IT, Linux, Servers, Security</description>
	<lastBuildDate>Fri, 23 Jan 2026 16:58:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>Proxmox VM Auto-Upgrade Script (qm + vzdump) with Network Tests and Auto-Restore</title>
		<link>https://soban.pl/proxmox-vm-auto-upgrade-script/</link>
		
		<dc:creator><![CDATA[soban]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 15:56:05 +0000</pubDate>
				<category><![CDATA[Patching]]></category>
		<category><![CDATA[Proxmox]]></category>
		<guid isPermaLink="false">https://soban.pl/?p=680</guid>

					<description><![CDATA[<p>Proxmox VM Auto-Upgrade Script (qm + vzdump) with Network Tests and Auto-Restore This article describes a simple (but effective) automation script for Proxmox VE that: Where to download the script You can download the script directly from my website: soban.pl/bash/upgrade_proxmox_qm.sh Required folders Before you run anything, create two folders for scripts and logs: Install the [&#8230;]</p>
<p>Artykuł <a href="https://soban.pl/proxmox-vm-auto-upgrade-script/">Proxmox VM Auto-Upgrade Script (qm + vzdump) with Network Tests and Auto-Restore</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full is-resized"><img fetchpriority="high" decoding="async" width="498" height="745" src="https://soban.pl/wp-content/uploads/2026/01/image-1.png" alt="" class="wp-image-681" style="width:452px;height:auto" srcset="https://soban.pl/wp-content/uploads/2026/01/image-1.png 498w, https://soban.pl/wp-content/uploads/2026/01/image-1-201x300.png 201w" sizes="(max-width: 498px) 100vw, 498px" /></figure>



<p>Proxmox VM Auto-Upgrade Script (qm + vzdump) with Network Tests and Auto-Restore</p>



<p>This article describes a simple (but effective) automation script for Proxmox VE that:</p>



<ul class="wp-block-list">
<li>creates a backup of a VM (optional),</li>



<li>starts the VM if it was originally stopped,</li>



<li>runs apt upgrade + reboot inside the VM,</li>



<li>performs network tests before and after the update,</li>



<li>restores from backup automatically if tests fail (optional),</li>



<li>shuts down the VM again if it was originally stopped.</li>
</ul>



<h3 class="wp-block-heading">Where to download the script</h3>



<p>You can download the script directly from my website:</p>



<p><strong>soban.pl/bash/upgrade_proxmox_qm.sh</strong></p>



<h3 class="wp-block-heading">Required folders</h3>



<p>Before you run anything, create two folders for scripts and logs:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">mkdir -p /root/automate_scripts /root/logs</pre></div>



<h3 class="wp-block-heading">Install the script</h3>



<p>Download the file into <code>/root/automate_scripts/</code> and make it executable:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">cd /root/automate_scripts
curl -fsSL -o upgrade_proxmox_qm.sh "https://soban.pl/bash/upgrade_proxmox_qm.sh"
chmod +x /root/automate_scripts/upgrade_proxmox_qm.sh</pre></div>



<h3 class="wp-block-heading">How it works (high level)</h3>



<ul class="wp-block-list">
<li><strong>Backup</strong> (vzdump snapshot + zstd) is executed first (if enabled).</li>



<li>If the VM was <strong>stopped</strong>, the script starts it and waits <strong>WAIT_TIME</strong> seconds.</li>



<li>Runs <strong>network tests BEFORE update</strong>:
		<ul>
			
			
			
			
		</ul>
	





</li>



<li>Executes apt update/upgrade/dist-upgrade/autoremove/clean and finally <strong>reboots</strong> the VM.</li>



<li>Waits again (<strong>WAIT_TIME</strong>) and runs the same tests <strong>AFTER update</strong>.</li>



<li>If tests fail and a backup exists, it performs <strong>qmrestore</strong> automatically.</li>



<li>If the VM was originally stopped, it shuts down the VM at the end.</li>
</ul>



<h3 class="wp-block-heading">Usage</h3>



<p>The script expects exactly two arguments:</p>



<ul class="wp-block-list">
<li><code>VMID</code> &#8211; the Proxmox VM ID</li>



<li><code>TIME_SEC</code> &#8211; how long to wait after start/reboot (in seconds)</li>
</ul>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">/root/automate_scripts/upgrade_proxmox_qm.sh 901 500</pre></div>



<p><strong>Tip:</strong> choose a WAIT_TIME that matches your VM boot time and apt upgrade duration. Typical values are <code>300</code> to <code>1000</code> seconds depending on the VM.</p>



<h3 class="wp-block-heading">Full script (for reference)</h3>



<p>If you prefer to keep everything in one place, below is the full script exactly as used in this setup:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">#!/bin/bash

WAIT_TIME=$2  # wait time for VM start/restart (in seconds)
DO_BACKUP="y" # 'y' - create backup, 'n' - skip backup
DO_UPDATE="y" # 'y' - run system update, 'n' - skip update

echo "---------------START---------------"
date
echo "-----------------------------------"

# Argument check
if [ "$#" -ne 2 ]; then
    echo "Usage: $0 &lt;VMID&gt; &lt;TIME_SEC&gt;"
    exit 1
fi

VMID="$1"
TARGET_HOSTNAME=$(/usr/sbin/qm list | grep -w "$VMID" | awk '{print $2}')
VM_STATUS=$(/usr/sbin/qm status "$VMID" | awk '{print $2}')
HOST_MACHINE=$(hostname)
WAS_STOPPED=0

if [ "$VM_STATUS" = "stopped" ]; then
    WAS_STOPPED=1
else
    WAS_STOPPED=0
fi

# Create backup if DO_BACKUP is set to 'y'
backup_result="Backup not attempted"
if [ "$DO_BACKUP" = "y" ]; then
    echo "Creating backup for VM $VMID..."
    BACKUP_OUTPUT=$(/usr/bin/vzdump "$VMID" --storage local --mode snapshot --compress zstd)
    BACKUP_FILE=$(echo "$BACKUP_OUTPUT" | grep -oP 'vzdump-qemu-[^\s]+' | tr -d "'")

    if [ -z "$BACKUP_FILE" ]; then
        echo "Backup failed: No backup file created."
        backup_result="Backup created: NOK"
        exit 1
    else
        echo "Backup created successfully: $BACKUP_FILE"
        backup_result="Backup created: OK"
    fi
else
    echo "Backup not attempted (backup is disabled)."
fi

# Start VM if it was originally stopped
if [ "$WAS_STOPPED" -eq 1 ]; then
    echo "Starting VM $VMID for update..."
    /usr/sbin/qm start "$VMID"
    echo "Waiting $WAIT_TIME seconds for VM to start..."
    sleep "$WAIT_TIME"
fi

# Test functions
perform_ping_test() {
    source="$1"
    target="$2"
    if ssh root@"$source" "ping -c 3 -W 2 $target" &gt;/dev/null 2&gt;&amp;1; then
        echo "Ping from $source to $target: OK"
        return 0
    else
        echo "Ping from $source to $target: NOK"
        return 1
    fi
}

test_curl() {
    source="$1"
    target="$2"
    if ssh root@"$source" "curl -s --head --connect-timeout 5 $target" &gt;/dev/null 2&gt;&amp;1; then
        echo "Curl from $source to $target: OK"
        return 0
    else
        echo "Curl from $source to $target: NOK"
        return 1
    fi
}

perform_local_ping_test() {
    source="$1"
    target="$2"
    if ping -c 3 -W 2 "$target" &gt;/dev/null 2&gt;&amp;1; then
        echo "Ping from $source to $target: OK"
        return 0
    else
        echo "Ping from $source to $target: NOK"
        return 1
    fi
}

DEFAULT_GW=$(/sbin/ip route | grep default | awk '{print $3}')

perform_tests() {
    status=0
    perform_local_ping_test "$HOST_MACHINE" "$TARGET_HOSTNAME" || status=1
    perform_ping_test "$TARGET_HOSTNAME" "8.8.8.8" || status=1
    perform_ping_test "$TARGET_HOSTNAME" "$DEFAULT_GW" || status=1
    test_curl "$TARGET_HOSTNAME" "http://google.com" || status=1
    return ${status:-0}
}

# General tests before update
echo "--- General tests BEFORE update ---"
if perform_tests; then
    echo "All network tests before update: OK"
    echo "$backup_result"

    if [ "$backup_result" == "Backup created: OK" ] || [ "$backup_result" == "Backup not attempted" ]; then
        echo "BEFORE status: OK"
    else
        echo "BEFORE status: NOK"
    fi
else
    echo "Some network tests before update: NOK"
    echo "$backup_result"
    echo "BEFORE status: NOK"
    [ "$WAS_STOPPED" -eq 1 ] &amp;&amp; /usr/sbin/qm shutdown "$VMID"
    exit 1
fi
echo "-----------------------------------"

# System update and reboot
update_result="Upgrade system: NOK"
if [ "$DO_UPDATE" = "y" ]; then
    echo "--- Updating VM $VMID ---"
    if ssh root@"$TARGET_HOSTNAME" "/usr/bin/apt update &amp;&amp; \
                          /usr/bin/apt upgrade -y &amp;&amp; \
                          /usr/bin/apt dist-upgrade -y &amp;&amp; \
                          /usr/bin/apt autoremove -y &amp;&amp; \
                          /usr/bin/apt autoclean &amp;&amp; \
                          /usr/bin/apt clean &amp;&amp; \
                          /usr/bin/apt --purge autoremove &amp;&amp; \
                          /sbin/reboot"; then
        echo "---END Updating VM $VMID ---"
        echo "Upgrade system: OK"
        update_result="Upgrade system: OK"
    else
        echo "Upgrade system: NOK"
        update_result="Upgrade system: NOK"
        [ "$WAS_STOPPED" -eq 1 ] &amp;&amp; /usr/sbin/qm shutdown "$VMID"
        echo "Update failed. Exiting."
        exit 1
    fi
fi

# Wait for VM reboot if update was performed
if [ "$DO_UPDATE" = "y" ]; then
    echo "Waiting $WAIT_TIME seconds for VM to reboot..."
    sleep "$WAIT_TIME"
fi

# Tests after reboot if update was performed
if [ "$DO_UPDATE" = "y" ]; then
    echo "--- Network tests AFTER update ---"
    if perform_tests; then
        echo "All network tests after update: OK"
        echo "$update_result"
        echo "AFTER status: OK"
    else
        echo "Some network tests after update: NOK"
        echo "$update_result"
        echo "Attempting to restore from backup..."

        if [ "$DO_BACKUP" = "y" ]; then
            /usr/sbin/qm stop "$VMID"
            /usr/sbin/qmrestore "/var/lib/vz/dump/$BACKUP_FILE" "$VMID" --force

            if [ "$WAS_STOPPED" -eq 1 ]; then
                /usr/sbin/qm shutdown "$VMID"
            fi

            echo "Restore attempt finished. Please check VM status."
            echo "AFTER status: NOK"
        else
            echo "No backup available for restoration. The VM might not function properly after failed update."
            echo "AFTER status: NOK"
        fi
    fi
    echo "-----------------------------------"
fi

# Shut down VM if it was originally stopped
if [ "$WAS_STOPPED" -eq 1 ]; then
    echo "Shutting down VM $VMID (originally stopped)."
    /usr/sbin/qm shutdown "$VMID"
fi

echo "---------------END---------------"
date
echo "-----------------------------------"</pre></div>



<h3 class="wp-block-heading">Cron jobs (weekly schedule + per-VM logs)</h3>



<p>Below is an example crontab that runs upgrades once a week (different VM each weekday) and writes separate logs to <code>/root/logs/</code>.</p>



<p>Edit root crontab:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">crontab -e</pre></div>



<p>Paste rules like these (comments in English):</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">15 0 * * 1 /root/automate_scripts/upgrade_proxmox_qm.sh 901 500 &gt; /root/logs/kali.log 2&gt;&amp;1                 # Monday: upgrade Kali Linux (VMID 901)
15 0 * * 2 /root/automate_scripts/upgrade_proxmox_qm.sh 903 500 &gt; /root/logs/proxmox-test-01.log 2&gt;&amp;1      # Tuesday: upgrade proxmox-test-01 (VMID 903)
15 0 * * 3 /root/automate_scripts/upgrade_proxmox_qm.sh 904 500 &gt; /root/logs/ubuntu-lte.log 2&gt;&amp;1           # Wednesday: upgrade ubuntu-lte (VMID 904)
15 0 * * 4 /root/automate_scripts/upgrade_proxmox_qm.sh 905 1000 &gt; /root/logs/backup-machine.log 2&gt;&amp;1      # Thursday: upgrade backup-machine (VMID 905)</pre></div>



<h3 class="wp-block-heading">Quick checks / troubleshooting</h3>



<ul class="wp-block-list">
<li>Make sure root can SSH into the VM by hostname (the script uses <code>ssh root@&lt;vm-hostname&gt;</code>).</li>



<li>Make sure DNS (or /etc/hosts) resolves the VM hostname correctly from the Proxmox host.</li>



<li>If apt needs user interaction, ensure your VMs are set up for non-interactive upgrades (or pin/hold packages that prompt).</li>
</ul>



<p>That’s it. Drop the script into <code>/root/automate_scripts/</code>, send logs into <code>/root/logs/</code>, and your weekly VM maintenance becomes mostly fire-and-forget.</p>
<p>Artykuł <a href="https://soban.pl/proxmox-vm-auto-upgrade-script/">Proxmox VM Auto-Upgrade Script (qm + vzdump) with Network Tests and Auto-Restore</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Upgrading Apache Cassandra from Version 3.1.15 and Higher to 4.1.x on Ubuntu 20.04.5 LTS: A Comprehensive Guide</title>
		<link>https://soban.pl/upgrading-apache-cassandra-from-version-3-1-15-and-higher-to-4-1-x-on-ubuntu-20-04-5-lts-a-comprehensive-guide/</link>
		
		<dc:creator><![CDATA[soban]]></dc:creator>
		<pubDate>Mon, 11 Mar 2024 16:39:50 +0000</pubDate>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nodetool]]></category>
		<category><![CDATA[Patching]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://soban.pl/?p=410</guid>

					<description><![CDATA[<p>Upgrading Apache Cassandra to a newer version is a significant task that database administrators undertake to ensure their systems benefit from new features, enhanced security measures, and improved performance. This guide provides a detailed walkthrough for upgrading Apache Cassandra from version 3.1.15 and higher to the latest 4.1.x version, specifically on Ubuntu 20.04.5 LTS, with [&#8230;]</p>
<p>Artykuł <a href="https://soban.pl/upgrading-apache-cassandra-from-version-3-1-15-and-higher-to-4-1-x-on-ubuntu-20-04-5-lts-a-comprehensive-guide/">Upgrading Apache Cassandra from Version 3.1.15 and Higher to 4.1.x on Ubuntu 20.04.5 LTS: A Comprehensive Guide</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><img decoding="async" width="1024" height="1024" src="https://soban.pl/wp-content/uploads/2024/03/image.png" alt="" class="wp-image-413" srcset="https://soban.pl/wp-content/uploads/2024/03/image.png 1024w, https://soban.pl/wp-content/uploads/2024/03/image-300x300.png 300w, https://soban.pl/wp-content/uploads/2024/03/image-150x150.png 150w, https://soban.pl/wp-content/uploads/2024/03/image-768x768.png 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Upgrading Apache Cassandra to a newer version is a significant task that database administrators undertake to ensure their systems benefit from new features, enhanced security measures, and improved performance. This guide provides a detailed walkthrough for upgrading Apache Cassandra from version 3.1.15 and higher to the latest 4.1.x version, specifically on Ubuntu 20.04.5 LTS, with an emphasis on pre-upgrade cleaning operations to manage disk space effectively.</p>



<h3 class="wp-block-heading">Pre-upgrade Preparation</h3>



<p><strong>Backup Configuration Directory:</strong></p>



<p>Before initiating the upgrade, it&#8217;s crucial to back up the Cassandra configuration directory. This precaution allows for a swift restoration of the configuration should any issues arise during the upgrade process. Utilize the following command to create a backup, incorporating the current date into the folder name for easy identification:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># cp -r /etc/cassandra/ /root/cassandra-conf-bkp-$(date +%Y%m%d)</pre></div>



<p><strong>Pre-Cleanup Operations</strong></p>



<p>Preparation is key to a smooth upgrade. Begin with maintenance commands to guarantee data integrity and optimize space usage, especially important for systems with limited disk space.</p>



<p><strong>Scrub Data:</strong></p>



<p>Execute <code>nodetool scrub</code> to clean and reorganize data on disk. Given that this operation may be time-consuming, particularly for databases with large amounts of data or limited disk space, it&#8217;s a critical step for a healthy upgrade process.</p>



<p><strong>Clear Snapshots:</strong></p>



<p>To further manage disk space, use <code>nodetool clearsnapshot</code> to remove existing snapshots, freeing up space for the upgrade process. To delete all snapshots on the node, simply use this method if you&#8217;re running out of space:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># nodetool clearsnapshot --all</pre></div>



<p><strong>Cleanup Data:</strong></p>



<p>Perform a <code>nodetool cleanup</code> to purge unnecessary data. In scenarios where disk space is a premium, it&#8217;s advisable to execute a scrub operation without generating a snapshot to conserve space:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># nodetool scrub --no-snapshot</pre></div>



<h3 class="wp-block-heading">Draining and Stopping Cassandra</h3>



<p><strong>Drain the Node:</strong></p>



<p>Prior to halting the Cassandra service, ensure all data in memory is flushed to disk with <code>nodetool drain</code>.</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># nodetool drain</pre></div>



<p><strong>Stop the Cassandra Service:</strong></p>



<p>Cease the running Cassandra services to proceed with the upgrade safely:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># systemctl stop cassandra.service</pre></div>



<h3 class="wp-block-heading">Upgrading Cassandra</h3>



<p><strong>Update Source List:</strong></p>



<p>Edit the repository sources to point to the new version of Cassandra by adjusting the <code>cassandra.sources.list</code> file:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># echo "deb https://debian.cassandra.apache.org 41x main" &gt; /etc/apt/sources.list.d/cassandra.sources.list</pre></div>



<p><strong>Upgrade Packages:</strong></p>



<p>With the repository sources updated, refresh the package list and upgrade the packages. When executing the <code>apt upgrade</code> command, you can keep pressing Enter as the default option is &#8216;N&#8217; (No):</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># apt update &amp;&amp; apt upgrade</pre></div>



<p><strong>Modify Configuration:</strong></p>



<p>Adjust the Cassandra configuration for version 4.1.x by commenting out or deleting deprecated options:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># for var in thrift_prepared_statements_cache_size_mb start_rpc rpc_port rpc_server_type thrift_framed_transport_size_in_mb request_scheduler; do sed -i "/$var:/s/^/#/" /etc/cassandra/cassandra.yaml; done</pre></div>



<p><strong>Update JAMM Library:</strong></p>



<p>Ensure the Java Agent Memory Manager (JAMM) library is updated to enhance performance:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># sed -i 's|jamm-0.3.0.jar|jamm-0.3.2.jar|g' /etc/cassandra/cassandra-env.sh</pre></div>



<p><strong>Backup and update the JVM options file</strong>:</p>



<p>It&#8217;s a good practice to back up configuration files before making changes. This step renames the existing <code>jvm-server.options</code> file to <code>jvm-server.options.orig</code> as a backup. Then, it copies the <code>jvm.options</code> file to <code>jvm-server.options</code> to apply the standard JVM options for Cassandra servers.</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># cd /etc/cassandra/
# mv jvm-server.options jvm-server.options.orig &amp;&amp; cp -p jvm.options jvm-server.options</pre></div>



<h3 class="wp-block-heading">Optimization and Verification</h3>



<p><strong>Optimize Memory Usage:</strong></p>



<p>Post-upgrade, it&#8217;s beneficial to evaluate and optimize memory usage and swap space to ensure efficient Cassandra operation:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># swapoff -a &amp;&amp; swapon -a</pre></div>



<p><strong>Restart the Cassandra Service:</strong></p>



<p>Apply the new version by restarting the Cassandra service:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># systemctl start cassandra.service</pre></div>



<p><strong>Verify Upgrade:</strong></p>



<p>Confirm the success of the upgrade by inspecting the cluster&#8217;s topology and state, ensuring all nodes are functional:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># nodetool describecluster
# nodetool status</pre></div>



<p>By adhering to this comprehensive guide, database administrators can effectively upgrade Apache Cassandra to version 4.1.x, capitalizing on the latest advancements and optimizations the platform has to offer, while ensuring data integrity and system performance through careful pre-upgrade preparations.</p>



<p><strong>Optimization and Verification</strong></p>



<p>After successfully upgrading Apache Cassandra to version 4.1.x and ensuring the cluster is fully operational, it&#8217;s crucial to conduct post-upgrade maintenance to optimize the performance and security of your database system. This section outlines essential steps and considerations to maintain a healthy and efficient Cassandra environment.<br><br><strong>Monitor Performance and Logs</strong></p>



<p>In the immediate aftermath of the upgrade, closely monitor the system&#8217;s performance, including CPU, memory usage, and disk I/O, to identify any unexpected behavior or bottlenecks. Additionally, review the Cassandra system logs for warnings or errors that may indicate potential issues requiring attention.</p>



<p><strong>Tune and Optimize</strong></p>



<p>Based on the performance monitoring insights, you may need to adjust Cassandra&#8217;s configuration settings for optimal performance. Consider tuning parameters related to JVM options, compaction, and read/write performance, keeping in mind the specific workload and data patterns of your application.</p>



<p><strong>Run nodetool upgradesstables</strong></p>



<p>To ensure that all SSTables are updated to the latest format, execute <code>nodetool upgradesstables</code> on each node in the cluster. This operation will rewrite SSTables that are not already in the current format, which is essential for taking full advantage of the improvements and features in Cassandra 4.1.x (Check the space, and if required, delete all snapshots as shown above.):</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># time nodetool upgradesstables</pre></div>



<p>This process can be resource-intensive and should be scheduled during off-peak hours to minimize impact on live traffic.</p>



<p><strong>Implement Security Enhancements</strong></p>



<p>Cassandra 4.1.x includes several security enhancements. Review the latest security features and best practices, such as enabling client-to-node encryption, node-to-node encryption, and advanced authentication mechanisms, to enhance the security posture of your Cassandra cluster.</p>



<p><strong>Review and Update Backup Strategies</strong></p>



<p>With the new version in place, reassess your backup strategies to ensure they are still effective and meet your recovery objectives. Verify that your backup and restore procedures are compatible with Cassandra 4.1.x and consider leveraging new tools or features that may have been introduced in this release for more efficient data management.</p>
<p>Artykuł <a href="https://soban.pl/upgrading-apache-cassandra-from-version-3-1-15-and-higher-to-4-1-x-on-ubuntu-20-04-5-lts-a-comprehensive-guide/">Upgrading Apache Cassandra from Version 3.1.15 and Higher to 4.1.x on Ubuntu 20.04.5 LTS: A Comprehensive Guide</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Error on Oracle Linux 7 rpmdb: BDB0113</title>
		<link>https://soban.pl/error-on-oracle-linux-7-rpmdb-bdb0113/</link>
		
		<dc:creator><![CDATA[soban]]></dc:creator>
		<pubDate>Tue, 12 Oct 2021 15:32:31 +0000</pubDate>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle Linux]]></category>
		<category><![CDATA[Patching]]></category>
		<guid isPermaLink="false">https://soban.pl/?p=104</guid>

					<description><![CDATA[<p>Sometimes on Oracle Linux there is problem, when you try use &#8220;yum&#8221; and get error like this: The fixing of this problem, you can try rebuild db: And then should work: That&#8217;s all!</p>
<p>Artykuł <a href="https://soban.pl/error-on-oracle-linux-7-rpmdb-bdb0113/">Error on Oracle Linux 7 rpmdb: BDB0113</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Sometimes on Oracle Linux there is problem, when you try use &#8220;yum&#8221; and get error like this:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># yum update

error: rpmdb: BDB0113 Thread/process 16934/140571185240320 failed: BDB1507 Thread died in Berkeley DB library

error: db5 error(-30973) from dbenv-&gt;failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery

error: cannot open Packages index using db5 -  (-30973)

error: cannot open Packages database in /var/lib/rpm

CRITICAL:yum.main:

 

Error: rpmdb open failed</pre></div>



<p>The fixing of this problem, you can try rebuild db:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># rpm --rebuilddb</pre></div>



<p>And then should work:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># yum update</pre></div>



<p>That&#8217;s all!</p>
<p>Artykuł <a href="https://soban.pl/error-on-oracle-linux-7-rpmdb-bdb0113/">Error on Oracle Linux 7 rpmdb: BDB0113</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Automatic update of the Debian Linux test environment</title>
		<link>https://soban.pl/automatic-update-of-the-debian-linux-test-environment/</link>
		
		<dc:creator><![CDATA[soban]]></dc:creator>
		<pubDate>Fri, 08 Oct 2021 10:25:10 +0000</pubDate>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Patching]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://soban.pl/?p=78</guid>

					<description><![CDATA[<p>A convenient way to maintain the test environment is automatic updating.However, remember to set the backup, e.g. the day before &#8211; I always set it like that in proxmoxe.The script that updates the Debian system looks like this: You can download the script from: The script cleans unnecessary deb files after the update.Keep in mind [&#8230;]</p>
<p>Artykuł <a href="https://soban.pl/automatic-update-of-the-debian-linux-test-environment/">Automatic update of the Debian Linux test environment</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>A convenient way to maintain the test environment is automatic updating.<br>However, remember to set the backup, e.g. the day before &#8211; I always set it like that in proxmoxe.<br>The script that updates the Debian system looks like this:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># cat /root/update.sh
#!/bin/bash
apt-get update
apt-get upgrade -q -y
apt-get autoremove -y -q
rm -rf /var/cache/apt/archives/*.deb</pre></div>



<p>You can download the script from:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">$ cd /root/
$ wget https://soban.pl/bash/update.sh</pre></div>



<p>The script cleans unnecessary deb files after the update.<br>Keep in mind the permissions and capabilities of the script:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># chmod +x /root/update.sh</pre></div>



<p>In crontab, I set the day after automatic backup in proxmoxe:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">10 4 * * 3 /root/update.sh &gt; /dev/null 2&gt;&amp;1</pre></div>



<p>Of course, the script can be added in the production environment, but it should not be added to the crontab.</p>
<p>Artykuł <a href="https://soban.pl/automatic-update-of-the-debian-linux-test-environment/">Automatic update of the Debian Linux test environment</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>E-mail notification about new updates Proxmox</title>
		<link>https://soban.pl/e-mail-notification-about-new-updates/</link>
		
		<dc:creator><![CDATA[soban]]></dc:creator>
		<pubDate>Fri, 08 Oct 2021 09:48:01 +0000</pubDate>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Patching]]></category>
		<category><![CDATA[Proxmox]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://soban.pl/?p=72</guid>

					<description><![CDATA[<p>This script send you e-mail notification about new updates: You can download the script from: You should set the correct e-mail address in the script, for now it is soban@soban.plNotification it&#8217;s looks something like that: Should the script be executed: Also added to the crontab, every day to extend a new update: Remember don&#8217;t to [&#8230;]</p>
<p>Artykuł <a href="https://soban.pl/e-mail-notification-about-new-updates/">E-mail notification about new updates Proxmox</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p> This script send you e-mail notification about new updates: </p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># cat /root/check_update.sh
#!/bin/bash
email=soban@soban.pl
hostnam=`hostname`
apt-get update
# sometimes change number of lines (for example proxmox 4.4 - 4; proxmox 5 - 5)
if [ `apt-get --just-print upgrade | wc -l` != 5 ]
then
        apt-get --just-print upgrade |  mail -s "Update checker $hostnam" $email
fi</pre></div>



<p>You can download the script from:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">$ cd /root/
$ wget https://soban.pl/bash/check_update.sh</pre></div>



<p>You should set the correct e-mail address in the script, for now it is soban@soban.pl<br>Notification it&#8217;s looks something like that:<br></p>



<figure class="wp-block-image size-full"><img decoding="async" width="726" height="343" src="https://soban.pl/wp-content/uploads/2021/10/image-12.png" alt="" class="wp-image-73" srcset="https://soban.pl/wp-content/uploads/2021/10/image-12.png 726w, https://soban.pl/wp-content/uploads/2021/10/image-12-300x142.png 300w" sizes="(max-width: 726px) 100vw, 726px" /></figure>



<p>Should the script be executed:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># chmod +x /root/check_update.sh</pre></div>



<p>Also added to the crontab, every day to extend a new update:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">00 06 * * * /root/check_update.sh &gt; /dev/null 2&gt;&amp;1</pre></div>



<p>Remember don&#8217;t to upgrade your system on Friday! Good luck!</p>
<p>Artykuł <a href="https://soban.pl/e-mail-notification-about-new-updates/">E-mail notification about new updates Proxmox</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Upgrade Debian GNU/Linux 10 (buster) to 11 (bullseye)</title>
		<link>https://soban.pl/upgrade-debian-gnu-linux-10-buster-to-11-bullseye/</link>
		
		<dc:creator><![CDATA[soban]]></dc:creator>
		<pubDate>Fri, 01 Oct 2021 13:26:37 +0000</pubDate>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Patching]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://soban.pl/?p=42</guid>

					<description><![CDATA[<p>Before we start upgrading the Debian system version, please make a snapshot or a possible backup of the system. Such a change entails significant changes that can damage the system. Of course, before you upgrade the system in production, it is best to upgrade to the testing environment first. The upgrade process affects the entire [&#8230;]</p>
<p>Artykuł <a href="https://soban.pl/upgrade-debian-gnu-linux-10-buster-to-11-bullseye/">Upgrade Debian GNU/Linux 10 (buster) to 11 (bullseye)</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Before we start upgrading the Debian system version, please make a snapshot or a possible backup of the system. Such a change entails significant changes that can damage the system. Of course, before you upgrade the system in production, it is best to upgrade to the testing environment first. The upgrade process affects the entire system. Services may not be available at this time. If the system is doing the hosting for your website then it may not be available!<br><br>Always bear in mind that the production environment is different from test environment, so I recommend that you do it carefully. A good practice is to keep a time interval between the upgrade of test and production environment, in my case it is a week. Remember not to make changes to production on Friday!<br><br>This is how we check the version of the system:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="870" height="364" src="https://soban.pl/wp-content/uploads/2021/10/image.png" alt="" class="wp-image-45" srcset="https://soban.pl/wp-content/uploads/2021/10/image.png 870w, https://soban.pl/wp-content/uploads/2021/10/image-300x126.png 300w, https://soban.pl/wp-content/uploads/2021/10/image-768x321.png 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></figure>



<p>And now, we going to update OS, but before we do that &#8211; we will make copy of:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">cp /etc/apt/sources.list /root/sources.list_buster</pre></div>



<p>There is sorces setup for buster:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># cat /etc/apt/sources.list
deb http://ftp.debian.org/debian buster main contrib
deb http://ftp.debian.org/debian buster-updates main contrib
deb http://security.debian.org buster/updates main contrib
deb http://nginx.org/packages/debian/ buster nginx
deb-src http://nginx.org/packages/debian/ buster nginx</pre></div>



<p>Before we upgrade the debian system version to 11, we need to do a full upgrade:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># apt update &amp;&amp; apt upgrade -q -y &amp;&amp; apt dist-upgrade -q -y &amp;&amp; apt autoremove -y -q</pre></div>



<p>Then we use sed to replace &#8220;buster&#8221; on &#8220;bullseye&#8221;:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># sed -i 's/buster/bullseye/g' /etc/apt/sources.list</pre></div>



<p>There here&#8217;s the effect:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># cat /etc/apt/sources.list</pre></div>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="769" height="128" src="https://soban.pl/wp-content/uploads/2021/10/image-25.png" alt="" class="wp-image-114" srcset="https://soban.pl/wp-content/uploads/2021/10/image-25.png 769w, https://soban.pl/wp-content/uploads/2021/10/image-25-300x50.png 300w" sizes="auto, (max-width: 769px) 100vw, 769px" /></figure>



<p>To be sure, we will do a comparison of the backed up file:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="346" src="https://soban.pl/wp-content/uploads/2021/10/image-2-1024x346.png" alt="" class="wp-image-48" srcset="https://soban.pl/wp-content/uploads/2021/10/image-2-1024x346.png 1024w, https://soban.pl/wp-content/uploads/2021/10/image-2-300x101.png 300w, https://soban.pl/wp-content/uploads/2021/10/image-2-768x260.png 768w, https://soban.pl/wp-content/uploads/2021/10/image-2.png 1156w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>And then we can do update:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># apt update &amp;&amp; apt upgrade -q -y &amp;&amp; apt dist-upgrade -q -y &amp;&amp; apt autoremove -y -q</pre></div>



<p><br>So that it is not too easy, to start the task in the form of:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="186" src="https://soban.pl/wp-content/uploads/2021/10/image-1-1024x186.png" alt="" class="wp-image-47" srcset="https://soban.pl/wp-content/uploads/2021/10/image-1-1024x186.png 1024w, https://soban.pl/wp-content/uploads/2021/10/image-1-300x55.png 300w, https://soban.pl/wp-content/uploads/2021/10/image-1-768x140.png 768w, https://soban.pl/wp-content/uploads/2021/10/image-1.png 1094w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p><br>Specifically about this error:</p>



<pre class="wp-block-preformatted">Err:5 http://security.debian.org bullseye/updates Release
  404  Not Found [IP: 199.232.150.132 80]
Reading package lists... Done
E: The repository 'http://security.debian.org bullseye/updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.</pre>



<p>To fix it, use any editor on the file (vi in ​​my case):</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># vi /etc/apt/sources.list</pre></div>



<p>We remove line 4 &#8211; &#8220;deb http://security.debian.org buster/updates main contrib&#8221; as you can see, we go out and save :</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="378" src="https://soban.pl/wp-content/uploads/2021/10/image-3-1024x378.png" alt="" class="wp-image-49" srcset="https://soban.pl/wp-content/uploads/2021/10/image-3-1024x378.png 1024w, https://soban.pl/wp-content/uploads/2021/10/image-3-300x111.png 300w, https://soban.pl/wp-content/uploads/2021/10/image-3-768x284.png 768w, https://soban.pl/wp-content/uploads/2021/10/image-3.png 1123w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Of course, any other editor like nano is also good for this case.<br>The contents of the /etc/apt/sources.list file now looks like this:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># cat /etc/apt/sources.list
deb http://ftp.debian.org/debian bullseye main contrib
deb http://ftp.debian.org/debian bullseye-updates main contrib
deb http://nginx.org/packages/debian/ bullseye nginx
deb-src http://nginx.org/packages/debian/ bullseye nginx</pre></div>



<p>We can try to update the system again:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># apt update &amp;&amp; apt upgrade -q -y &amp;&amp; apt dist-upgrade -q -y &amp;&amp; apt autoremove -y -q</pre></div>



<p>Now you need get some the system upgrade process has started. You can go for a coffee, or not 😉<br>There will be questions.<br>And more information, albout apt listchanges:<br></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="944" height="904" src="https://soban.pl/wp-content/uploads/2021/10/image-6.png" alt="" class="wp-image-54" srcset="https://soban.pl/wp-content/uploads/2021/10/image-6.png 944w, https://soban.pl/wp-content/uploads/2021/10/image-6-300x287.png 300w, https://soban.pl/wp-content/uploads/2021/10/image-6-768x735.png 768w" sizes="auto, (max-width: 944px) 100vw, 944px" /></figure>



<p>Just press &#8216;q&#8217; and enter.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="166" src="https://soban.pl/wp-content/uploads/2021/10/image-4-1024x166.png" alt="" class="wp-image-51" srcset="https://soban.pl/wp-content/uploads/2021/10/image-4-1024x166.png 1024w, https://soban.pl/wp-content/uploads/2021/10/image-4-300x49.png 300w, https://soban.pl/wp-content/uploads/2021/10/image-4-768x124.png 768w, https://soban.pl/wp-content/uploads/2021/10/image-4-1536x248.png 1536w, https://soban.pl/wp-content/uploads/2021/10/image-4.png 1917w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>In this case we press enter.</p>



<p>Services to restart:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="194" src="https://soban.pl/wp-content/uploads/2021/10/image-8-1024x194.png" alt="" class="wp-image-56" srcset="https://soban.pl/wp-content/uploads/2021/10/image-8-1024x194.png 1024w, https://soban.pl/wp-content/uploads/2021/10/image-8-300x57.png 300w, https://soban.pl/wp-content/uploads/2021/10/image-8-768x146.png 768w, https://soban.pl/wp-content/uploads/2021/10/image-8-1536x291.png 1536w, https://soban.pl/wp-content/uploads/2021/10/image-8.png 1915w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Enter agien.</p>



<p>This is question, about ssh deamon configuration:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="247" src="https://soban.pl/wp-content/uploads/2021/10/image-9-1024x247.png" alt="" class="wp-image-57" srcset="https://soban.pl/wp-content/uploads/2021/10/image-9-1024x247.png 1024w, https://soban.pl/wp-content/uploads/2021/10/image-9-300x72.png 300w, https://soban.pl/wp-content/uploads/2021/10/image-9-768x185.png 768w, https://soban.pl/wp-content/uploads/2021/10/image-9-1536x370.png 1536w, https://soban.pl/wp-content/uploads/2021/10/image-9.png 1905w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>In my case, I press enter because I don&#8217;t want to make changes to its configuration.</p>



<p><br>If all went well, we can reboot the system:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># reboot</pre></div>



<p>Now check the system:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="621" height="222" src="https://soban.pl/wp-content/uploads/2021/10/image-11.png" alt="" class="wp-image-60" srcset="https://soban.pl/wp-content/uploads/2021/10/image-11.png 621w, https://soban.pl/wp-content/uploads/2021/10/image-11-300x107.png 300w" sizes="auto, (max-width: 621px) 100vw, 621px" /></figure>



<p>Congratulations, we are on the new version of the system!<br>At this point, we can verify all services, for example whether the website is working properly. If it is OK, upgrade the production environment.<br><br>In my cases, I have problem PHP new version.<br>PHP have no persmision on nginx to user &#8211; when I try enter to page:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># tail -f /var/log/nginx/error-*.log 
unix:/var/run/php/php-fpm.sock failed (13: Permission denied)</pre></div>



<p>So we need to fix that in this way:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># service php7.4-fpm status
* php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
     Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2021-10-01 14:59:14 CEST; 3min 28s ago
       Docs: man:php-fpm7.4(8)
    Process: 289 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/S&gt;
   Main PID: 116 (php-fpm7.4)
     Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
        CPU: 364ms
     CGroup: /system.slice/php7.4-fpm.service
             |-116 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
             |-287 php-fpm: pool www
             `-288 php-fpm: pool www

Oct 01 14:59:11 soban-pl systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
Oct 01 14:59:14 soban-pl systemd[1]: Started The PHP 7.4 FastCGI Process Manager.</pre></div>



<p>There is something wrong with the permissions:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># grep www-data /etc/php/7.4/fpm/pool.d/www.conf
user = www-data
group = www-data
listen.owner = www-data
listen.group = www-data</pre></div>



<p>Let&#8217;s make some backup:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># cp /etc/php/7.4/fpm/pool.d/www.conf /etc/php/7.4/fpm/pool.d/www.conf.backup.$(date +%F)</pre></div>



<p>I will replace www-data to nginx:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># sed -i 's/www-data/nginx/g' /etc/php/7.4/fpm/pool.d/www.conf</pre></div>



<p>Now it&#8217;s looks better:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># grep nginx /etc/php/7.4/fpm/pool.d/www.conf
user = nginx
group = nginx
listen.owner = nginx
listen.group = nginx</pre></div>



<p>And restart services:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># service php7.4-fpm restart</pre></div>



<p>Also checking status:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="195" src="https://soban.pl/wp-content/uploads/2021/10/image-10-1024x195.png" alt="" class="wp-image-58" srcset="https://soban.pl/wp-content/uploads/2021/10/image-10-1024x195.png 1024w, https://soban.pl/wp-content/uploads/2021/10/image-10-300x57.png 300w, https://soban.pl/wp-content/uploads/2021/10/image-10-768x146.png 768w, https://soban.pl/wp-content/uploads/2021/10/image-10-1536x292.png 1536w, https://soban.pl/wp-content/uploads/2021/10/image-10.png 1915w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Another problem is that, mariadb was removed, so I install it agien:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># apt-get install mariadb-server mariadb-client -y</pre></div>



<p>and that resolved all my problems.</p>



<p>To be 100% sure, I reloaded the entire machine.</p>
<p>Artykuł <a href="https://soban.pl/upgrade-debian-gnu-linux-10-buster-to-11-bullseye/">Upgrade Debian GNU/Linux 10 (buster) to 11 (bullseye)</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
