#Can't connect to MongoDB in my VPS

1 messages · Page 1 of 1 (latest)

haughty sedge
#

Side note: I am using Prisma to connect to the database.

When I host my Discord bot on my vps, it won't connect to the database and shows me this error: ```
Error: Raw query failed. Code: unknown. Message: Server selection timeout: No available servers. Topology: { Type: ReplicaSetNoPrimary, Servers: [ { Address: keys-db-shard-00-00.pl1re.mongodb.net:27017, Type: Unknown, Error: unexpected end of file }, { Address: keys-db-shard-00-01.pl1re.mongodb.net:27017, Type: Unknown, Error: unexpected end of file }, { Address: keys-db-shard-00-02.pl1re.mongodb.net:27017, Type: Unknown, Error: unexpected end of file }, ] }


However, when I host in on my machine, everything works.
viral sinewBOT
haughty sedge
#

shut up bozo

haughty sedge
#

anyone? 🥹

wary shoal
#

make sure to whitelist your vps

#

also, i highly recommend not using MongoDB and prisma as it limits what it can do, instead i would use Mongoose or, if you like the class decorator format, typegoose

haughty sedge
#

Will check, thanks

#

Also, I am not a huge fan of the way Typegoose works

#

Might go back to using Mongoose

wary shoal