J
J
Jourloy2021-06-07 13:44:23
MongoDB
Jourloy, 2021-06-07 13:44:23

How to connect to MongoDB installed on raspbian, ubuntu or manjaro?

I installed Raspbian Lite (the one without an interface) on the Raspberry Pi, installed MongoDB, I run it on port 10000, and the admin panel on 11000, respectively. I connect to the admin panel, but I can’t connect to the database itself either from MongoDB Compass or using the NodeJS driver. What are the possible ways to solve the problem?

There is also a similar error on Ubuntu Server, everything is also unchanged there. And I even tried to put it on Manjaro, the same result, so I think this is some kind of problem with the board itself, but I'm not sure

sudo lsof -i -P -n | grep LISTEN

sshd       532    root    3u  IPv4  15144      0t0  TCP *:22 (LISTEN)
sshd       532    root    4u  IPv6  15146      0t0  TCP *:22 (LISTEN)
mongod    4603 mongodb    9u  IPv4  34584      0t0  TCP *:10000 (LISTEN)
mongod    4603 mongodb   10u  IPv4  32502      0t0  TCP *:11000 (LISTEN)


Database logs

Mon Jun  7 11:31:25.353 [initandlisten] MongoDB starting : pid=4630 port=10000 dbpath=/db 32-bit host=raspberrypi
Mon Jun  7 11:31:25.353 [initandlisten] 
Mon Jun  7 11:31:25.353 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
Mon Jun  7 11:31:25.353 [initandlisten] **       32 bit builds are limited to less than 2GB of data (or less with --journal).
Mon Jun  7 11:31:25.353 [initandlisten] **       See http://dochub.mongodb.org/core/32bit
Mon Jun  7 11:31:25.353 [initandlisten] 
Mon Jun  7 11:31:25.353 [initandlisten] db version v2.4.14
Mon Jun  7 11:31:25.354 [initandlisten] git version: nogitversion
Mon Jun  7 11:31:25.354 [initandlisten] build info: Linux bm-wb-03 3.19.0-trunk-armmp #1 SMP Debian 3.19.1-1~exp1+plugwash1 (2015-03-28) armv7l BOOST_LIB_VERSION=1_58
Mon Jun  7 11:31:25.354 [initandlisten] allocator: system
Mon Jun  7 11:31:25.354 [initandlisten] options: { config: "/etc/mongodb.conf", dbpath: "/db", journal: "true", logappend: "true", logpath: "/var/log/mongodb/mongodb.log", port: 10000 }
Mon Jun  7 11:31:25.367 [initandlisten] journal dir=/db/journal
Mon Jun  7 11:31:25.367 [initandlisten] recover : no journal files present, no recovery needed
Mon Jun  7 11:31:25.411 [websvr] admin web console waiting for connections on port 11000
Mon Jun  7 11:31:25.411 [initandlisten] waiting for connections on port 10000
Mon Jun  7 11:31:58.057 [initandlisten] connection accepted from 192.168.0.103:54768 #1 (1 connection now open)
Mon Jun  7 11:31:58.073 [conn1] end connection 192.168.0.103:54768 (0 connections now open)
Mon Jun  7 11:31:58.588 [initandlisten] connection accepted from 192.168.0.103:54769 #2 (1 connection now open)
Mon Jun  7 11:31:58.596 [conn2] end connection 192.168.0.103:54769 (0 connections now open)
Mon Jun  7 11:31:59.106 [initandlisten] connection accepted from 192.168.0.103:54770 #3 (1 connection now open)
Mon Jun  7 11:31:59.111 [conn3] end connection 192.168.0.103:54770 (0 connections now open)


DB config

# mongodb.conf

# Where to store the data.
dbpath=/db

#where to log
logpath=/var/log/mongodb/mongodb.log

logappend=true

#bind_ip = 127.0.0.1
port = 10000


If you have questions about permissions for /db
После создания папки, я прописал ей 777 права, так что MongoDB имеет доступ


I installed the 64-bit version of MongoDB on Manjaro, so it's not about the bits for sure

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question