0

I'm trying to connect to my mongoDB running as a service on my rPi3B+, using openSuse Tumbleweed 64bit, mongo version 3.6.2, from my laptop sharing the same LAN/Wifi (pi on LAN & laptop on Wifi).

I completed this install guide(https://www.osradar.com/install-mongodb-opensuse-15/) directly after a fresh install of the rPi3 JeOS image provided here: https://en.opensuse.org/HCL:Raspberry_Pi3

Now when I tried to connect to the db service using compass using the same IP I used to connect to the Pi over ssh, and the standard port of 27017. It then reports "MongoDB not running on the provided host and port".

However, I have the shell running on the Pi at the same time, and when I exit the shell so that compass is the only client attempting a connection. When I run sudo systemctl status mongodb the service is active.

When I run netstat -lntu I get the following output:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 ::1:27017               :::*                    LISTEN     
udp        0      0 192.168.1.163:123       0.0.0.0:*                          
udp        0      0 127.0.0.1:123           0.0.0.0:*                          
udp        0      0 0.0.0.0:123             0.0.0.0:*                          
udp        0      0 0.0.0.0:68              0.0.0.0:*                          
udp6       0      0 fe80::ba27:ebff:feb:123 :::*                               
udp6       0      0 ::1:123                 :::*                               
udp6       0      0 :::123                  :::*     

When I ping the Pi's IP address using the local IP I get the expected returns showing that it is reachable.

Are there some settings I need to change from within the shell to make it reachable by Compass?

0

Alrighty, I guess this was a noob question.

Answers can be found here as well: https://stackoverflow.com/questions/42739166/could-not-connect-to-mongodb-on-the-provided-host-and-port#49220957

Pretty sure many of their different methods would work. For some reason mongo --bind_ip_all didn't work for me and seems like the simplest. I think it has something to do with openSuse's arm version doesn't use mongod and instead just mongo.

What worked for me was going into my '/etc/mongodb.conf' file and changing the boundIP from 127.0.0.1,::1 to 0.0.0.0,::1

Not to sure what the ::1 is for but I can connect to the db with compass now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.