Gunicorn service not coming up on centos8 - gunicorn

I am keep getting error:
gunicorn.service - gunicorn daemon
Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2020-06-03 03:35:49 UTC; 33ms ago
Process: 25963 ExecStart=/home/flooroofcloud/flooroof/flooroofenv/bin/gunicorn --access-logfile - --workers 3 --bind unix:gunicorn.sock realestate.wsgi (code=exited, stat>
Main PID: 25963 (code=exited, status=203/EXEC)
Jun 03 03:35:49 flooroof systemd[1]: Started gunicorn daemon.
Jun 03 03:35:49 flooroof systemd[1]: gunicorn.service: Main process exited, code=exited, status=203/EXEC
Jun 03 03:35:49 flooroof systemd[1]: gunicorn.service: Failed with result 'exit-code'.
Below is my service file
Unit]
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target
[Service]
User=root
Group=nginx
WorkingDirectory=/home/flooroofcloud/flooroof
ExecStart=/home/flooroofcloud/flooroof/flooroofenv/bin/gunicorn --access-logfile - --workers 3 --bind unix:gunicorn.sock realestate.wsgi
[Install]
WantedBy=multi-user.target
Django directory path:
/home/flooroofcloud/flooroof
Not sure what I am doing wrong. Please advise.

Related

cant start mysql server

I cannot start Mysql-server on ubuntu 20.04 when I try systemctl status mysql.service i got this message:
mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-08-24 11:27:20 UTC; 12s ago
Process: 46074 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited,
status=1/FAILURE)
Aug 24 11:27:20 virtualmin systemd[1]: mysql.service: Control process exited,
code=exited, status=1/FAILURE
Aug 24 11:27:20 virtualmin systemd[1]: mysql.service: Failed with result 'exit-code'.
Aug 24 11:27:20 virtualmin systemd[1]: Failed to start MySQL Community Server.
Aug 24 11:27:20 virtualmin systemd[1]: mysql.service: Scheduled restart job, restart
counter is at 5.
Aug 24 11:27:20 virtualmin systemd[1]: Stopped MySQL Community Server.
Aug 24 11:27:20 virtualmin systemd[1]: mysql.service: Start request repeated too
quickly.
Aug 24 11:27:20 virtualmin systemd[1]: mysql.service: Failed with result 'exit-code'.
Aug 24 11:27:20 virtualmin systemd[1]: Failed to start MySQL Community Server.
mostly other service is running on the same port (3306) ,
try
netstat -pnltu | grep -i "3306"
it will show all services running on that port , if there are any , just end it and restart your Mysql server

Transfering MySQL data from one system to the other

