添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Because this error can happen to me with the mongod how can I fix it so that the error does not pop up since my plugin connects to me with the mongodb without any problem
The error exactly appears at the end of starting all the server plugins:
Error console minecraft

Code (Java):
Exception in monitor thread while connecting to server cluster0 - clcro. mongodb . net : 27017
com. mongodb . MongoSocketException : cluster0 - clcro. mongodb . net
at com. mongodb . ServerAddress . getSocketAddresses ( ServerAddress. java : 211 ) ~ [ Hydrogen - 1.1 - SNAPSHOT. jar :? ]
at com. mongodb . internal . connection . SocketStream . initializeSocket ( SocketStream. java : 75 ) ~ [ Hydrogen - 1.1 - SNAPSHOT. jar :? ]
at com. mongodb . internal . connection . SocketStream . open ( SocketStream. java : 65 ) ~ [ Hydrogen - 1.1 - SNAPSHOT. jar :? ]
at com. mongodb . internal . connection . InternalStreamConnection . open ( InternalStreamConnection. java : 126 ) ~ [ Hydrogen - 1.1 - SNAPSHOT. jar :? ]
at com. mongodb . internal . connection . DefaultServerMonitor $ServerMonitorRunnable. run ( DefaultServerMonitor. java : 117 ) [ Hydrogen - 1.1 - SNAPSHOT. jar :? ]
at java. lang . Thread . run ( Unknown Source ) [ ?: 1.8.0_251 ]
Caused by : java. net . UnknownHostException : cluster0 - clcro. mongodb . net
at java. net . Inet6AddressImpl . lookupAllHostAddr ( Native Method ) ~ [ ?: 1.8.0_251 ]
at java. net . InetAddress $2. lookupAllHostAddr ( Unknown Source ) ~ [ ?: 1.8.0_251 ]
at java. net . InetAddress . getAddressesFromNameService ( Unknown Source ) ~ [ ?: 1.8.0_251 ]
at java. net . InetAddress . getAllByName0 ( Unknown Source ) ~ [ ?: 1.8.0_251 ]
at java. net . InetAddress . getAllByName ( Unknown Source ) ~ [ ?: 1.8.0_251 ]
at java. net . InetAddress . getAllByName ( Unknown Source ) ~ [ ?: 1.8.0_251 ]
at com. mongodb . ServerAddress . getSocketAddresses ( ServerAddress. java : 203 ) ~ [ Hydrogen - 1.1 - SNAPSHOT. jar :? ]
... 5 more
Do a try/catch statement and do an catch an Exception und name the variable ignored so this error would pop up
Click to expand...
The URI is wrong, ignoring the error wouldn't fix the problem
You gotta use the correct MongoDB URI format.
https://docs.mongodb.com/manual/reference/connection-string/
mongodb://[username: password@]host1[: port1][,...hostN[: portN]][/[defaultauthdb][?options]]
So, your URI would be
mongodb://username: [email protected]
But make sure you have a username/password set, or have a X509 cert.
Remove the spaces, I added them because Spigot turned them into :p
The URI is wrong, ignoring the error wouldn't fix the problem
You gotta use the correct MongoDB URI format.
https://docs.mongodb.com/manual/reference/connection-string/
mongodb://[username: password@]host1[: port1][,...hostN[: portN]][/[defaultauthdb][?options]]
So, your URI would be
mongodb://username: [email protected]
But make sure you have a username/password set, or have a X509 cert.
Remove the spaces, I added them because Spigot turned them into :p
Click to expand...
The exact same thing happens to you with the change you have told me, and I have the root user created and the password
Click to expand...
Don't use MongoDB. It's a joke with demonstrated data loss problems .
There's a reason why this image exists:
I have changed the page where to host my mongoDB and it already works correctly, apparently that page did not work correctly for me.
Used page: https://console.clever-cloud.com/
How I did it: https://pastebin.com/7YCWFkrr
SOLVED
Don't use MongoDB. It's a joke with demonstrated data loss problems .
There's a reason why this image exists:
[​IMG]
Click to expand...
Your kidding right? Your sources are majorly out of date, the SO post you linked has an accepted answer talking about how MongoDB USED to suffer from some problems, but the article is fake and any old problems were fixed. MongoDB passes the Jepsen test , and I personally use it for a large server I dev for, and have had no problems with it.
More reading:
https://news.ycombinator.com/item?id=3202959
Your kidding right? Your sources are majorly out of date, the SO post you linked has an accepted answer talking about how MongoDB USED to suffer from some problems, but the article is fake and any old problems were fixed.
Click to expand...
I'm not. Fun fact: you can do everything MongoDB does now with an actual relational database, with infinitely better reliability and security. Even MySQL supports JSON rows now, which means 95% of what you'd want to do with MongoDB is now done better by a relational database.
MongoDB has an atrocious security record , having been implicated in multiple major leaks of data. MongoDB, as shipped, is insecure by default , and the company's admonishment that you should "follow our security checklist" is insane. Remember, MongoDB once shipped in a configuration that didn't require authentication and allowed wide open access to the database from the internet. It's true that relational DBs can be just as insecure as MongoDB, but they don't usually make basic blunders like this (and usually the faults are in the applications, not in the database itself).
Want to know more? MongoDB has made some major business blunders (no, seriously, they once shipped PostgreSQL once upon a time). Simply put, if you want to know my opinion, MongoDB was and will always be a fad .
Big_Bad_E said:
MongoDB passes the Jepsen test
Click to expand...
If you read the article, you will find:
  • it was not a complete investigation
  • MongoDB exhibited data loss behavior unless you set extreme concerns
  • Big_Bad_E said:
    and I personally use it for a large server I dev for, and have had no problems with it.
    Click to expand...
    I'm very sure your players are going to like how their data is stored in a database where the contents of the data don't matter .
    Big_Bad_E said:
    Click to expand...
    That Hacker News comment is from 2011... so it's dreadfully out of date too. How's that for hypocrisy? Just reading through the article about how MongoDB is just a fad
    "Critiques about widely used products like MongoDB can be fraught. My point is not that MongoDB is a poor choice today — in fact, I believe the opposite for the right use cases." https://www.nemil.com/mongo/1.html
    If you don't like it you don't like it, but MongoDB is undeniably popular and good to learn anyways.
    As for the out of date Hacker News comment, it's responding to the same article the StackOverflow question is about.
    I don't want to hijack this thread for a stupid argument, but MongoDB is improving and just growing in popularity , it's not just a fad.
    Just reading through the article about how MongoDB is just a fad
    "Critiques about widely used products like MongoDB can be fraught. My point is not that MongoDB is a poor choice today — in fact, I believe the opposite for the right use cases." https://www.nemil.com/mongo/1.html
    Click to expand...
    You did not even read the full series of articles, which dive into meticulous detail about how MongoDB was a technically inferior solution in 2012 when it was in vogue.
    Sure, MongoDB got rid of the all its constraints from 2012. There's no global lock any more. They replaced the internal storage engine with something better. And the client library defaults have been somewhat improved such the client will not consider a write sitting in a local buffer to be a success.
    Also, I did not argue MongoDB was totally unsuitable. It's unsuitable where the data matters. You're clearly using it in a situation where the data really matters. If you need statistical approximations of analytic data, MongoDB is perfect. if you need a firehose of logging data and you don't really care about logging entries going away, then it's perfect.
    Big_Bad_E said:
    If you don't like it you don't like it, but MongoDB is undeniably popular and good to learn anyways.
    Click to expand...
    And so we stoop to an argumentum ad populum . Cocaine is also "undeniably popular" but I don't see anyone advising you to use it.
    Big_Bad_E said:
    I don't want to hijack this thread for a stupid argument, but MongoDB is improving and just growing in popularity , it's not just a fad.
    Click to expand...
    Again, argumentum ad populum. Coronavirus is also growing in popularity by the number of people who get it, it's not a fad.