zoukankan      html  css  js  c++  java
  • 启动httpd报错的解决方案(Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.)

    首先报错信息如下

    [root@izgt88z6l1kvd7z create]# systemctl start httpd
    Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

    然后我查看了一下httpd的状态

    ● httpd.service - The Apache HTTP Server
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Mon 2020-05-11 03:44:25 CST; 1min 47s ago
    Docs: man:httpd(8)
    man:apachectl(8)
    Process: 13341 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
    Main PID: 13341 (code=exited, status=1/FAILURE)

    May 11 03:44:25 izgt88z6l1kvd7z systemd[1]: Starting The Apache HTTP Server...
    May 11 03:44:25 izgt88z6l1kvd7z httpd[13341]: AH00558: httpd: Could not reliably determine the server's fully qualifie...essage
    May 11 03:44:25 izgt88z6l1kvd7z httpd[13341]: (98)Address already in use: AH00072: make_sock: could not bind to addres...0.0:80
    May 11 03:44:25 izgt88z6l1kvd7z httpd[13341]: no listening sockets available, shutting down
    May 11 03:44:25 izgt88z6l1kvd7z httpd[13341]: AH00015: Unable to open logs
    May 11 03:44:25 izgt88z6l1kvd7z systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
    May 11 03:44:25 izgt88z6l1kvd7z systemd[1]: Failed to start The Apache HTTP Server.
    May 11 03:44:25 izgt88z6l1kvd7z systemd[1]: Unit httpd.service entered failed state.
    May 11 03:44:25 izgt88z6l1kvd7z systemd[1]: httpd.service failed.
    Hint: Some lines were ellipsized, use -l to show in full.

    我注意到有这么一条(98)Address already in use: AH00072: make_sock: could not bind to addres...0.0:80显示80被占了
    然后我又查看了一下网络,果然是nginx占用了80端口

    没办法,那就只能修改一下httpd的默认端口了
    [root@izgt88z6l1kvd7z create]# vim /etc/httpd/conf/httpd.conf

    :x 保存退出

    再次开启httpd服务

    [root@izgt88z6l1kvd7z create]# systemctl start httpd
    [root@izgt88z6l1kvd7z create]# echo $?
    0

    考虑到阿里防火墙,开启一下

    [root@izgt88z6l1kvd7z create]# firewall-cmd --zone=public --add-port=8080/tcp --permanent
    success
    [root@izgt88z6l1kvd7z create]# firewall-cmd --reload
    success
    访问一下

    成功!

  • 相关阅读:
    自定义 ListView
    linux IO重定向
    Facebook开源C++组件库Folly
    在vi按了ctrl+s后
    让Erlang服务器后台运行
    mysql innodb 性能相关参数
    linux 网卡驱动升级
    kernel panic
    32位Linux下使用2G以上大文件的几个相关宏的关系
    CentOS安装erlang
  • 原文地址:https://www.cnblogs.com/hxlinux/p/12866645.html
Copyright © 2011-2022 走看看