侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

Centos7下JAVA: InetAddress.getLocalHost().getHostAddress()报错

2023-11-10 星期五 / 0 评论 / 0 点赞 / 46 阅读 / 428 字

错误: 使用InetAddress.getLocalHost().getHostAddress()提示方法不存在 系统:centos7 环境:docker容器 原因:SElinux处于开启状态 解决办

错误:  使用InetAddress.getLocalHost().getHostAddress()提示方法不存在

系统:centos7

环境:docker容器

原因:SElinux处于开启状态

解决办法: setenforce 0  关闭SELinux

注:有时候在centos下提示连接数据库失败,可能是配置文件中数据库地址写成了localhost并且系统没有关闭SELinux

 

广告 广告

评论区