【问题标题】:CentOS HTTPD and MySql dont want to startCentOS HTTPD 和 MySql 不想启动
【发布时间】:2016-08-12 00:39:17
【问题描述】:

我现在使用 VestaCP 一个星期了,我在论坛上问了这个错误,但他们对我的话题没有反应,所以我会在这里问。

Apache 和 MySql 无法启动。
如果我输入:/bin/systemctl status httpd.service 我得到这个

● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2016-04-19 19:04:53 CEST; 10s ago
  Process: 4447 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 4446 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 4446 (code=exited, status=1/FAILURE)

Apr 19 19:04:53 main-vps-centos httpd[4446]: (98)Address already in use: AH0...0
Apr 19 19:04:53 main-vps-centos httpd[4446]: (98)Address already in use: AH0...0
Apr 19 19:04:53 main-vps-centos httpd[4446]: no listening sockets available,...n
Apr 19 19:04:53 main-vps-centos httpd[4446]: AH00015: Unable to open logs
Apr 19 19:04:53 main-vps-centos systemd[1]: httpd.service: main process exit...E
Apr 19 19:04:53 main-vps-centos kill[4447]: kill: cannot find process ""
Apr 19 19:04:53 main-vps-centos systemd[1]: httpd.service: control process e...1
Apr 19 19:04:53 main-vps-centos systemd[1]: Failed to start The Apache HTTP ....
Apr 19 19:04:53 main-vps-centos systemd[1]: Unit httpd.service entered faile....
Apr 19 19:04:53 main-vps-centos systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

我尝试了什么: “Yum Remove httpd mysql mysql-server mariadb”然后“Yum install httpd mysql mysql-server mariadb”,但它不起作用。

救命!

【问题讨论】:

  • 您能否发布来自/var/log/messages 的摘录?“地址已在使用中”听起来像是您试图绑定到错误的东西,或者它已经在运行。这是一个现场盒子还是一个测试/开发?当您尝试yum removeyum install 时还有什么错误?

标签: mysql apache centos


【解决方案1】:

看起来您的httpd 端口已被某个进程使用。 您的 VestaCP 是否与 Apache 在同一个 80 端口上工作? 如果是这样,您也无法运行 httpd 服务,直到将其更改为其他端口。

您还应该先尝试netstat -lptu 找出正在使用该端口的进程。

【讨论】:

  • 那么你的HTTP端口被nginx实例占用了
猜你喜欢
  • 2014-02-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-03-27
  • 2017-04-30
  • 1970-01-01
  • 2012-05-20
相关资源
最近更新 更多