-
יצרתי דטבייס של mongo ב https://www.mongodb.com/cloud/atlas הוא יצר לי provider.
ואני לא מצליחה להתחבר אל הדטבייס בסרביס שכתוב בnode js.
האם צריך להתקין לוקלית על המחשב mongo כדי שהוא יצליח להתחבר לשרת שיושב ב cloud ?const uri = "mongodb+srv://myName:1234@shmuracluster-vx7fp.mongodb.net/test?retryWrites=true&w=majority";
MongoClient.connect(uri, {
useNewUrlParser: true,
useUnifiedTopology: true
}, function(err: any, client: any) {
if(err) {
console.log('Error occurred while connecting to MongoDB Atlas...\n',err);
}
});וזה השגיאה שהוא זורק:
{ MongoTimeoutError: Server selection timed out after 30000 ms
at Timeout.setTimeout (C:\shmura\rishum-knasim\node_modules\mongodb\lib\core\sdam\topology.js:850:16)
at ontimeout (timers.js:475:11)
at tryOnTimeout (timers.js:310:5)
at Timer.listOnTimeout (timers.js:270:5)
name: 'MongoTimeoutError',
[Symbol(mongoErrorContextSymbol)]: {} } -
יצרתי דטבייס של mongo ב https://www.mongodb.com/cloud/atlas הוא יצר לי provider.
ואני לא מצליחה להתחבר אל הדטבייס בסרביס שכתוב בnode js.
האם צריך להתקין לוקלית על המחשב mongo כדי שהוא יצליח להתחבר לשרת שיושב ב cloud ?const uri = "mongodb+srv://myName:1234@shmuracluster-vx7fp.mongodb.net/test?retryWrites=true&w=majority";
MongoClient.connect(uri, {
useNewUrlParser: true,
useUnifiedTopology: true
}, function(err: any, client: any) {
if(err) {
console.log('Error occurred while connecting to MongoDB Atlas...\n',err);
}
});וזה השגיאה שהוא זורק:
{ MongoTimeoutError: Server selection timed out after 30000 ms
at Timeout.setTimeout (C:\shmura\rishum-knasim\node_modules\mongodb\lib\core\sdam\topology.js:850:16)
at ontimeout (timers.js:475:11)
at tryOnTimeout (timers.js:310:5)
at Timer.listOnTimeout (timers.js:270:5)
name: 'MongoTimeoutError',
[Symbol(mongoErrorContextSymbol)]: {} }@Nanif אמר בהאם צריך להתקין mongoDB לוקלי כדי להתחבר לדטבייס שרץ ב mongodb atlas ?:
האם צריך להתקין לוקלית על המחשב mongo כדי שהוא יצליח להתחבר לשרת שיושב ב cloud ?
ברור שלא
נ. ב. אפשר להשתמש בלחצן
</>כדי לפרמט קוד כךconst uri = "mongodb+srv://myName:1234@shmuracluster-vx7fp.mongodb.net/test?retryWrites=true&w=majority"; MongoClient.connect(uri, { useNewUrlParser: true, useUnifiedTopology: true }, function(err: any, client: any) { if(err) { console.log('Error occurred while connecting to MongoDB Atlas...\n',err); } });וזה השגיאה שהוא זורק:
{ MongoTimeoutError: Server selection timed out after 30000 ms at Timeout.setTimeout (C:\shmura\rishum-knasim\node_modules\mongodb\lib\core\sdam\topology.js:850:16) at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5) name: 'MongoTimeoutError', [Symbol(mongoErrorContextSymbol)]: {} }ד"א שמת פה את אישורי הכניסה שלך... זה בכוונה?
-
יצרתי דטבייס של mongo ב https://www.mongodb.com/cloud/atlas הוא יצר לי provider.
ואני לא מצליחה להתחבר אל הדטבייס בסרביס שכתוב בnode js.
האם צריך להתקין לוקלית על המחשב mongo כדי שהוא יצליח להתחבר לשרת שיושב ב cloud ?const uri = "mongodb+srv://myName:1234@shmuracluster-vx7fp.mongodb.net/test?retryWrites=true&w=majority";
MongoClient.connect(uri, {
useNewUrlParser: true,
useUnifiedTopology: true
}, function(err: any, client: any) {
if(err) {
console.log('Error occurred while connecting to MongoDB Atlas...\n',err);
}
});וזה השגיאה שהוא זורק:
{ MongoTimeoutError: Server selection timed out after 30000 ms
at Timeout.setTimeout (C:\shmura\rishum-knasim\node_modules\mongodb\lib\core\sdam\topology.js:850:16)
at ontimeout (timers.js:475:11)
at tryOnTimeout (timers.js:310:5)
at Timer.listOnTimeout (timers.js:270:5)
name: 'MongoTimeoutError',
[Symbol(mongoErrorContextSymbol)]: {} }@Nanif צריך מונגו קליינט לא מונגו DB, וכבר יש לך מונגו קליינט.
נראה שהרבה התלוננו על השגיאה שקיבלת, יש על זה בגיטהאב הרבה תלונות
https://github.com/metabase/metabase/issues/6678
https://github.com/metabase/metabase/issues/9867
נסה את הפתרונות שם.
שלום! נראה שהשיחה הזו מעניינת אותך, אבל עדיין אין לך חשבון.
נמאס לכם לגלול בין אותם הפוסטים בכל ביקור? כשנרשמים לחשבון, תמיד תחזרו בדיוק למקום שבו הייתם קודם, ותוכלו לבחור לקבל התראות על תגובות חדשות (בין אם במייל, ובין אם בהתראת פוש). תוכלו גם לשמור סימניות ולפרגן ב-upvote לפוסטים כדי להביע הערכה לחברי קהילה אחרים.
בעזרת התרומה שלך, הפוסט הזה יכול להיות אפילו טוב יותר 💗
הרשמה התחברות