Thursday, April 30, 2026

.::: Install Maxscale 25 Trial with license license_key (maxscale: The mandatory parameter 'license_key' is not provided) :::.

 

1. Downlaod Maxscale & license 

https://mariadb.com/downloads/community/maxscale-trial/ 
https://customers.mariadb.com/license/maxscale-trial/

2. Install 
tar -xvf maxscale-25.10.2-trial-release.rocky.9.x86_64.tar

yum install maxscale-common-25.10.2-1.rhel.9.x86_64.rpm -y
yum install maxscale-maxctrl-25.10.2-1.rhel.9.x86_64.rpm -y
yum install maxscale-trial-25.10.2-1.rhel.9.x86_64.rpm -y


3. Try start & enable automatic

[root@teguhth-ha03 data]# systemctl status maxscale.service
× maxscale.service - MariaDB MaxScale Database Proxy
     Loaded: loaded (/usr/lib/systemd/system/maxscale.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Wed 2026-04-22 15:28:47 WIB; 2min 23s ago
    Process: 13163 ExecStart=/usr/bin/maxscale (code=exited, status=1/FAILURE)
        CPU: 72ms
 
Apr 22 15:28:47 teguhth-ha03 maxscale[13165]: Module 'pp_sqlite' loaded from '/usr/lib64/maxscale/libpp_sqlite.so'.
Apr 22 15:28:47 teguhth-ha03 maxscale[13165]: Parser plugin loaded.
Apr 22 15:28:47 teguhth-ha03 maxscale[13165]: /etc/maxscale.cnf.d exists, reading.
Apr 22 15:28:47 teguhth-ha03 maxscale[13165]: /var/lib/maxscale/maxscale.cnf.d exists, reading.
Apr 22 15:28:47 teguhth-ha03 maxscale[13165]: Module 'mariadbmon' loaded from '/usr/lib64/maxscale/libmariadbmon.so'.
Apr 22 15:28:47 teguhth-ha03 maxscale[13165]: Module 'readwritesplit' loaded from '/usr/lib64/maxscale/libreadwritesplit.so'.
Apr 22 15:28:47 teguhth-ha03 maxscale[13165]: maxscale: The mandatory parameter 'license_key' is not provided.
Apr 22 15:28:47 teguhth-ha03 systemd[1]: maxscale.service: Control process exited, code=exited, status=1/FAILURE
Apr 22 15:28:47 teguhth-ha03 systemd[1]: maxscale.service: Failed with result 'exit-code'.
Apr 22 15:28:47 teguhth-ha03 systemd[1]: Failed to start MariaDB MaxScale Database Proxy.
[root@teguhth-ha03 data]#


4. additonal license 

mkdir -p /etc/maxscale
cp maxscale-trial-license.txt /etc/maxscale/
chown maxscale:maxscale /etc/maxscale/maxscale-trial-license.txt
chmod 600 /etc/maxscale/maxscale-trial-license.txt

[maxscale]
license_key=/etc/maxscale/maxscale-trial-license.txt

[root@teguhth-ha03 data]# grep -i license_key /etc/maxscale.cnf
license_key=/etc/maxscale/maxscale-trial-license.txt
[root@teguhth-ha03 data]#


5. restart maxscale 

systemctl restart maxscale
systemctl status maxscale

[root@teguhth-ha03 data]# systemctl status maxscale
? maxscale.service - MariaDB MaxScale Database Proxy
     Loaded: loaded (/usr/lib/systemd/system/maxscale.service; enabled; preset: disabled)
     Active: active (running) since Wed 2026-04-22 15:35:39 WIB; 4s ago
    Process: 13201 ExecStart=/usr/bin/maxscale (code=exited, status=0/SUCCESS)
   Main PID: 13203 (maxscale)
      Tasks: 12 (limit: 8015)
     Memory: 18.8M
        CPU: 184ms
     CGroup: /system.slice/maxscale.service
             +-13203 /usr/bin/maxscale

Apr 22 15:35:38 teguhth-ha03 maxscale[13203]: Module directory: /usr/lib64/maxscale
Apr 22 15:35:38 teguhth-ha03 maxscale[13203]: Module 'pp_sqlite' loaded from '/usr/lib64/maxscale/libpp_sqlite.so'.
Apr 22 15:35:38 teguhth-ha03 maxscale[13203]: Parser plugin loaded.
Apr 22 15:35:38 teguhth-ha03 maxscale[13203]: /etc/maxscale.cnf.d exists, reading.
Apr 22 15:35:38 teguhth-ha03 maxscale[13203]: /var/lib/maxscale/maxscale.cnf.d exists, reading.
Apr 22 15:35:38 teguhth-ha03 maxscale[13203]: Module 'mariadbmon' loaded from '/usr/lib64/maxscale/libmariadbmon.so'.
Apr 22 15:35:38 teguhth-ha03 maxscale[13203]: Module 'readwritesplit' loaded from '/usr/lib64/maxscale/libreadwritesplit.so'.
Apr 22 15:35:38 teguhth-ha03 maxscale[13203]: Loading license key from: /etc/maxscale/maxscale-trial-license-key.txt
Apr 22 15:35:39 teguhth-ha03 maxscale[13203]: License expires in 29 days 15h 24m at Fri, 22 May 2026 00:00:00 GMT
Apr 22 15:35:39 teguhth-ha03 systemd[1]: Started MariaDB MaxScale Database Proxy.

6. check list maxscale 

[root@teguhth-ha03 data]# maxctrl list servers
+------------------------------------------------------------------------------------------+
¦ Server  ¦ Address   ¦ Port ¦ Connections ¦ Status ¦ Status Info ¦ GTID ¦ Monitor         ¦
+---------+-----------+------+-------------+--------+-------------+------+-----------------¦
¦ server1 ¦ 127.0.0.1 ¦ 3306 ¦ 0           ¦ Down   ¦             ¦      ¦ MariaDB-Monitor ¦
+------------------------------------------------------------------------------------------+
[root@teguhth-ha03 data]#
[root@teguhth-ha03 data]# maxctrl --version
25.10.2 Trial
[root@teguhth-ha03 data]# 

7. maxscale 25 not support log_augmentation 
root@teguhth-ha03 maxscale]# systemctl status maxscale.service
× maxscale.service - MariaDB MaxScale Database Proxy
     Loaded: loaded (/usr/lib/systemd/system/maxscale.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Wed 2026-04-22 15:39:57 WIB; 5s ago
   Duration: 4min 17.738s
    Process: 13247 ExecStart=/usr/bin/maxscale (code=exited, status=1/FAILURE)
        CPU: 69ms

Apr 22 15:39:57 teguhth-ha03 maxscale[13249]: Module 'pp_sqlite' loaded from '/usr/lib64/maxscale/libpp_sqlite.so'.
Apr 22 15:39:57 teguhth-ha03 maxscale[13249]: Parser plugin loaded.
Apr 22 15:39:57 teguhth-ha03 maxscale[13249]: /etc/maxscale.cnf.d exists, reading.
Apr 22 15:39:57 teguhth-ha03 maxscale[13249]: Module 'hintfilter' loaded from '/usr/lib64/maxscale/libhintfilter.so'.
Apr 22 15:39:57 teguhth-ha03 maxscale[13249]: Module 'mariadbmon' loaded from '/usr/lib64/maxscale/libmariadbmon.so'.
Apr 22 15:39:57 teguhth-ha03 maxscale[13249]: Module 'readwritesplit' loaded from '/usr/lib64/maxscale/libreadwritesplit.so'.
Apr 22 15:39:57 teguhth-ha03 maxscale[13249]: Unknown global parameter 'log_augmentation'.
Apr 22 15:39:57 teguhth-ha03 systemd[1]: maxscale.service: Control process exited, code=exited, status=1/FAILURE
Apr 22 15:39:57 teguhth-ha03 systemd[1]: maxscale.service: Failed with result 'exit-code'.
Apr 22 15:39:57 teguhth-ha03 systemd[1]: Failed to start MariaDB MaxScale Database Proxy.
[root@teguhth-ha03 maxscale]#

8. check status maxscale license 

maxadmin show maxscale | grep -i license -A 5

[root@teguhth-ha03 maxscale]# maxadmin show maxscale | grep -i license -A 5
¦              ¦     "license_key": "*****",                                              ¦
¦              ¦     "load_persisted_configs": true,                                      ¦
¦              ¦     "local_address": null,                                               ¦
¦              ¦     "log_debug": false,                                                  ¦
¦              ¦     "log_info": false,                                                   ¦
¦              ¦     "log_notice": true,                                                  ¦
[root@teguhth-ha03 maxscale]#

9. check log maxscale 

grep -i license /var/log/maxscale/maxscale.log

[root@teguhth-ha03 maxscale]# grep -i license /var/log/maxscale/maxscale.log
2026-04-22 15:28:47   error  : maxscale: The mandatory parameter 'license_key' is not provided.
2026-04-22 15:34:45   error  : maxscale: The mandatory parameter 'license_key' is not provided.
2026-04-22 15:35:38   notice : Loading license key from: /etc/maxscale/maxscale-trial-license-key.txt
2026-04-22 15:35:39   notice : License expires in 29 days 15h 24m at Fri, 22 May 2026 00:00:00 GMT
2026-04-22 15:43:46.732   notice : Loading license key from: /etc/maxscale/maxscale-trial-license-key.txt
2026-04-22 15:43:47.627   notice : License expires in 29 days 15h 16m at Fri, 22 May 2026 00:00:00 GMT
2026-04-22 15:46:15.699   notice : Loading license key from: /etc/maxscale/maxscale-trial-license-key.txt
2026-04-22 15:46:16.101   notice : License expires in 29 days 15h 13m at Fri, 22 May 2026 00:00:00 GMT
[root@teguhth-ha03 maxscale]#

10. create script check maxscale 

[root@teguhth-ha03 data]# sh check_maxscale_license.sh
MaxScale License Monitoring
Info Log     : 2026-04-22 15:57:01.016   notice : License expires in 29 days 15h 2m at Fri, 22 May 2026 00:00:00 GMT
Expire Date  : Fri, 22 May 2026 00:00:00 GMT
Sisa Hari    : 29
OK: License masih aman
[root@teguhth-ha03 data]#


11. script check maxscale license 

[root@teguhth-ha03 data]# cat check_maxscale_license.sh
#!/bin/bash

LOG_FILE="/var/log/maxscale/maxscale.log"

# Ambil baris terakhir info license
LINE=$(grep -i "License expires in" $LOG_FILE | tail -1)

if [ -z "$LINE" ]; then
    echo "ERROR: Tidak menemukan info license di log"
    exit 1
fi

# Extract sisa hari
DAYS_LEFT=$(echo "$LINE" | grep -oP 'expires in \K[0-9]+')

# Extract tanggal expiry
EXPIRE_DATE=$(echo "$LINE" | sed -n 's/.*at \(.* GMT\).*/\1/p')

echo "MaxScale License Monitoring"
echo "Info Log     : $LINE"
echo "Expire Date  : $EXPIRE_DATE"
echo "Sisa Hari    : $DAYS_LEFT"

# Threshold warning
WARNING_DAYS=5

if [ "$DAYS_LEFT" -le 0 ]; then
    echo "CRITICAL: License SUDAH EXPIRE!"
    exit 2
elif [ "$DAYS_LEFT" -le "$WARNING_DAYS" ]; then
    echo "WARNING: License akan expire dalam $DAYS_LEFT hari!"
    exit 1
else
    echo "OK: License masih aman"
fi
[root@teguhth-ha03 data]#


No comments:

Post a Comment

Popular Posts