为什么 httpd 在尝试启动时挂起?

为什么 httpd 在尝试启动时挂起?

当我尝试启动 HTTPD 时,它开始于:

    Starting HTTPD
    httpd (pid 32303) already running
    Starting SSH tunnels
    Starting HTTPD
    httpd (pid 32615) already running
    Starting SSH tunnels

然后它会挂起相当长一段时间。我尝试跟踪 error_log,但错误日志似乎没有更新。日志都是旧的。

我该去哪里?我在尝试启动时找不到太多有关 HTTPD 挂起的信息。

任何方向都会很棒。先感谢您!

编辑:

我正在尝试使用实例启动 httpd,因此我通过以下方式启动它: /sbin/service ptst str

我很确定它是由包管理器安装的,并且是 RedHat 7。

更新:

我杀死了进程 32303 和 32615,所以当我启动 httpd 时,没有任何东西正在运行,但它仍然挂起。我使用 sudo tail -f /opt/logs/error_log 跟踪错误日志,它挂起并显示:

    [Tue Aug 27 14:29:22.022047 2019] [core:notice] [pid 1817:tid                         
    140076146927424] AH00094: Command line: '/opt/apache-2.4.37/bin/httpd -f 
    /opt/conf/httpd.conf'
    [Wed Aug 28 09:44:53.318939 2019] [mpm_event:notice] [pid 1817:tid 
    140076146927424] AH00491: caught SIGTERM, shutting down
    [Wed Aug 28 10:09:33.886272 2019] [mpm_event:notice] [pid 3205:tid  
    139902668130112] AH00489: Apache/2.4.37 (Unix) OpenSSL/1.0.2k-fips 
    configured -- resuming normal operations
    [Wed Aug 28 10:09:33.886543 2019] [core:notice] [pid 3205:tid 
    139902668130112] AH00094: Command line: '/opt/apache-2.4.37/bin/httpd -f 
    /opt/conf/httpd.conf'
    [Wed Aug 28 10:36:40.245765 2019] [mpm_event:notice] [pid 3205:tid 
    139902668130112] AH00491: caught SIGTERM, shutting down
    [Wed Aug 28 10:37:21.693187 2019] [mpm_event:notice] [pid 5687:tid 
    140062877488960] AH00489: Apache/2.4.37 (Unix) OpenSSL/1.0.2k-fips 
    configured -- resuming normal operations
    [Wed Aug 28 10:37:21.693447 2019] [core:notice] [pid 5687:tid 
    140062877488960] AH00094: Command line: '/opt/apache-2.4.37/bin/httpd -f 
    /opt/conf/httpd.conf'
    [Wed Aug 28 10:46:07.234149 2019] [mpm_event:notice] [pid 5687:tid 
    140062877488960] AH00491: caught SIGTERM, shutting down
    [Wed Aug 28 10:46:55.445671 2019] [mpm_event:notice] [pid 6452:tid 
    140204271298368] AH00489: Apache/2.4.37 (Unix) OpenSSL/1.0.2k-fips 
    configured -- resuming normal operations
    [Wed Aug 28 10:46:55.445820 2019] [core:notice] [pid 6452:tid 
    140204271298368] AH00094: Command line: '/opt/apache-2.4.37/bin/httpd -f 
    /opt/conf/httpd.conf'

当我 sudo tail -f /var/log/messages 时,它挂起并显示:

    fostunnel: d'utiliser le systeme, le client affirme qu'il est un client                 
    autorise.
    dbus[823]: [system] Activating service name='org.freedesktop.problems' 
    (using servicehelper)
    dbus[823]: [system] Successfully activated service 
    'org.freedesktop.problems'
    su: (to fostunnel) MC on pts/1
    su: (to fostunnel) MC on pts/1
    systemd: Stopping SYSV: Start up the Apache HTTPD server....
    apache: Stopping HTTPD
    systemd: Stopped SYSV: Start up the Apache HTTPD server..
    su: (to fostunnel) MC on pts/1
    su: (to fostunnel) MC on pts/1
    systemd: Reloading.
    systemd: Started Flexible Branding Service.
    systemd: Starting SYSV: Start up the Apache HTTPD server....
    apache: Starting HTTPD
    systemd: Started SYSV: Start up the Apache HTTPD server..

答案1

事实证明,当 httpd 启动时,我的 ptst 脚本并未结束 - 它处于循环中。我测试了我的实例,httpd 实际上启动成功了。

相关内容