MongoDB Help Please!!

Status
This thread has been locked.

HeavySleeper

Dedicated Member
Supreme
Feedback score
37
Posts
407
Reactions
93
Resources
0
Okay, so basically here's my situation: All of my plugins require MongoDB database connections for them to work. I am hosting/have installed MongoDB within my dedicated server, and it seems to be working properly, with a username/password aswell.

I have two completely seperate plugins. One is a custom practice plugin which requires MongoDB, while the other is a UHC-Lobby plugin which can be found here: https://www.mc-market.org/resources/10486/. The connection to the practice is sucessful with MongoDB, and works completely flawlessly, while for some reason, the UHC-Lobby plugin I have doesn't work. It is able to sucessfully open the connection, but then it closes it. Here is a console log: . Remember though, that my other plugin works flawlessly with the authentication aswell.

Moreover, I decided to contact the dev of this UHC-Lobby plugin and attempt to get support that way, so he gave me a test DB from a hosting website and that also worked flawlessly. So, he says it must be an issue with my DB, but I'm unsure if its my DB because my other plugin using the exact same credentials works perfectly fine.

I am using MineSpigot 1.7.10-1.8x if that helps at all!

If you could please contact me if you can help me that would mean the world to me! My discord is Fierce#8174

Fierce#8174
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Jenss

Entrepreneur
Premium
Feedback score
6
Posts
337
Reactions
39
Resources
0
Hey HeavySleeper!
I am sure we can provide you with this service here at Timeless Services!
Add me on discord @ Jens#0518
Or join our discord server and create a ticket and our freelancers will be with you as soon as they can @ https://discord.gg/3Sf7WTe
Thanks
~ Timeless Services
Jens | Executive
 

Satima

I am Satima.
Premium
Feedback score
9
Posts
317
Reactions
91
Resources
0
Clearly it is an authentication error.
Authentication is managed at a database level. When you try to connect to the system using a database, mongo actually checks for the credentials you provide in the collection <database>.system.users. So, basically when you are trying to connect to "test", it looks for the credentials in test.system.users and returns an error because it cannot find them (as they are stored in admin.system.users). Having the right to read and write from all db doesn't mean you can directly connect to them.

You have to connect to the database holding the credentials first. Try:

mongo admin -u admin -p SECRETPASSWORD
 
Status
This thread has been locked.
Top