Just updated Debian 10 > Debian 11 (i know, dist upgrade could fail).
I’m also getting the same The plugin (domains...) cannot be disabled, as it is used by the following virtual servers : $2
I didn’t get the error with sudo apt upgrade --without-new-pkgs
, but after sudo apt full-upgrade
and reboot.
Just to report here.
I asked a AI to create a compare-script, to compare the files.
Remember to chmod +x the script, before executing it. Start with: ./compare-files.sh /etc/webmin/virtual-server/config /etc/webmin/virtual-server/last-config
.
Compare 'config' with 'last-config'
#!/bin/bash
# Function to parse a file into an associative array
parse_file() {
local file=$1
declare -A params
# Read the file line by line and populate the associative array
while IFS='=' read -r key value; do
# Remove leading and trailing spaces from the key and value
key=$(echo "$key" | xargs)
value=$(echo "$value" | xargs)
# Handle the case where the value is an empty string (e.g., "key=")
if [[ -z "$value" ]]; then
value=""
fi
# Store the key-value pair in the associative array
params["$key"]="$value"
done < "$file"
# Return the associative array keys and values
echo "${!params[@]}" "${params[@]}"
# Return the associative array keys and values
}
# Compare two files
compare_files() {
local file1=$1
local file2=$2
# Parse both files and store their key-value pairs in associative arrays
declare -A params1 params2
# Read key-value pairs from file1
while IFS='=' read -r key value; do
key=$(echo "$key" | xargs)
value=$(echo "$value" | xargs)
# Handle the case where the value is empty (e.g., "key=")
if [[ -z "$value" ]]; then
value=""
fi
params1["$key"]="$value"
done < "$file1"
# Read key-value pairs from file2
while IFS='=' read -r key value; do
key=$(echo "$key" | xargs)
value=$(echo "$value" | xargs)
# Handle the case where the value is empty (e.g., "key=")
if [[ -z "$value" ]]; then
value=""
fi
params2["$key"]="$value"
done < "$file2"
# Compare the two associative arrays
# Check for keys in file1 that are missing in file2 or have different values
for key in "${!params1[@]}"; do
if [[ -z "${params2[$key]}" && "${params1[$key]}" != "" ]]; then
echo "Key '$key' is missing in the second file."
elif [[ "${params1[$key]}" != "${params2[$key]}" ]]; then
echo "Mismatch for '$key': '${params1[$key]}' (file1) vs '${params2[$key]}' (file2)"
fi
done
# Check for extra keys in file2 that are missing in file1
for key in "${!params2[@]}"; do
if [[ -z "${params1[$key]}" && "${params2[$key]}" != "" ]]; then
echo "Key '$key' is missing in the first file."
fi
done
}
# Call the compare_files function with two file paths
compare_files "$1" "$2"
Here’s the difference:
Key 'single_tx' is missing in the second file.
Key 'cgimode' is missing in the second file.
Key 'show_dbs' is missing in the second file.
Key 'proftpd_ssl' is missing in the second file.
Key 'allow_numbers' is missing in the second file.
Key 'show_domains_lastlogin' is missing in the second file.
Key 'err_letsencrypt' is missing in the second file.
Key 'dynip_update' is missing in the second file.
Mismatch for 'last_letsencrypt_mass_renewal': '1734714306' (file1) vs '1680084005' (file2)
Key 'letsencrypt_retry' is missing in the second file.
Key 'dns_secany' is missing in the second file.
Key 'default_domain_ssl' is missing in the second file.
Key 'show_plugins' is missing in the second file.
Key 'avail_logviewer' is missing in the second file.
Mismatch for 'last_check_php_vers': '7.3 8.2 8.3' (file1) vs '7.3 8.2' (file2)
Key 'web_http2' is missing in the second file.
Key 'mysql_ssl' is missing in the second file.
Key 'json_pretty' is missing in the second file.
But I’m not sure how to continue from here. Maybe @Ilia can use the difference for anything useful.
Other info:
> virtualmin validate-domains --all-domains --feature web
(domain)
All features are good
(domain)
All features are good
(domain)
All features are good
(domain)
All features are good
(domain)
All features are good
(domain)
All features are good
(domain)
All features are good
> sudo apachectl configtest
Syntax OK
> virtualmin check-config
ERROR: The plugin domain, domain, domain cannot be disabled, as it is used by the following virtual servers : $2
If I compare one of the domains listed in the error, with one of the ones, not listed in the error, they:
- Share the same PHP information
But the following features are enabled on the domain, which are flagged as failed:
- Mail for domain
- Spam filtering
- Virus filtering
So I disabled “Mail for domain” + Spam filtering + Virus filtering, and executed the check-config again, but it’s still listed.
I opened Manage Virtual Server > SSL Certificate > SSL Providers, and here I noticed that the “good domain” had two domains listed in “Domains names listed here” below “Request certificate for”, instead of the default “Domains associated with this server”.
So, for one of the ERROR marked domains, I requested a certificate.
But, it’s still the same situation.
So, just to see what happen, I disabled one of the ERROR marked domains. But, nothing changed.
I’m simply unable to tell, why only three domains are listed as problematic domains.