MongoDB: mongoexport produces blank json and error message

Jeffrey Teruel

I have a MongoDB dbs named test with a collection named items. It has one item. I'm currently learning how to export a copy of the collections, but I get an error message: Failed: error connecting to db server: no reachable servers and a blank .json document. Below is my command for mongoexport in my terminal (using a Mac):

mongoexport --db test --collection items --authenticationDatabase admin --out test.json

How would I fix this so that I get the data from the collection?

Alex

Try adding the host parameter:

mongoexport --host=127.0.0.1 --db test --collection items --authenticationDatabase admin --out test.json

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Send error message as JSON object

BSON produced by mongoexport from Mongodb is not a valid JSON

Pandas json_normalize produces confusing `KeyError` message?

Symfony on Heroku produces 500 Internal server error but there isn't the message

Embedding Bokeh plot in Django website results in blank page with no error message

Haskell Stack fails to build with a blank error message

error in json format in mongodb

Custom Json Error message

Which MongoDB types are not preserved by mongoimport/mongoexport?

Setup errorformat for multi line error message produces by ghcide

Perl script to convert xls to xlsx is generating blank xlsx and error message

Keep on getting an error on the json format of my mongoexport

Openshift - how to run mongoexport to export mongodb collection

Customize can't be left blank error message in a specific model

Json Parsing with same header name produces Error

PHP produces a blank webpage

Blank Firefox window with error message in eclipse in Selenium webdriver(JAVA)

Getting blank error exception message while adding data to the mysql table

Change ActiveRecord error blank message for all models

Error message does not appear if input value is just blank space

Mongoexport blank fields to csv

Converting mongoexport json to XML

Getting an error message to convert to json

Mongoexport giving authentication failed error

Mongodb 3.2 - mongoexport with query failed

Message "error: error parsing mongodb-deployment.yaml: error converting YAML to JSON: yaml: line 27: did not find expected key"

blank or empty message error message - html no with PHP

Issues with shiny app; Blank output; No error message

Apache Camel fails to create Route and produces bizarre Error message