Windows环境下Apache的reverse proxy报OS 10048的原因和解决办法
2011-10-17 09:10
363 查看
apache服务器设置了反向代理后,运行一段时间就会莫名其妙的报后台服务器暂时无法连接的错误,过几秒钟后又能自动恢复,查看后发现apache的错误日志中有如下字样:[error] (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : proxy: HTTP: attempt to connect to localhost:8080 (localhost) failed[error] ap_proxy_connect_backend disabling worker for (host name) 此问题是由于windows环境下缺省的tcp的maxuserport为5000,而使用了反向代理则很可能很快耗尽了端口资源,一旦耗尽端口资源则产生os 10048错误,接着ap_proxy_connect_backend就自动重启所有的线程。解决办法是到注册表中建立一个maxuserport键以修改此参数的缺省值。以下是msdn上对于此参数的解释:MaxUserPortHKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Description
Determines the highest port number TCP can assign when an application requests an available user port from the system. Typically, ephemeral ports (those used briefly) are allocated to port numbers 1024 through 5000.
Note
Windows 2000 does not add this entry to the registry. You can add it by editing the registry or by using a program that edits the registry.
Data type | Range | Default value |
---|---|---|
REG_DWORD | 5,000–65,534 ( port number ) | 5000 |
Determines the highest port number TCP can assign when an application requests an available user port from the system. Typically, ephemeral ports (those used briefly) are allocated to port numbers 1024 through 5000.
Note
Windows 2000 does not add this entry to the registry. You can add it by editing the registry or by using a program that edits the registry.
相关文章推荐
- django+apache+windows环境,css丢失解决办法
- Windows下安装Apache HTTP Server 无法启动遇到OS10048 通常每个套接字地址(协议/网络地址/端口)只允许使用一次 的问题解决方法
- MySQL忘记root密码的解决办法(Windows环境下)
- windows环境下secureCRT链接不上linux虚拟机的解决办法
- Windows200864位操作系统下的SQLPLUS.EXE 无法找到入口解决办法和Oracle环境变量的设置
- “windows正在启动”画面停留时间长的原因及解决办法
- 同一台电脑安装多个版本JDK后,修改环境变量,也无法生效的原因和解决办法
- Windows下Apache配置SSL以支持https及出错的解决办法
- 关于windows环境下cordova命令行无法启动adb.exe的解决办法
- windows环境中mysql忘记root密码的解决办法 (不用mysqld-nt.exe)+找不到password
- Mac OS X上的终端bash没有读取~/.bashrc的原因和解决办法
- Mac OS X 自带PHP环境gd库扩展缺少freetype 解决办法
- Tomcat Windows版写成服务时Unable to open the service的原因及解决办法
- apache配置,php中没有php5apache2_2.dll的原因及解决办法
- thinkphp5.0在服务器iis环境下调用验证码不显示,在本地apache环境调式正常解决办法
- Apache站点下载大文件不完整原因及解决办法
- windows环境中mysql忘记root密码的解决办法
- Windows 服务安装失败原因及解决办法
- Windows环境下个别Gem包安装不上的解决办法