与mongo 3.6的远程连接在ubuntu 16.04中不起作用

问题描述 投票:0回答:1

我尝试远程连接到mongo数据库

mongod.conf

storage:
  dbPath: /var/lib/mongodb
  journal:
    enabled: true
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log
net:
  port: 27017
  bindIp: xxx.xxx.130.13
processManagement:
  timeZoneInfo: /usr/share/zoneinfo

我使用ufw但不起作用

root@localhost:~# sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW IN    Anywhere
27017                      ALLOW IN    Anywhere
27017 (v6)                 ALLOW IN    Anywhere (v6)
22/tcp (v6)                ALLOW IN    Anywhere (v6)

我将nmap与sudo nmap -p27017 xxx.xxx.130.13一起使用日志是

PORT      STATE  SERVICE
27017/tcp closed mongod


and add sudo ufw allow from xxx.xxx.220.153   ----> other server

任何想法?问候!! >>

我尝试远程连接到mongo databse mongod.conf存储:dbPath:/ var / lib / mongodb日志:启用:true systemLog:目标:文件logAppend:true路径:/ var / log / mongodb / ...

mongodb ubuntu nosql ubuntu-16.04
1个回答
0
投票

我也遇到了同样的问题。你有没有解决的办法?

© www.soinside.com 2019 - 2024. All rights reserved.