After a few folks within the community assisted in fixing a previous error, I am having an error on boot. From what I’ve found, this error happens when trying to assign an IP that is not available on the local interface. The computer used to access the DB is on the same network as the Pi, so it doesn’t travel outside the network and doesn’t need a VPN/proxy/etc of some kind to connect.
Device Information:
Raspberry Pi 5 using Ubuntu Server 24.04 LTS
Specific Error:
{"t":{"$date":"2024-06-10T08:14:20.621-05:00"},"s":"E", "c":"CONTROL", "id":20568, "ctx":"initandlisten","msg":"Error setting up listener","attr":{"error":{"code":9001,"codeName":"SocketException","errmsg":"setup bind :: caused by :: Cannot assign requested address"}}}
I’ve ran the command " ifconfig -a | grep “inet” " and the output is as follows:
inet 192.168.1.214 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::2ecf:67ff:fe2e:a51e prefixlen 64 scopeid 0x20<link>
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
I’ve removed the “,192.168.1.214” portion of the bindIP, and it would start just fine after a reboot, and I can manually start the service with no issues with that IP in the config file.
When attempting to access it in CMD/another platform without being SSH’d first, I get the following error:
Current Mongosh Log ID: 66688ede9d0be543b746b798
Connecting to: mongodb://<credentials>@192.168.1.214:27017/?directConnection=true&appName=mongosh+2.2.5
MongoServerSelectionError: connect ETIMEDOUT 192.168.1.214:27017