启动apache (OS 10022)提供了一个无效的参数。解决方案

今天 apache 突然启动不起来了,查看了一下错误日志发现了如下错误:

[Tue Mar 17 11:27:32 2015] [crit] Parent: child process exited with status 3 -- Aborting.
[Tue Mar 17 11:28:25 2015] [notice] Apache/2.2.11 (Win32) PHP/5.2.9-2 configured -- resuming normal operations
[Tue Mar 17 11:28:25 2015] [notice] Server built: Dec 10 2008 00:10:06
[Tue Mar 17 11:28:26 2015] [notice] Parent: Created child process 3776
[Tue Mar 17 11:28:26 2015] [notice] Child 3776: Child process is running
[Tue Mar 17 11:28:26 2015] [crit] (OS 10022)提供了一个无效的参数。  : Child 3776: setup_inherited_listeners(), WSASocket failed to open the inherited socket.
[Tue Mar 17 11:28:26 2015] [crit] Parent: child process exited with status 3 -- Aborting.
[Tue Mar 17 11:28:38 2015] [notice] Apache/2.2.11 (Win32) PHP/5.2.9-2 configured -- resuming normal operations
[Tue Mar 17 11:28:38 2015] [notice] Server built: Dec 10 2008 00:10:06
[Tue Mar 17 11:28:38 2015] [notice] Parent: Created child process 6804
[Tue Mar 17 11:28:38 2015] [notice] Child 6804: Child process is running

于是乎搜索了一些解决方案,最终还是:修复winsock,在运行里输入:netsh winsock reset

用这种方法解决了问题。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在 Linux 系统中,可以通过以下命令检查 Apache 是否正在运行: ``` systemctl status httpd ``` 如果 Apache 正在运行,将会返回类似下面的输出: ``` ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2021-11-03 14:00:00 EST; 1h 30min ago Docs: man:httpd(8) man:apachectl(8) Main PID: 1234 (httpd) Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec" Tasks: 55 (limit: 4915) Memory: 15.0M CGroup: /system.slice/httpd.service ├─1234 /usr/sbin/httpd -DFOREGROUND ├─5678 /usr/sbin/httpd -DFOREGROUND ├─5679 /usr/sbin/httpd -DFOREGROUND ├─5680 /usr/sbin/httpd -DFOREGROUND └─5681 /usr/sbin/httpd -DFOREGROUND ``` 如果 Apache 没有运行,将会返回类似下面的输出: ``` ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: inactive (dead) Docs: man:httpd(8) man:apachectl(8) ``` 如果系统没有使用 Systemd 管理服务,你可以使用以下命令检查 Apache 是否正在运行: ``` ps aux | grep httpd ``` 如果 Apache 正在运行,将会返回类似下面的输出: ``` root 1234 0.0 0.1 12345 6789 ? Ss 13:59 0:00 /usr/sbin/httpd -DFOREGROUND apache 5678 0.0 0.2 23456 7890 ? S 14:00 0:00 /usr/sbin/httpd -DFOREGROUND apache 5679 0.0 0.2 23456 7890 ? S 14:00 0:00 /usr/sbin/httpd -DFOREGROUND apache 5680 0.0 0.2 23456 7890 ? S 14:00 0:00 /usr/sbin/httpd -DFOREGROUND apache 5681 0.0 0.2 23456 7890 ? S 14:00 0:00 /usr/sbin/httpd -DFOREGROUND ``` 如果 Apache 没有运行,将不会有任何输出。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值