栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

docker中mongodb容器遇到的问题

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

docker中mongodb容器遇到的问题

1.Docker中apt-get update出现以下错误:

Err:1 http://archive.ubuntu.com/ubuntu focal InRelease                                                    
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease                                          
  Temporary failure resolving 'security.ubuntu.com'
Err:3 http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 InRelease                                  
  Temporary failure resolving 'repo.mongodb.org'
Err:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease                                            
  Temporary failure resolving 'archive.ubuntu.com'
Err:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  Temporary failure resolving 'archive.ubuntu.com'

解决方式:

在linux中修改
vim /etc/resolv.conf
追加
nameserver 8.8.8.8
重新启动网络服务
sudo service network-manager restart
重新启动docker
sudo systemctl restart docker

2.虚拟机挂机后,

远程连接mongodb 失败

解决:

重新启动网络服务
sudo service network-manager restart
重新启动docker
sudo systemctl restart docker

3.有的教程进行如下修改

设置 vim /etc/mongod.conf.orig

bindId=127.0.0.1改为bindIp=0.0.0.0

我进行前两步骤就实现了,远程访问

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/461266.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号