При подключении моего mongodb, чтобы поддержать его, показывая мне ошибкуJavascript

Форум по Javascript
Ответить Пред. темаСлед. тема
Anonymous
 При подключении моего mongodb, чтобы поддержать его, показывая мне ошибку

Сообщение Anonymous »

Код: Выделить всё

[nodemon] restarting due to changes...
[nodemon] starting `ts-node src/server.ts`
Server running at http://localhost:3000
Server is running at http://localhost:5000
(node:29444) NOTE: The AWS SDK for JavaScript (v2) is in maintenance mode.
SDK releases are limited to address critical bug fixes and security issues only.

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the blog post at https://a.co/cUPnyil
(Use `node --trace-warnings ...` to show where the warning was created)
MongoServerSelectionError: connect ETIMEDOUT 13.234.25.74:27017
at Timeout._onTimeout (C:\Users\akanksha.mishra\Desktop\intranet-backend\node_modules\mongodb\src\sdam\topology.ts:567:30)
at listOnTimeout (node:internal/timers:569:17)
at processTimers (node:internal/timers:512:7) {
reason: TopologyDescription {
type: 'ReplicaSetNoPrimary',
servers: Map(3) {
'watcho-tms-shard-00-01.fhfgb.mongodb.net:27017' => [ServerDescription],
'watcho-tms-shard-00-00.fhfgb.mongodb.net:27017' => [ServerDescription],
'watcho-tms-shard-00-02.fhfgb.mongodb.net:27017' => [ServerDescription]
},
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: 'atlas-zjemyv-shard-0',
maxElectionId: null,
maxSetVersion: null,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: null
},
code: undefined,
[Symbol(errorLabels)]: Set(0) {}
}
это отображается в моем внутреннем журнале
Я пытался устранить ошибку с помощью chargpt, в котором говорится: «Исправление тайм-аута подключения MongoDB:

Код: Выделить всё

Go to the MongoDB Atlas dashboard and navigate to "Network Access" under "Security". Add your current IP address or use 0.0.0.0/0 for testing purposes.
Verify that port 27017 is open on your network and not blocked by firewalls or antivirus software.
Test connectivity using tools like ping or telnet to ensure your application can reach the database servers.
Resolving ReplicaSetNoPrimary:
Check the status of your MongoDB Atlas cluster in the dashboard to ensure all nodes are healthy.
Upgrade your MongoDB Node.js driver to the latest version compatible with your cluster.
Addressing AWS SDK Warning:
Update your project dependencies to use AWS SDK v3 by replacing v2 imports with v3-specific packages (e.g., @aws-sdk/client-s3 for S3 operations).
Follow AWS's migration guide for minimal code changes during the transition67."
но это не работает

Подробнее здесь: https://stackoverflow.com/questions/793 ... g-me-error
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Javascript»