I've got all my files from my last MySQL(MariaDB InnoDB) Server and I just noticed I can't run those files on my new system. I don't have any .SQL backup of my server and my old system can't be booted to as far as I know.
I moved from Ubuntu Server 18.04 to CentOS 7 (and a RAID1 configuration), I cloned my original Ubuntu drive to a secondary drive.
Here are the files that I moved from my Ubuntu drive
/var/lib/mysql/ Files
[root#localhost ~]# systemctl status mariadb
● mariadb.service - MariaDB 10.2.32 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Thu 2020-07-09 20:20:46 PDT; 26s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 3281 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS --basedir=/usr $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 3132 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 3129 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 3281 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Jul 09 20:20:46 localhost.localdomain systemd[1]: Starting MariaDB 10.2.32 database server...
Jul 09 20:20:46 localhost.localdomain mysqld[3281]: 2020-07-09 20:20:46 140603055900864 [Note] /usr/sbin/mysqld (mysqld 10.2.32-MariaDB-log) starting as process 3281 ...
Jul 09 20:20:46 localhost.localdomain mysqld[3281]: 2020-07-09 20:20:46 140603055900864 [Warning] Can't create test file /media/1TB/var/lib/mysql/localhost.lower-test
Jul 09 20:20:46 localhost.localdomain mysqld[3281]: [107B blob data]
Jul 09 20:20:46 localhost.localdomain mysqld[3281]: 2020-07-09 20:20:46 140603055900864 [ERROR] Aborting
Jul 09 20:20:46 localhost.localdomain systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Jul 09 20:20:46 localhost.localdomain systemd[1]: Failed to start MariaDB 10.2.32 database server.
Jul 09 20:20:46 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
Jul 09 20:20:46 localhost.localdomain systemd[1]: mariadb.service failed.
I'm not sure what I'm missing and why it won't start, I wish I would have kept the other system to export a SQL file which would have made my life so much easier.

systemctl status mariadb.service

i know that vendor preset: disabled is fine
i have changer the chown for mysql directory
even the chown for mysql.sock changed it three times
and still getting the same error
So any help will be thankful even if you are new
● mariadb.service - MariaDB 10.3 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/mariadb.service.d
└─tokudb.conf
Active: failed (Result: exit-code) since Thu 2019-01-31 00:04:01 EET; 2min 39s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 1121 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mariadb.service (code=exited, status=1/FAILURE)
Process: 1038 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
Jan 31 00:03:55 localhost.localdomain systemd[1]: Starting MariaDB 10.3 database server...
Jan 31 00:04:01 localhost.localdomain mysql-prepare-db-dir[1121]: The log file /var/log/mariadb/mariadb.log cannot be written, please, fix its permissions.
Jan 31 00:04:01 localhost.localdomain mysql-prepare-db-dir[1121]: The daemon will be run under mysql:mysql
Jan 31 00:04:01 localhost.localdomain systemd[1]: mariadb.service: Control process exited, code=exited status=1
Jan 31 00:04:01 localhost.localdomain systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 31 00:04:01 localhost.localdomain systemd[1]: Failed to start MariaDB 10.3 database server.
So any help will be thankful even if you are new .

Failed to start MariaDB 10.2.16 database server

When I have entered systemctl status mariadb.service
The output is:
mariadb.service - MariaDB 10.2.16 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Tue 2018-07-17 13:53:46 +06; 24s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 7342 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 7058 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && system
Process: 7054 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 7052 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 7342 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Jul 17 13:53:43 munim-Inspiron-5548 systemd[1]: Starting MariaDB 10.2.16 database server...
Jul 17 13:53:43 munim-Inspiron-5548 mysqld[7342]: 2018-07-17 13:53:43 139955312822464 [Note] /usr/sbin/mysqld (mysqld 10.2.16-MariaDB-10.2.16+m
Jul 17 13:53:46 munim-Inspiron-5548 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jul 17 13:53:46 munim-Inspiron-5548 systemd[1]: Failed to start MariaDB 10.2.16 database server.
Jul 17 13:53:46 munim-Inspiron-5548 systemd[1]: mariadb.service: Unit entered failed state.
Jul 17 13:53:46 munim-Inspiron-5548 systemd[1]: mariadb.service: Failed with result 'exit-code'.
I have tried to login mysql -u root -p it shows
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Can anyone give me any suggestion?

How to start mariadb service on nginx server?

I have been trying to set up a server and I am facing problems while starting mariadb. It giving errors in console. I followed some tutorials and search on internet to find solution But I did not get a solution to start mariadb.
mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled)
Active: failed (Result: exit-code) since Mon 2014-06-02 22:48:58 BST; 33min ago
Process: 10042 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
Process: 10041 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
Process: 10013 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 10041 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/mariadb.service
Jun 02 22:48:56 ultrasonicfortress mysqld_safe[10041]: 140602 22:48:56 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Jun 02 22:48:56 ultrasonicfortress mysqld_safe[10041]: 140602 22:48:56 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Jun 02 22:48:58 ultrasonicfortress mysqld_safe[10041]: 140602 22:48:58 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
Jun 02 22:48:58 ultrasonicfortress systemd[1]: mariadb.service: control process exited, code=exited status=1
Jun 02 22:48:58 ultrasonicfortress systemd[1]: Failed to start MariaDB database server.
Jun 02 22:48:58 ultrasonicfortress systemd[1]: Unit mariadb.service entered failed state.