首页 > 系统相关 >Linux系统Apache添加监听端口后无法启动服务并报错:Job for httpd.service failed because the control process exited with e

Linux系统Apache添加监听端口后无法启动服务并报错:Job for httpd.service failed because the control process exited with e

时间:2023-07-19 14:25:35浏览次数:44  
标签:httpd http service 端口 报错 Linux port

导言:这是SE Linux安全机制导致的。

解决方法:

1.查看当前httpd端口

#  semanage port -l|grep http

2.将对应端口加入SE Linux,以8068为例

# semanage port -a -t http_port_t -p tcp 8068

3.再次查看

#  semanage port -l|grep http

4.重启Apache服务

# systemctl restart httpd

5.查看端口状态

# netstat -ntlp|grep http

成功解决!

标签:httpd,http,service,端口,报错,Linux,port
From: https://www.cnblogs.com/dyc99/p/17565432.html

相关文章

  • uniapp专栏 —— vscode报错 'uni' is not defined.
    写在前面这些内容基于通过cli搭建的uniapp项目,使用了vite4,ts4.9,vue3(组合式API,setup语法糖)。如果有版本不一致,请谨慎参考。正文uni是一个全局变量,但是eslint没有识别到。避免这个错误报错在.eslintrc.js文件中加上配置globals:{uni:true},......
  • 容器环境下访问服务出现 Address not available 报错
    1、现象:访问服务时出现如下报错2、原因:通过netstat-an查看到连接svc的地址,其中estab状态的连接数,已经到达了可用的随机端口数量阈值,无法在新建连接了   执行命令查看:netstat-tan|grepESTABLISHED|wc-l   sysctl-a|grepnet.ipv4.ip_local_port_range3......
  • docker compose报错environment array items[0,4] must be unique
    DockerCompose报错:environmentarrayitems[0,4]mustbeunique在使用DockerCompose进行容器编排时,有时候会遇到以下错误提示:environmentarrayitems[0,4]mustbeunique。这个错误发生在定义了重复的环境变量时,本文将详细解释这个错误的原因,并提供解决方案。DockerCompose......
  • Python 报错 Could not guess image MIME subtype
    Python报错CouldnotguessimageMIMEsubtype问题描述:使用MIMEImage打包图片时,报错CouldnotguessimageMIMEsubtypefromemail.mime.imageimportMIMEImageidentification=uuid.uuid4().hexwithopen(abspath,"rb")asf:content=f.read()img=MIMEIm......
  • [未解决] vue transform-blocks解析源代码报错:Illegal tag name. Use '<' to print '<
    报错内容:[vite]Internalservererror:Illegaltagname.Use'<'toprint'<'.用的是这篇博文的源代码展示方法:如何用vite的vueCustomBlockTransforms(自定义块转换)实现源代码展示使用时突然遇到某一个vue文件添加<demo></demo>标签后报错,但其他vue文件可以正常读取和展示......
  • git commit 时报错:husky - pre-commit hook exited with code 1 (error)
    在使用git进行commit时出现错误:husky-pre-commithookexitedwithcode1(error)。方式一chatgpt的回答是:报错信息“husky-pre-commithookexitedwithcode1(error)”表示在执行Git提交操作时,pre-commit钩子脚本返回了非零的退出码,表示出现了错误。这种......
  • Nest.js框架下,nest g app auth 命令报错!
    首先报错信息是:Failedtoexecutecommand:node@nestjs/schematics:sub-app--name=auth--no-dry-run--no-skip-import--language="ts"--source-root="apps/reservations/src"--spec--no-flat--spec-file-suffix="spec",大概的意思就是无法执行这条命令。......
  • 关于调用支付宝密钥出现的报错问题 Not a valid PEM post boundary
    在项目的支付模块中我配置了settings.py文件importos#应用私钥APP_PRIVATE_KEY_STRING=open(os.path.join(os.path.dirname(os.path.abspath(__file__)),'pem','app_private_key.pem')).read()#支付宝公钥ALIPAY_PUBLIC_KEY_STRING=open(os.path.join(os.path.dirn......
  • 使用node开发脚手架报错:Error [ERR_REQUIRE_ESM]: Must use import to load ES Module
    在使用node开发脚手架的时候,每次执行命令都会报错 :Error[ERR_REQUIRE_ESM]:MustuseimporttoloadESModule经过排查发现,原因为chalk包为5版本以上导致的。constchalk=require('chalk') 官方文档有说明:https://github.com/chalk/chalk 我们只需要换成......
  • SAM(segment-anything导出onnx模型报错unsupported onnx opset version:17)
    问题导出samonnx模型时,报错!版本:torch=1.12.0;onnx=1.14.0UnsupportedONNXopsetversion:17 解决方案将scripts/export_onnx_model.py中的onnxopset的默认值(default=17)从“17”改为“11” 修改default为“11” 修改完毕后,再运行:  ......