• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Fresh install - nginx and php-fpm don't start

Iulian_Olaru

New Pleskian
Hey guys,
So i have just installed from Strato.nl, plesk 12 with centos 7.. all fresh. I have setup an unlimited subscription and this is what the errors for nginx and php-fpm are.

Code:
[root@h2376451 pool.d]# service nginx status -l
nginx.service - Startup script for nginx service
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)
   Active: failed (Result: exit-code) since Fri 2014-12-05 08:05:44 GMT; 23min ago
  Process: 26009 ExecStartPre=/usr/bin/test $NGINX_ENABLED = yes (code=exited, status=1/FAILURE)
  Process: 26006 ExecStartPre=/bin/echo Starting nginx service (code=exited, status=0/SUCCESS)
Main PID: 24677 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nginx.service

Dec 05 08:05:44 h2376451.stratoserver.net echo[26006]: Starting nginx service
Dec 05 08:05:44 h2376451.stratoserver.net systemd[1]: nginx.service: control process exited, code=exited status=1
Dec 05 08:05:44 h2376451.stratoserver.net systemd[1]: Failed to start Startup script for nginx service.
Dec 05 08:05:44 h2376451.stratoserver.net systemd[1]: Unit nginx.service entered failed state.

Code:
[root@h2376451 pool.d]# service php-fpm status -l
Redirecting to /bin/systemctl status  -l php-fpm.service
php-fpm.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled)
   Active: failed (Result: exit-code) since Fri 2014-12-05 08:11:48 GMT; 18min ago
  Process: 26567 ExecStart=/usr/sbin/php-fpm --nodaemonize (code=exited, status=78)
Main PID: 26567 (code=exited, status=78)
   Status: "Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic: 0req/sec"
   CGroup: /system.slice/php-fpm.service

Dec 05 08:11:48 h2376451.stratoserver.net php-fpm[26567]: [05-Dec-2014 08:11:48] ERROR: unable to bind listening socket for address '/var/www/vhosts/system/villaorangebali.com/php-fpm.sock': Permission denied (13)
Dec 05 08:11:48 h2376451.stratoserver.net php-fpm[26567]: [05-Dec-2014 08:11:48] ERROR: FPM initialization failed
Dec 05 08:11:48 h2376451.stratoserver.net systemd[1]: php-fpm.service: main process exited, code=exited, status=78/n/a
Dec 05 08:11:48 h2376451.stratoserver.net systemd[1]: Failed to start The PHP FastCGI Process Manager.
Dec 05 08:11:48 h2376451.stratoserver.net systemd[1]: Unit php-fpm.service entered failed state.
[root@h2376451 pool.d]#

Now of course, this is what i receive from journalctl -xn
Code:
[root@h2376451 pool.d]# journalctl -xn
-- Logs begin at Tue 2014-12-02 10:58:16 GMT, end at Fri 2014-12-05 08:32:08 GMT. --
Dec 05 08:32:06 h2376451.stratoserver.net sshd[28872]: Received disconnect from 62.210.180.195: 11:  [preauth]
Dec 05 08:32:06 h2376451.stratoserver.net sshd[28872]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=62-210-180-195.rev.poneytelecom.eu
Dec 05 08:32:07 h2376451.stratoserver.net unix_chkpwd[28880]: password check failed for user (root)
Dec 05 08:32:07 h2376451.stratoserver.net sshd[28878]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=62-210-180-195.rev.poneyt
Dec 05 08:32:07 h2376451.stratoserver.net sshd[28878]: Unable to connect to Plesk Database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc
Dec 05 08:32:07 h2376451.stratoserver.net sshd[28878]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Dec 05 08:32:08 h2376451.stratoserver.net sshd[28878]: Failed password for root from 62.210.180.195 port 34894 ssh2
Dec 05 08:32:08 h2376451.stratoserver.net unix_chkpwd[28882]: password check failed for user (root)
Dec 05 08:32:08 h2376451.stratoserver.net sshd[28878]: Unable to connect to Plesk Database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc
Dec 05 08:32:08 h2376451.stratoserver.net sshd[28878]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
lines 1-11/11 (END)

Please help :)
 
Unable to connect to Plesk Database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc

You should look at the MySQL log for the cause of MySQL failing to start. You may first stop mysql service and rename or delete current mysql.sock file and restart mysql service as possible solution.
 
As soon i stopped mariadb the mysql.sock file dissappear and when i started mariadb, using journalctl -xn command i am getting this:

Code:
-- Logs begin at Tue 2014-12-02 10:58:16 GMT, end at Fri 2014-12-05 09:21:08 GMT. --
Dec 05 09:21:06 h2376451.stratoserver.net sshd[310]: Unable to connect to Plesk Database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
Dec 05 09:21:06 h2376451.stratoserver.net sshd[310]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Dec 05 09:21:06 h2376451.stratoserver.net unix_chkpwd[315]: password check failed for user (root)
Dec 05 09:21:06 h2376451.stratoserver.net sshd[32765]: Unable to connect to Plesk Database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc
Dec 05 09:21:06 h2376451.stratoserver.net sshd[32765]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Dec 05 09:21:08 h2376451.stratoserver.net sshd[310]: Failed password for root from 62.210.180.195 port 52676 ssh2
Dec 05 09:21:08 h2376451.stratoserver.net unix_chkpwd[316]: password check failed for user (root)
Dec 05 09:21:08 h2376451.stratoserver.net sshd[310]: Unable to connect to Plesk Database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
Dec 05 09:21:08 h2376451.stratoserver.net sshd[310]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Dec 05 09:21:08 h2376451.stratoserver.net sshd[32765]: Failed password for root from 103.41.124.26 port 45309 ssh2
lines 1-11/11 (END)

