MariaDB start up issue in ubuntu - mysql

I was trying to install pterodactyl using the following script but mariadb was constantly having problem during loading
https://github.com/vilhelmprytz/pterodactyl-installer
while running journalctl -xe I get the following output
root#ryno-pterodactyl:~# journalctl -xe
-- A start job for unit mariadb.service has begun execution.
-- The job identifier is 1400.
Apr 06 11:54:54 ryno-pterodactyl PackageKit[22129]: daemon quit Apr 06 11:54:54 pterodactyl systemd[1]: packagekit.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- The unit packagekit.service has successfully entered the 'dead' state. Apr 06 12:01:01 ryno-pterodactyl CRON[22315]: pam_unix(cron:session): session opened for user root by (uid=0) Apr 06 12:01:01 ryno-pterodactyl CRON[22316]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Apr 06 12:01:01 ryno-pterodactyl CRON[22315]: pam_unix(cron:session): session closed for user root Apr 06 12:04:50 ryno-pterodactyl systemd[1]: mariadb.service: start operation timed out. Terminating. Apr 06 12:04:52 ryno-pterodactyl systemd[1]: mariadb.service: Failed with result 'timeout'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- The unit mariadb.service has entered the 'failed' state with result 'timeout'. Apr 06 12:04:52 ryno-pterodactyl systemd[1]: Failed to start MariaDB 10.3.34 database server.
-- Subject: A start job for unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- A start job for unit mariadb.service has finished with a failure.
-- The job identifier is 1400 and the job result is failed. Apr 06 12:04:52 ryno-pterodactyl systemd[1]: mariadb.service: Consumed 1.363s CPU time.
-- Subject: Resources consumed by unit runtime
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- The unit mariadb.service completed and consumed the indicated resources. lines 3832-3866/3866 (END)```

Related

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/usr/local/mysql/data/mysql.sock' (2)

MySql randomly stopped working. ive tried EVERYTHING to fix it but i havnt been successfull.
heres the output from "service mysql status"
* mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2022-05-12 09:55:36 MSK; 1min 52s ago
Process: 668983 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)
CPU: 8ms
May 12 09:55:36 myhiddenthostname.com systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
May 12 09:55:36 myhiddenthostname.com systemd[1]: Stopped MySQL Community Server.
May 12 09:55:36 myhiddenthostname.com systemd[1]: mysql.service: Start request repeated too quickly.
May 12 09:55:36 myhiddenthostname.com systemd[1]: mysql.service: Failed with result 'exit-code'.
May 12 09:55:36 myhiddenthostname.com systemd[1]: Failed to start MySQL Community Server.
Heres the output from "journalctl -xe"
-- A start job for unit mysql.service has finished with a failure.
--
-- The job identifier is 16383 and the job result is failed.
May 12 09:59:12 myhiddenhostname.com systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
May 12 09:59:12 myhiddenhostname.com systemd[1]: Stopped MySQL Community Server.
-- Subject: A stop job for unit mysql.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit mysql.service has finished.
--
-- The job identifier is 16453 and the job result is done.
May 12 09:59:12 myhiddenhostname.com systemd[1]: mysql.service: Start request repeated too quickly.
May 12 09:59:12 myhiddenhostname.com systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
May 12 09:59:12 myhiddenhostname.com systemd[1]: Failed to start MySQL Community Server.
-- Subject: A start job for unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has finished with a failure.
--
-- The job identifier is 16453 and the job result is failed.
Any help or suggestions is needed. would really appreciate a response or suggestion as all my clients are experiencing downtime because of this.

Proxmox - qemu-guest-agent does not work on centos 7

can anyone help here I have a fresh Centos 7 installation I was trying to install the qemu-guest-agent after installation I'm trying to start it, but getting the bellow error :
[root#localhost ~]# systemctl start qemu-guest-agent
A dependency job for qemu-guest-agent.service failed. See 'journalctl -xe' for details.
and here is journalctl -xe :
--
-- Unit dev-virtio\x2dports-org.qemu.guest_agent.0.device has failed.
--
-- The result is timeout.
May 03 14:06:57 localhost.localdomain systemd[1]: Dependency failed for QEMU Guest Agent.
-- Subject: Unit qemu-guest-agent.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit qemu-guest-agent.service has failed.
--
-- The result is dependency.
May 03 14:06:57 localhost.localdomain systemd[1]: Job qemu-guest-agent.service/start failed with result 'dependency'.
May 03 14:06:57 localhost.localdomain systemd[1]: Startup finished in 1.474s (kernel) + 4.095s (initrd) + 2min 5.416s (userspace) = 2min 10.985s.
-- Subject: System start-up is now complete
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- All system services necessary queued for starting at boot have been
-- successfully started. Note that this does not mean that the machine is
-- now idle as services might still be busy with completing start-up.
--
-- Kernel start-up required 1474322 microseconds.
--
-- Initial RAM disk start-up required 4095564 microseconds.
--
-- Userspace start-up required 125416032 microseconds.
May 03 14:06:57 localhost.localdomain systemd[1]: Job dev-virtio\x2dports-org.qemu.guest_agent.0.device/start failed with result 'timeout'.
May 03 14:06:57 localhost.localdomain polkitd[624]: Unregistered Authentication Agent for unix-process:7214:4088 (system bus name :1.22, object path /org/freedesktop/PolicyKit1/Authenticatio
May 03 14:07:59 localhost.localdomain sudo[8162]: root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/bin/systemctl enable qemu-guest-agent
May 03 14:07:59 localhost.localdomain sudo[8162]: pam_unix(sudo:session): session opened for user root by root(uid=0)
May 03 14:07:59 localhost.localdomain polkitd[624]: Registered Authentication Agent for unix-process:8164:19324 (system bus name :1.24 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object
May 03 14:07:59 localhost.localdomain systemd[1]: Reloading.
May 03 14:07:59 localhost.localdomain polkitd[624]: Unregistered Authentication Agent for unix-process:8164:19324 (system bus name :1.24, object path /org/freedesktop/PolicyKit1/Authenticati
May 03 14:07:59 localhost.localdomain sudo[8162]: pam_unix(sudo:session): session closed for user root
May 03 14:08:01 localhost.localdomain polkitd[624]: Registered Authentication Agent for unix-process:8182:19565 (system bus name :1.25 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object
May 03 14:09:31 localhost.localdomain systemd[1]: Job dev-virtio\x2dports-org.qemu.guest_agent.0.device/start timed out.
May 03 14:09:31 localhost.localdomain systemd[1]: Timed out waiting for device dev-virtio\x2dports-org.qemu.guest_agent.0.device.
-- Subject: Unit dev-virtio\x2dports-org.qemu.guest_agent.0.device has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dev-virtio\x2dports-org.qemu.guest_agent.0.device has failed.
--
-- The result is timeout.
May 03 14:09:31 localhost.localdomain systemd[1]: Dependency failed for QEMU Guest Agent.
-- Subject: Unit qemu-guest-agent.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit qemu-guest-agent.service has failed.
--
-- The result is dependency.
May 03 14:09:31 localhost.localdomain systemd[1]: Job qemu-guest-agent.service/start failed with result 'dependency'.
May 03 14:09:31 localhost.localdomain polkitd[624]: Unregistered Authentication Agent for unix-process:8182:19565 (system bus name :1.25, object path /org/freedesktop/PolicyKit1/Authenticati
May 03 14:09:31 localhost.localdomain systemd[1]: Job dev-virtio\x2dports-org.qemu.guest_agent.0.device/start failed with result 'timeout'.
Can someone please assist me, Thank you so much.

Can't start MariaDB on debian 10

I can't seem to be able to start mariadb sql anymore. Internet says a bunch of things but they all seem to be "risky" and it seems that it really depends on the case. So here is mine. I don't know what/when happened but I am afraid to lose my subscribers data. What do you, superheroes, suggest?
When I try to start mariadb :
me#server:# systemctl start mariadb.service
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
And with systemctl status mariadb.service:
me#server:# systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.27 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-12-07 21:04:05 CET; 1min 53s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 13289 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 13290 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 13292 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environm
Process: 13339 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 13339 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Dec 07 21:03:59 server systemd[1]: Starting MariaDB 10.3.27 database server...
Dec 07 21:04:01 server mysqld[13339]: 2020-12-07 21:04:01 0 [Note] /usr/sbin/mysqld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 13339 ...
Dec 07 21:04:05 server systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Dec 07 21:04:05 server systemd[1]: mariadb.service: Failed with result 'exit-code'.
Dec 07 21:04:05 server systemd[1]: Failed to start MariaDB 10.3.27 database server.
And when I go to journalctl -xe, I only get:
Dec 07 21:10:04 vps69770 sshd[13784]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=161.35.121.130 user=root
Dec 07 21:10:04 sshd[13712]: Received disconnect from 124.239.216.233 port 59950:11: Bye Bye [preauth]
Dec 07 21:10:04 sshd[13712]: Disconnected from authenticating user root 124.239.216.233 port 59950 [preauth]
Dec 07 21:10:04 sshd[13771]: Failed password for root from 111.201.133.174 port 48444 ssh2
Dec 07 21:10:05 sshd[13771]: Received disconnect from 111.201.133.174 port 48444:11: Bye Bye [preauth]
Dec 07 21:10:05 sshd[13771]: Disconnected from authenticating user root 111.201.133.174 port 48444 [preauth]
Dec 07 21:10:05 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit mariadb.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Dec 07 21:10:05 server systemd[1]: mariadb.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit mariadb.service has entered the 'failed' state with result 'exit-code'.
Dec 07 21:10:05 server systemd[1]: Failed to start MariaDB 10.3.27 database server.
-- Subject: A start job for unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit mariadb.service has finished with a failure.
--
-- The job identifier is 1241 and the job result is failed.
Dec 07 21:10:06 server sshd[13784]: Failed password for root from 161.35.121.130 port 37142 ssh2
Dec 07 21:10:06 server sshd[13784]: Received disconnect from 161.35.121.130 port 37142:11: Bye Bye [preauth]
Dec 07 21:10:06 server sshd[13784]: Disconnected from authenticating user root 161.35.121.130 port 37142 [preauth]
Which is not a big help
I have no idea what to do. I really don't want to lose my database.
Thanks for your input
Solved it by deleting/renaming the tc.log mv -vi /var/lib/mysql/tc.log /root And restarting the database service mysql restart

Problem with Starting MySQL Server after upgrade from Ubuntu 18.04 to 20.04

I have a problem to start MySQL after an upgrade from Ubuntu 18.04 to 20.04 (MySQL 5.7 to 8). When I tried to start the mysql service kit stops at "Starting MySQL Community Server...".
USER#SERVER:~$ systemctl status mysql.service
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start) since Wed 2020-08-19 11:38:13 CEST; 576ms ago
Process: 18006 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 18014 (mysqld)
Status: "Server startup in progress"
Tasks: 13 (limit: 1110)
Memory: 261.6M
CGroup: /system.slice/mysql.service
└─18014 /usr/sbin/mysqld
Aug 19 11:38:13 SERVER systemd[1]: Starting MySQL Community Server...
The journal gives me back the following.
USER#SERVER:~$ journalctl -xe
--
-- The job identifier is 24060.
Aug 19 11:38:17 boris-dev systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit mysql.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Aug 19 11:38:17 boris-dev systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
Aug 19 11:38:17 boris-dev systemd[1]: Failed to start MySQL Community Server.
-- Subject: A start job for unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has finished with a failure.
--
-- The job identifier is 24060 and the job result is failed.
Aug 19 11:38:17 boris-dev systemd[1]: mysql.service: Scheduled restart job, restart counter is at 139.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Aug 19 11:38:17 boris-dev systemd[1]: Stopped MySQL Community Server.
-- Subject: A stop job for unit mysql.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit mysql.service has finished.
--
-- The job identifier is 24126 and the job result is done.
Aug 19 11:38:17 boris-dev systemd[1]: Starting MySQL Community Server...
-- Subject: A start job for unit mysql.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has begun execution.
--
-- The job identifier is 24126.
There are a few databases and it would be nice to keep them, but not necessary.
Any idea what's best to do?
Thanks in advance
Bo

mysql does not restart

I've tried to restart mysql 5.7 :
service mysql restart
But it fails and i do not understand why :
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
And I dont see what's wrong in the logs :
systemctl status mariadb.service
● mariadb.service - MariaDB 10.1.37 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-02-25 22:02:52 GMT; 1min 9s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 15467 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=127)
Main PID: 28679 (code=exited, status=0/SUCCESS)
Feb 25 22:02:52 stretch systemd[1]: Starting MariaDB 10.1.37 database server...
Feb 25 22:02:52 stretch systemd[1]: mariadb.service: Control process exited, code=exited status=127
Feb 25 22:02:52 stretch systemd[1]: Failed to start MariaDB 10.1.37 database server.
Feb 25 22:02:52 stretch systemd[1]: mariadb.service: Unit entered failed state.
Feb 25 22:02:52 stretch systemd[1]: mariadb.service: Failed with result 'exit-code'.
Any help would be welcome...
I'm on Debian 9, with 1800Mo in ram free.
Here is what the journal says :
journalctl -xe
Feb 26 08:09:01 stretch CRON[16792]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 26 08:09:01 stretch CRON[16793]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Feb 26 08:09:01 stretch CRON[16792]: pam_unix(cron:session): session closed for user root
Feb 26 08:17:01 stretch CRON[16794]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 26 08:17:01 stretch CRON[16795]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Feb 26 08:17:01 stretch CRON[16794]: pam_unix(cron:session): session closed for user root
Feb 26 08:25:23 stretch systemd[1]: Starting MariaDB 10.1.37 database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has begun starting up.
Feb 26 08:25:23 stretch systemd[1]: mariadb.service: Control process exited, code=exited status=127
Feb 26 08:25:23 stretch systemd[1]: Failed to start MariaDB 10.1.37 database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
Feb 26 08:25:23 stretch systemd[1]: mariadb.service: Unit entered failed state.
Feb 26 08:25:23 stretch systemd[1]: mariadb.service: Failed with result 'exit-code'.
I also got this error when upgrading to Debian Buster (from MariaDB 10.1 to 10.3). Running mysqld myself and mysql_upgrade both worked anyways. Try executing the following command to restart systemd on the fly. See also https://unix.stackexchange.com/a/419375.
systemctl daemon-reexec
If you don't do this, a reboot will probably fix this as well. Commenting out the ExecStartPre in /etc/systemd/system/mysql.service was not enough as the other ExecStartPre commands then failed instead (also with the exit code 127, i.e. "command not found").
Under Process: is the ExecStartPre returning with an error exist status
Based on error 127, I'd suspect that /usr/bin/install doesn't exist.