MongoDB 5.0.3 - mongoexport: BSON field 'saslContinue.mechanism' is an unknown field - mongodb

I am using MongoDB Latest Version 5.0.3. When I am trying to export the data using mongoexport command the following error message has come.
server returned error on SASL authentication step: BSON field 'saslContinue.mechanism' is an unknown field.
Please help me if I am missing anything in the configuration.
Thanks...

I get this error on version 5.0.6.
You can trying to use the lowwer version like 4.4.6 if you don't have to use the latest version.

Related

Getting MongoError DottedFieldName

I am trying to perform a bulkWrite operation using mongoose but I get the following error:
{"ok":0,"code":57,"codeName":"DottedFieldName","name":"MongoError"}
However, I have no field names that have a dot in them. My mongoose version is 5.13.5 which internally uses mongodb version of 3.6.10.
This issue occurred as there was field name with the following name: '$schema'. Apparently, this caused the issue.

mongodb 3.2.11, version too new for this mongod

I have an issue with mongodb server. I am using version 3.2.11.
Unable to find metadata for table:index-3--5957523542490303670 Index: {name: id, ns: dashboard.dataaas} - version too new for this mongod
I have already update mongo version to 3.4, but it still could not start the server on, the error still remains.
I would like to delete that index / table, but I could not log in to mongo-shell. And could not found file index-3--5957523542490303670 in any of folder
Please help
Basically as error states, mongo client/shell as well as mongod server should have the same version. You can check the mongo shell version using mongo --version. If it does not match, downgrade/upgrade client as required.
Also check if server is running.

Is "spring-data-mongodb: 1.10.7" is compatible with "mongo v3.6.0"

I am getting this exception, when I am using mongoTemplate.aggregate API.
Command execution failed: Error [The 'cursor' option is required, except for aggregate with the explain argument].
I am using sprig-data api version - 1.10.7. Is this version compatible with mongo v3.6.0 OR do i need to upgrade the spring-data API as well?
Try using spring-data-mongodb:1.10.12

ADD content-Type in postgres request?

I want use elasticsearch via zombodb extension so I use this query in postgres : CREATE INDEX idx_zdb_graduated ON masterview USING zombodb(zdb('masterview', masterview.ctid), zdb(masterview)) WITH (url='http://localhost:9200/'
);
but it has a this error
> ERROR: rc=406; {"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}
I googled and i found that i should use -H'Content-Type:application/json' if I use curl to connect to elasticsearch . but i don't know how can I add content-type to my query ?
You probably use unsupported version's elastic search or postgresql or os.
I had same error with elastisearh version than 6 and fix it to version.
In my git repository, with debian 9, postgres:9.5, and elasticsearch:5.6.4 should work.

Mongodb "auth fails" with mongodb php driver and new php library

Using the new mongodb driver: https://github.com/mongodb/mongo-php-driver and the new php library for it: https://github.com/mongodb/mongo-php-library I am getting "auth fails" trying to perform a simple find() query.
In the following code, the connection string follows the pattern mongodb://user:password#mongoinstance:port/database. The connection string works with find() using the old legacy mongo driver, but not the new mongodb driver. The new mongodb is correctly installed in php and displays in phpinfo, the only breaking change we needed to make was to use "new MongoDB\Client" instead of new MongoClient for the legacy mongo driver.
However, when I try to run the following find(), I get auth fails exception in vendor/mongodb/mongodb/src/Operation/Find.php line 179
Using legacy mongo driver there are no problems. Any ideas on the auth fails? What is the mongodb driver failing on exactly? Correct credentials for database and collection are being passed in the mongodb://string. Works in legacy fails with new driver and library.
Environment:
Windows 10
Wamp
PHP 5.5.12
Mongodb driver 1.1.4
Latest version of new php library (Installed with composer: composer require "mongodb/mongodb=^1.0.0")
Mongo instance version 2.4.6
I just had the same error and found out that I had to place the database-name in the connection string.
The documentation here says:
If /database is not specified and the connection string includes credentials, the driver will authenticate to the admin database.
And the user I'm using has no rights to the admin-database, so this is why I received the authentication error.
I advise you to check this too. You can't provide the database-name the same way as with the MongoClient via the connection options.
So here's the solution. After 3 days of banging my head against a wall it turns out the new mongodb driver parses the mongodb uri differently than the legacy mongo driver. My password had a % sign in it. As soon as I changed the % sign to something else everything worked as expected.