Skip to main content
Topic: MongoDB in Artix (Read 1083 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

MongoDB in Artix

So the old thread is 2 y.o. and it's recommended to start a new thread.
And maybe some things changed, so here we go...
I need to install MongoDB on the Artix machine
here's what I've did:
Code: [Select]
git clone https://aur.archlinux.org/mongodb-bin.git
cd mongodb-bin
makepkg -si

but when I'm running mongo I got this error, because mongo server is down, so how do I fix it ?

Code: [Select]
MongoDB shell version v4.4.1
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect@src/mongo/shell/mongo.js:374:17
@(connect):2:6
exception: connect failed
exiting with code 1


Calling @andrewcz @Everyone @konimex for a help!
Thanks in advance !

Re: MongoDB in Artix

Reply #1
Quote
So the old thread is 2 y.o. and it's recommended to start a new thread.
It is a good practice in such case to add link to old thread.

Regarding your problem I would suspect some configuration files, is it even running?
Well, that is all I know,
Happy hacking.

Re: MongoDB in Artix

Reply #2
The problem is that you don't have the service running. If your run this command in other terminal:

Code: [Select]
/usr/bin/mongod --quiet --config /etc/mongodb.conf

Then it should works.

So when you install packages from AUR you should always check if software has a .service file, if so that's mean you need to write the service script for the init you use. I don't know if you use S6, Openrc or Runit. If you use OpenRC you can copy ideas from here:

https://git.alpinelinux.org/aports/tree/community/mongodb/mongodb.initd?h=3.6-stable

Best regards.
Artix Linux Colombia