Giter VIP home page Giter VIP logo

Comments (4)

stbrody avatar stbrody commented on July 28, 2024

You need to have a user in the admin database and then provide
mongo-connector the necessary information to log in as that user by using
the -a argument to specify the username and the -p or -f options to specify
the password. See
https://github.com/10gen-labs/mongo-connector/blob/master/mongo-connector/README.md
for
more information about those flags.

On Mon, Dec 3, 2012 at 8:29 AM, Bo Bendtsen [email protected]:

I would like to be able to specify a key-file. I can't connect to a
replicaSet that uses keyFilehttp://docs.mongodb.org/manual/administration/replica-sets/#replica-set-security
.

Are key-files supported in the PyMongo driver?

Connecting to a replicaSet which uses keyFile throws the following error:
Exception:

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "mongo_connector.py", line 204, in run
repl_set = prim_admin.command("replSetGetStatus")['set']
File "/usr/lib64/python2.6/site-packages/pymongo/database.py", line 395, in command
msg, allowable_errors)
File "/usr/lib64/python2.6/site-packages/pymongo/helpers.py", line 144, in _check_command_response
raise OperationFailure(msg % details["errmsg"])
OperationFailure: command SON([('replSetGetStatus', 1)]) failed: need to login


Reply to this email directly or view it on GitHubhttps://github.com//issues/8.

*{ *name : *"Spencer T Brody", *

  • title : "Software Engineer",
    location : "New York, NY" *}

from mongo-connector.

bobend avatar bobend commented on July 28, 2024

I did specify both a username and password for an admin account and got the error from the previous post.

Start command:

python mongo_connector.py -m mongodb://olmongo01dbpack.dr.dk:27017,olmongo02dbpack.dr.dk:27018/?replicaSet=mongoprd -a [admin-username] -p [admin-password] -t http://solrpsdb01:8080/solr -d doc_managers/solr_doc_manager.py -n MediaUniverse.programcard,MediaUniverse.bundle

Server version:

db version v2.0.2, pdfile version 4.5
git hash: 514b122d308928517f5841888ceaa4246a7f18e3
sys info: Linux bs-linux64.10gen.cc 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41
uptime: 3497255 seconds

from mongo-connector.

bobend avatar bobend commented on July 28, 2024

Steps to reproduce the error:

  • Run a mongod with --replSet, --auth and --keyFile
  • Add an admin user.
  • try start mongo-connector with -a and -p

from mongo-connector.

bobend avatar bobend commented on July 28, 2024

This issue is invalid. Look at issue #9 for propper bug rapport and fix.

from mongo-connector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.