Question : There is a critical issue going on with the Nautilus application in Stratos DC. The production support team identified that the application is unable to connect to the database. After digging into the issue, the team found that mariadb service is down on the database server.
Look into the issue and fix the same.
1. At first login on database server & Switch to root user
thor@jump_host ~$ ssh peter@stdb01 The authenticity of host 'stdb01 (172.16.239.10)' can't be
established. ECDSA key fingerprint is SHA256:pXIVG98Rjh+zi7nrPyitTHnCDFXzhLqqorEH/keEiB8. ECDSA key fingerprint is
MD5:f4:52:f6:46:5f:f1:8b:d6:f3:cc:f2:47:5b:fe:68:c2. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'stdb01,172.16.239.10' (ECDSA) to the list
of known hosts. peter@stdb01's password: Permission denied, please try again. peter@stdb01's password: [peter@stdb01 ~]$ sudo su - Administrator. It usually boils down to these three things: #2) Think before you type. #3) With great power comes
great responsibility. [root@stdb01 ~]# |
[root@stdb01 ~]#
systemctl status mariadb ●
mariadb.service - MariaDB database server Loaded: loaded
(/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) Active: inactive (dead) Jun 15 15:14:20
stdb01.stratos.xfusioncorp.com systemd[1]: Collecting mariadb.service [root@stdb01 ~]#
[root@stdb01 ~]#
systemctl start mariadb Job for
mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl
-xe" for details. [root@stdb01 ~]#
|
[root@stdb01 ~]# systemctl status mariadb -l ● mariadb.service
- MariaDB database server Loaded: loaded
(/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since
Tue 2021-06-15 15:14:32 UTC; 9s ago Process: 734
ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited,
status=1/FAILURE)
Jun 15 15:14:32
stdb01.stratos.xfusioncorp.com systemd[1]: Child 734 belongs to
mariadb.service Jun 15 15:14:32
stdb01.stratos.xfusioncorp.com systemd[1]: mariadb.service: control process
exited, code=exited status=1 Jun 15 15:14:32
stdb01.stratos.xfusioncorp.com systemd[1]: mariadb.service got final SIGCHLD
for state start-pre Jun 15 15:14:32
stdb01.stratos.xfusioncorp.com systemd[1]: mariadb.service changed start-pre
-> failed Jun 15 15:14:32
stdb01.stratos.xfusioncorp.com systemd[1]: Job mariadb.service/start
finished, result=failed Jun 15 15:14:32
stdb01.stratos.xfusioncorp.com systemd[1]: Failed to start MariaDB database
server. Jun 15 15:14:32
stdb01.stratos.xfusioncorp.com systemd[1]: Unit mariadb.service entered failed
state. Jun 15 15:14:32
stdb01.stratos.xfusioncorp.com systemd[1]: mariadb.service failed. Jun 15 15:14:32
stdb01.stratos.xfusioncorp.com systemd[1]: mariadb.service: cgroup is empty [root@stdb01 ~]# |
[root@stdb01 ~]#
ll /var/lib/ total 52 drwxr-xr-x 1
root root 4096 Mar 27 05:35 alternatives drwxr-xr-x 1
root root 4096 Mar 14
2019 dbus drwxr-xr-x 1
root root 4096 Apr 11
2018 games drwxr-xr-x 1
root root 4096 Nov
2 2018 initramfs drwx------ 1
root root 4096 Aug
1 2019 machines drwxr-xr-x 1
root root 4096 Apr 11
2018 misc drwxr-xr-x 2 mysql mysql 4096 Oct 1
2020 mysqld drwxr-xr-x 1
root root 4096 Jun 15 15:11 rpm drwxr-xr-x 1
root root 4096 Apr 11
2018 rpm-state drwxr-xr-x 1
root root 4096 Oct 15
2019 stateless drwxr-xr-x 1
root root 4096 Aug
1 2019 systemd drwxr-xr-x 1
root root 4096 Mar 27 05:35 yum [root@stdb01 ~]#
|
[root@stdb01 ~]#
mv /var/lib/mysqld/ /var/lib/mysql [root@stdb01 ~]#
[root@stdb01 ~]#
ll /var/lib/ total 52 drwxr-xr-x 1
root root 4096 Mar 27 05:35 alternatives drwxr-xr-x 1
root root 4096 Mar 14
2019 dbus drwxr-xr-x 1
root root 4096 Apr 11
2018 games drwxr-xr-x 1
root root 4096 Nov
2 2018 initramfs drwx------ 1
root root 4096 Aug
1 2019 machines drwxr-xr-x 1
root root 4096 Apr 11
2018 misc drwxr-xr-x 2 mysql mysql 4096 Oct 1
2020 mysql drwxr-xr-x 1
root root 4096 Jun 15 15:11 rpm drwxr-xr-x 1
root root 4096 Apr 11
2018 rpm-state drwxr-xr-x 1
root root 4096 Oct 15
2019 stateless drwxr-xr-x 1
root root 4096 Aug
1 2019 systemd drwxr-xr-x 1
root root 4096 Mar 27 05:35 yum [root@stdb01 ~]#
|
[root@stdb01 ~]#
systemctl start mariadb [root@stdb01 ~]#
systemctl status mariadb ●
mariadb.service - MariaDB database server Loaded: loaded
(/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) Active: active (running) since Tue
2021-06-15 15:26:31 UTC; 7s ago Process: 881
ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited,
status=0/SUCCESS) Process: 799
ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited,
status=0/SUCCESS) Main PID: 880 (mysqld_safe) CGroup:
/docker/1451421191fe618d281dea970b6deeec3e1fbc7dd6b57dc1a1d2df2667619f24/system.slice/mariadb.service ├─ 880 /bin/sh
/usr/bin/mysqld_safe --basedir=/usr └─1044 /usr/libexec/mysqld
--basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin
...
Jun 15 15:26:29
stdb01.stratos.xfusioncorp.com systemd[880]: Executing: /usr/bin/mysqld_safe
--basedir=/usr Jun 15 15:26:29
stdb01.stratos.xfusioncorp.com systemd[881]: Executing:
/usr/libexec/mariadb-wait-ready 880 Jun 15 15:26:29
stdb01.stratos.xfusioncorp.com mysqld_safe[880]: 210615 15:26:29 mysqld_safe
Logging to '/var/lo...g'. Jun 15 15:26:29
stdb01.stratos.xfusioncorp.com mysqld_safe[880]: 210615 15:26:29 mysqld_safe
Starting mysqld dae...sql Jun 15 15:26:31
stdb01.stratos.xfusioncorp.com systemd[1]: Child 881 belongs to
mariadb.service Jun 15 15:26:31
stdb01.stratos.xfusioncorp.com systemd[1]: mariadb.service: control process
exited, code=exited ...s=0 Jun 15 15:26:31
stdb01.stratos.xfusioncorp.com systemd[1]: mariadb.service got final SIGCHLD
for state start-post Jun 15 15:26:31
stdb01.stratos.xfusioncorp.com systemd[1]: mariadb.service changed start-post
-> running Jun 15 15:26:31
stdb01.stratos.xfusioncorp.com systemd[1]: Job mariadb.service/start
finished, result=done Jun 15 15:26:31
stdb01.stratos.xfusioncorp.com systemd[1]: Started MariaDB database server. Hint: Some lines
were ellipsized, use -l to show in full. [root@stdb01 ~]# |
7. Click on Finish & Confirm to complete the task successful
Happy Learning!!!!
2 Comments
After Executing the command also I am unable to access the port through Loadbalancer Server
ReplyDeleteyum install iptables-services -y
systemctl start iptables && systemctl status iptables
systemctl enable iptables
iptables -L
iptables -A INPUT -p tcp --destination-port 8086 -s 172.16.238.14 -j ACCEPT or iptables -A INPUT -p tcp -s 172.16.238.14 --dport 6400 -j ACCEPT
iptables -A INPUT -p tcp --destination-port 8086 -j DROP
service iptables save
systemctl restart iptables
make sure you ports are correctly added as per the task. apart from that if you feel issue while validating then feel free to reach us online chat support
Delete