I am executing mongorestore using this command.
mongorestore --uri mongodb+srv://{mongoUser}:{mongoPass}#{mongoHost} --ssl --authenticationDatabase {mongoAuth} --db {db} --gzip --archive={fileLoc} --drop
I am restoring multiple collections at a time. 3 other collections were successful but on the last one which is the biggest one as well, I am getting this error.
Failed: webhook-activity.user: error creating indexes for webhook-activity.user: createIndex error: connection() error occurred during connection handshake: dial tcp: i/o timeout
Details
mongorestore version: 100.5.4
mongo version: 5.0.12
I am using the same command for all my collections.
Related
when I am trying to import the data from ec2 to documentdb with below two commands, getting the same error
mongoimport --ssl --host="#hostname:27017" --collection=test --db=admin --file=restaurant.json --numInsertionWorkers 4 --username=Tester --password=xxxxxx --sslCAFile rds-combined-ca-bundle.pem
mongorestore --host #hostname:27017 --ssl --sslCAFile rds-combined-ca-bundle.pem --username Test --password xxxxxxx dump
error connecting to host: could not connect to server: server
selection error: server selection timeout, current topology: { Type:
Single, Servers: [{ Addr:
dev-gba-documentdb.cprffppj2tqu.ap-south-1.docdb.amazonaws.com:27025,
Type: Unknown, State: Connected, Average RTT: 0, Last error:
connection() : x509: certificate signed by unknown authority }, ] }
I tried with both commands mongoimport ,mongorestore , error not resolved, i am expecting to way out from this error or migrate the data to documentdb
i have a problem with mongostat .
test1 :
mongostat
2019-11-15T16:06:55.722+0100 Failed: error connecting to db server: no reachable servers
test2:
mongostat -u "dominio\\username" -p password--host hostname --authenticationMechanism PLAIN --authenticationDatabase '$external' --ssl --sslCAFile /pathcert
2019-11-15T16:07:44.682+0100 Failed: not authorized on admin to execute command { serverStatus: 1, recordStats: 0, $readPreference: { mode: "secondaryPreferred" }, $db: "admin" }.
I have 2 questions:
- with mongostat can i specify a specific DB?
- the username that privileges need to have?
How can I resolve these?
I have created a postgres data base by giving non ascii name example: "Química"
When I tried to take back up of the same database using following command I am getting the exception
pg_dump: [archiver (db)] connection to database "Química" failed: FATAL: database "Química" does not exist.
Command used:
--host 127.0.0.1 --port 7555 --username postgres --format=d --verbose --jobs=10 --compress 9 --file "C:\Delete\Archive" --dbname "Química" --schema "Archive_TVT"
When I'm trying to import json to my MongoDB which is password authenticated, encrypted and TLS/SSL based connection, I'm getting error.
This is the mongoImport Im writting:
mongoimport --verbose --ssl --sslCAFile "C:\server\cert\rootCA.pem" --sslPEMKeyFile "C:\server\cert\server.pem" --sslFIPSMode --host 127.0.0.1 --port 27017 --username databaseAdmin --password password123 --authenticationDatabase admin --db test_coll --collection blocks --file "C:\data\blocks.json"
And I got the following error message:
2018-07-20T15:21:27.365+0530 filesize: 6392 bytes
2018-07-20T15:21:27.366+0530 using fields:
2018-07-20T15:21:30.368+0530 [........................] test_coll.blocks
0B/6.24KB (0.0%)
2018-07-20T15:21:30.928+0530 [........................] test_coll.blocks
0B/6.24KB (0.0%)
2018-07-20T15:21:30.928+0530 Failed: error connecting to db server: no reachable servers, openssl error: Host validation error
2018-07-20T15:21:30.928+0530 imported 0 documents
Hostname in their certificates should match the specified hostname. So, I updated my hostname to localhost.
Now, my mongoimport command looks like:
mongoimport --verbose --ssl --sslCAFile "C:\server\cert\rootCA.pem" --sslPEMKeyFile "C:\server\cert\server.pem" --sslFIPSMode --host localhost --port 27017 --username databaseAdmin --password password123 --authenticationDatabase admin --db test_coll --collection blocks --file "C:\data\blocks.json"
And now it works.
When I do a mongodump on the existing collection the dump stops on 23% of the dump. The file is about 1.2 GB.
I tried also mongoexport. But this also stops at 23%.
The dump/export always stops at 21257107 records.
It this normal?
(OS is Ubuntu 14.04 LTS)
mongodump -h localhost:27020 -d SensorData -c Values -o Dump
connected to: localhost:27020
2016-02-15T09:41:25.099+0100 DATABASE: SensorData to Dump/SensorData
2016-02-15T09:41:25.101+0100 SensorData.Values to Dump/SensorData/Values.bson
2016-02-15T09:41:28.178+0100 Collection File Writing Progress: 434100/91183458 0% (documents)
2016-02-15T09:41:31.051+0100 Collection File Writing Progress: 940300/91183458 1% (documents)
-------------------
2016-02-15T09:47:34.002+0100 Collection File Writing Progress: 21155100/91183458 23% (documents)
2016-02-15T09:47:37.339+0100 21257107 documents
2016-02-15T09:47:37.339+0100 Metadata for SensorData.Values to Dump/SensorData/Values.metadata.json
mongoexport -host localhost:27020 --db SensorData --collection Values -vv --out filename.json
2016-02-15T10:51:33.507+0100 creating new connection to:localhost:27020
2016-02-15T10:51:33.507+0100 [ConnectBG] BackgroundJob starting: ConnectBG
2016-02-15T10:51:33.508+0100 connected to server localhost:27020 (127.0.0.1)
2016-02-15T10:51:33.508+0100 connected connection!
connected to: localhost:27020
exported 21257107 records