http服务启动时的两个错误
来源:互联网 发布:淘宝cpu主板套装 编辑:程序博客网 时间:2024/06/15 03:29
本人系统CentOS 6.5 64bit, Apache HTTP Server的版本为2.2.15。
启动http服务时出现如下错误:
[root@lls ipc]# /etc/init.d/httpd startStarting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using lls.pc for ServerName(13)Permission denied: make_sock: could not bind to address [::]:8099(13)Permission denied: make_sock: could not bind to address 0.0.0.0:8099no listening sockets available, shutting downUnable to open logs [FAILED]
错误原因在于SELinux 安全机制的作用,现在来逐个解决问题。
1.
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using lls.pc for ServerName
表示没有确切地定义主机名。
在配置文件/etc/httpd/conf/httpd.conf中修改,将被注释掉的ServerName名字改为自己的主机名,查看主机名:
[root@lls ipc]# hostnamells.pc
于是将被屏蔽掉的ServerName修改为:
ServerName lls.pc
2.
(13)Permission denied: make_sock: could not bind to address [::]:8099(13)Permission denied: make_sock: could not bind to address 0.0.0.0:8099no listening sockets available, shutting downUnable to open logs表示系统系统中没有为http服务定义8099端口,查看http端口:
[root@lls ipc]# semanage port -l | grep httphttp_cache_port_t tcp 3128, 8080, 8118, 8123, 10001-10010http_cache_port_t udp 3130http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000pegasus_http_port_t tcp 5988pegasus_https_port_t tcp 5989查看http_port_t,系统果然没有为http服务定义8099端口,于是添加8099端口并再次查看http服务的端口:
[root@lls ipc]# semanage port -a -t http_port_t -p tcp 8099[root@lls ipc]# semanage port -l | grep httphttp_cache_port_t tcp 3128, 8080, 8118, 8123, 10001-10010http_cache_port_t udp 3130http_port_t tcp 8099, 80, 81, 443, 488, 8008, 8009, 8443, 9000pegasus_http_port_t tcp 5988pegasus_https_port_t tcp 5989可以看到,在http_port_t中增加了8099。
重新启动http服务:
[root@lls ipc]# /etc/init.d/httpd startStarting httpd: [ OK ]Ok,启动成功。
参考:
[1]http://blog.163.com/darkness@yeah/blog/static/13177448420116991252712/
[2]http://blog.csdn.net/maoxiang/article/details/5720464
0 0
- http服务启动时的两个错误
- Angularjs $http服务的两个request安全问题
- 在eclipse启动Tomcat服务,但是网页输入http://localhost:8080/报404错误的解决方法
- sql server 必须启动的两个服务
- Oracle必须启动的两个服务
- oracle11g监听服务启动时提示“oracle监听服务启动后停止”的错误处理方法
- windows服务启动时出现错误的两种可能性
- windows服务启动时出现错误的两种可能性
- 自己写的windows服务 启动时出现1053错误
- ArcSDE服务启动的ORA-27092错误
- MySql启动服务时1067错误解决方案
- WCF服务启动错误
- adb服务启动错误
- tomcat启动时报Error listenerStart错误,访问web服务时报HTTP Status 404错误
- tomcat启动时报Error listenerStart错误,访问web服务时报HTTP Status 404错误
- Tomcat启动时报Error listenerStart错误,访问web服务时报HTTP Status 404错误
- tomcat启动时报Error listenerStart错误,访问web服务时报HTTP Status 404错误
- 启动windows服务时出现“错误1053:服务没有及时响应启动或控制请求”的解决方法
- vim简明教程(step 2)
- TypeError: distinct() takes exactly 2 arguments (3 given)
- Android开发四大组件---Service详解
- APK反破解之四:Android代码动态加载技术
- 音视频的音频数据格式详解(上)
- http服务启动时的两个错误
- 消息称小米与联发科合作暂停 官方回应不予置评
- Javascript面向对象编程(二):构造函数的继承
- 移动互联网产品设计的原则
- 在IOS下使用protocol buffer
- QQ在线客服代码(不需要加好友即可发起临时会话)
- java23种设计模式之简介
- Android基础知识——ListView
- 如何解决mysql数据库8小时无连接自动关闭