sarjarapu / migrate-mongo-cluster Goto Github PK
View Code? Open in Web Editor NEWmigrate the MongoDB data from one server to the other
License: Apache License 2.0
migrate the MongoDB data from one server to the other
License: Apache License 2.0
I have tracked the code according to the sack trace in the error (hereunder) and it looks like the mongo driver has identified it is connected to a sharded cluster but this tools does not take it into account and tries to read the oplog from the connected server, which in a sharded cluster scenario is mongos - so it fails.
[ERROR] 2022-02-23 16:23:19 ERROR [main] MongoDBHelper:72 - [UNHANDLED] error while performing operation: {"operation": "find", "query": {}}; error: com.mongodb.MongoQueryException: Query failed with error code 20 and error message '' on server mymongos:27017 Exception in thread "main" com.mongodb.MongoQueryException: Query failed with error code 20 and error message '' on server mymongos:27017 at com.mongodb.operation.FindOperation$1.call(FindOperation.java:735) at com.mongodb.operation.FindOperation$1.call(FindOperation.java:725) at com.mongodb.operation.OperationHelper.withReadConnectionSource(OperationHelper.java:463) at com.mongodb.operation.FindOperation.execute(FindOperation.java:725) at com.mongodb.operation.FindOperation.execute(FindOperation.java:89) at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:189) at com.mongodb.client.internal.FindIterableImpl.first(FindIterableImpl.java:205) at com.mongodb.migratecluster.trackers.ReadOnlyDataTracker.lambda$getLatestDocument$0(ReadOnlyDataTracker.java:40) at com.mongodb.migratecluster.helpers.MongoDBHelper.performOperationWithRetry(MongoDBHelper.java:46) at com.mongodb.migratecluster.trackers.ReadOnlyDataTracker.getLatestDocument(ReadOnlyDataTracker.java:38) at com.mongodb.migratecluster.migrators.OplogMigrator.getLatestOplogEntryFromSource(OplogMigrator.java:118) at com.mongodb.migratecluster.migrators.OplogMigrator.fetchRecentEntryFromSourceAndSaveToOplogstore(OplogMigrator.java:90) at com.mongodb.migratecluster.migrators.OplogMigrator.saveSourceOplogTimeOnOplogstoreIfNotExists(OplogMigrator.java:81) at com.mongodb.migratecluster.migrators.OplogMigrator.preprocess(OplogMigrator.java:50) at com.mongodb.migratecluster.migrators.DataWithOplogMigrator.preprocess(DataWithOplogMigrator.java:31) at com.mongodb.migratecluster.Application.run(Application.java:43) at com.mongodb.migratecluster.Application.main(Application.java:30)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.