Während ich meinen MongoDb verbindet, um Backend zu beenden, zeigt es mir FehlerJavaScript

Javascript-Forum
Guest
 Während ich meinen MongoDb verbindet, um Backend zu beenden, zeigt es mir Fehler

Post by Guest »

Code: Select all

[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) {}
}
dies wird in meinem Backend-Protokoll angezeigt
Ich habe versucht, den Fehler mit chargpt zu beheben, der besagt: „MongoDB-Verbindungs-Timeout wird behoben:

Code: Select all

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."
Aber das funktioniert nicht

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post