I understand it has something to do with a password but where and how ? I don't want to ask why for a fresh install :)
 
MariaDB is default SQL server on CentOS7 instead of MySQL. It looks like that there is mix of different packages now on this server.
 
I am kindly asking for a little bit of help IgorG. What is there to do in my situation ? This is what plesk has installed ...
 
what is status of Selinux? (# getenforce)
if it's enabled try to find some deny records in /var/log/messages
 
Selinus is enforcing and everything that i find in /var/log/messages are the quotes i posted above. It seems there might be a compatibility issue between plesk 12 and centos 7 ? what is the solution ?
 
hm... it definitely should contain selinux logs in case you have audit daemon disabled.
Try to temporary disable Selinux and restart services like mariadb, nginx, psa... to finally exclude Selinux from list of possible reasons.
 
hm... it definitely should contain selinux logs in case you have audit daemon disabled.
Try to temporary disable Selinux and restart services like mariadb, nginx, psa... to finally exclude Selinux from list of possible reasons.
I tried that just now and the problem is the same...
 
Code:
[root@h2376451 ~]# getenforce
Enforcing
[root@h2376451 ~]#

It seems that it didn't work like i did it. I replaced in /etc/sysconfig/selinux - SELINUX=disabled from SELINUX=enforcing
 
This seems to have fixed the problem with php-fpm! Thank you for this iiiuhkai. BUT! now nginx doesn't work. After using service nginx start, i am receiving the following:
Code:
[root@h2376451 ~]# journalctl -xn
-- Logs begin at Tue 2014-12-02 10:58:16 GMT, end at Fri 2014-12-05 10:51:40 GMT. --
Dec 05 10:51:37 h2376451.stratoserver.net sshd[13232]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=103.41.124.26  user=root
Dec 05 10:51:37 h2376451.stratoserver.net unix_chkpwd[13253]: password check failed for user (root)
Dec 05 10:51:37 h2376451.stratoserver.net sshd[13249]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=62-210-180-195.rev.poneyt
Dec 05 10:51:37 h2376451.stratoserver.net sshd[13249]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Dec 05 10:51:39 h2376451.stratoserver.net sshd[13249]: Failed password for root from 62.210.180.195 port 57205 ssh2
Dec 05 10:51:39 h2376451.stratoserver.net unix_chkpwd[13258]: password check failed for user (root)
Dec 05 10:51:39 h2376451.stratoserver.net sshd[13249]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Dec 05 10:51:40 h2376451.stratoserver.net unix_chkpwd[13261]: password check failed for user (root)
Dec 05 10:51:40 h2376451.stratoserver.net sshd[13256]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=103.41.124.26  user=root
Dec 05 10:51:40 h2376451.stratoserver.net sshd[13256]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
 
what is the output of the following commands:
# systemctl stop nginx
# systemctl start nginx

what is in nginx error log after it?
 
Code:
[root@h2376451 ~]# systemctl stop nginx
[root@h2376451 ~]# systemctl start nginx
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.

And in /var/log/nginx/error.log i can only find this

Code:
2014/12/05 07:56:42 [alert] 24677#0: unlink() "/var/run/nginx.pid" failed (13: Permission denied)
 
Code:
[root@h2376451 nginx]# getenforce
Permissive
[root@h2376451 nginx]#

This solved the php-fpm problem but now nginx is showing this in journalctl -xn
Code:
[root@h2376451 nginx]# journalctl -xn
-- Logs begin at Tue 2014-12-02 10:58:16 GMT, end at Fri 2014-12-05 11:05:12 GMT. --
Dec 05 11:05:09 h2376451.stratoserver.net sshd[15400]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Dec 05 11:05:10 h2376451.stratoserver.net unix_chkpwd[15409]: password check failed for user (root)
Dec 05 11:05:10 h2376451.stratoserver.net sshd[15405]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=103.41.124.26  user=root
Dec 05 11:05:10 h2376451.stratoserver.net sshd[15405]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Dec 05 11:05:11 h2376451.stratoserver.net sshd[15400]: Failed password for root from 62.210.180.195 port 42434 ssh2
Dec 05 11:05:11 h2376451.stratoserver.net unix_chkpwd[15412]: password check failed for user (root)
Dec 05 11:05:11 h2376451.stratoserver.net sshd[15400]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Dec 05 11:05:12 h2376451.stratoserver.net sshd[15405]: Failed password for root from 103.41.124.26 port 38254 ssh2
Dec 05 11:05:12 h2376451.stratoserver.net unix_chkpwd[15414]: password check failed for user (root)
Dec 05 11:05:12 h2376451.stratoserver.net sshd[15405]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
 
Check you have Nginx enabled in Plesk panel -> Tools&Settings -> Services Management
Enable it in Plesk
nginx will not start by # service nginx start if it's disabled in Plesk
 
Now it worked. I had Reverse Proxy Server (nginx) disabled because it gave an error when i tried to enable it. In another plesk 11, nginx is called in another way in Services Management.

I had things all mixed up. I thank you sincerely for your help and i hope you will keep up the good work.
 
Back
Top