yougov / mongo-connector

MongoDB data stream pipeline tools by YouGov (adopted from MongoDB)
Apache License 2.0
1.88k stars 479 forks source link

No handlers could be found for logger "mongo_connector.util" #288

Closed SreejithChelanchery closed 9 years ago

SreejithChelanchery commented 9 years ago

I am not able to use the mongo connector to connect my mongo instance running on the same instance as that of the Solr instance.Here is the stack trace.

[ec2-user@ip-172-31-27-213 site-packages]$ mongo-connector -m localhost:27017 -t http://localhost:8983/solr -d solr_doc_manager No handlers could be found for logger "mongo_connector.util" Traceback (most recent call last): File "/usr/local/bin/mongo-connector", line 11, in sys.exit(main()) File "/usr/local/lib/python2.7/site-packages/mongo_connector/util.py", line 85, in wrapped func(_args, _kwargs) File "/usr/local/lib/python2.7/site-packages/mongo_connector/connector.py", line 1027, in main conf.parse_args() File "/usr/local/lib/python2.7/site-packages/mongo_connector/config.py", line 118, in parse_args option, dict((k, values.get(k)) for k in option.cli_names)) File "/usr/local/lib/python2.7/site-packages/mongo_connector/connector.py", line 821, in apply_doc_managers dm_instances.append(module.DocManager(target_url, _kwargs)) File "/usr/local/lib/python2.7/site-packages/mongo_connector/doc_managers/solr_doc_manager.py", line 76, in init self._build_fields() File "/usr/local/lib/python2.7/site-packages/mongo_connector/util.py", line 38, in wrapped reraise(new_type, exc_value, exc_tb) File "/usr/local/lib/python2.7/site-packages/mongo_connector/util.py", line 32, in wrapped return f(_args, **kwargs) File "/usr/local/lib/python2.7/site-packages/mongo_connector/doc_managers/solr_doc_manager.py", line 92, in _build_fields declared_fields = self.solr._send_request('get', ADMIN_URL) File "/usr/local/lib/python2.7/site-packages/pysolr.py", line 331, in _send_request raise SolrError(error_message) mongo_connector.errors.OperationFailed: [Reason: None]

Error 404 Not Found

HTTP ERROR 404

Problem accessing /solr/admin/luke. Reason:

    Not Found


Powered by Jetty://
llvtt commented 9 years ago

Please have a look at the "Usage with Solr" page on the wiki: https://github.com/10gen-labs/mongo-connector/wiki/Usage%20with%20Solr#make-sure-the-lukerequesthandler-is-enabled

SreejithChelanchery commented 9 years ago

I had added those entries on schema.xml and solrconfig.xml and had solr restarted after the changes.

SreejithChelanchery commented 9 years ago

Okay,resolved that error,possibly since I did not have core defined on solr.

and now I have a weird permission error :-(

[ec2-user@ip-172-31-27-213 site-packages]$ mongo-connector -m localhost:27017 -t http://localhost:8983/solr/edesia -d solr_doc_manager No handlers could be found for logger "mongo_connector.util" Traceback (most recent call last): File "/usr/local/bin/mongo-connector", line 11, in sys.exit(main()) File "/usr/local/lib/python2.7/site-packages/mongo_connector/util.py", line 85, in wrapped func(_args, *_kwargs) File "/usr/local/lib/python2.7/site-packages/mongo_connector/connector.py", line 1029, in main setup_logging(conf) File "/usr/local/lib/python2.7/site-packages/mongo_connector/connector.py", line 996, in setup_logging backupCount=conf['logging.rotationBackups'] File "/usr/lib64/python2.7/logging/handlers.py", line 171, in init BaseRotatingHandler.init(self, filename, 'a', encoding, delay) File "/usr/lib64/python2.7/logging/handlers.py", line 64, in init logging.FileHandler.init(self, filename, mode, encoding, delay) File "/usr/lib64/python2.7/logging/init.py", line 911, in init StreamHandler.init(self, self._open()) File "/usr/lib64/python2.7/logging/init.py", line 936, in _open stream = open(self.baseFilename, self.mode) IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/mongo-connector.log'

llvtt commented 9 years ago

The error message says it all:

Permission denied: '/usr/local/lib/python2.7/site-packages/mongo-connector.log'

You should change the location of the log file or run mongo-connector with sudo.

johnda98 commented 4 years ago

The error message says it all:

Permission denied: '/usr/local/lib/python2.7/site-packages/mongo-connector.log'

You should change the location of the log file or run mongo-connector with sudo.

Sir.. i get the same permissions on logfile.. BUT I can not run w/ sudo .. any ideas ? "leveridge@leveridge-PowerEdge-R710:~$ sudo mongo-connector -m localhost:27017 -t http://localhost:7474/db/data -d neo4j_doc_manager sudo: mongo-connector: command not found "

here is the last happy lines of the mongo-connector fire up leveridge@leveridge-PowerEdge-R710:~$ mongo-connector -m localhost:27017 -t http://localhost:7474/db/data -d neo4j_doc_manager Traceback (most recent call last): File "/home/leveridge/.local/bin/mongo-connector", line 11, in sys.exit(main()) File "/home/leveridge/.local/lib/python3.6/site-packages/mongo_connector/util.py", line 107, in wrapped func(*args, **kwargs) File "/home/leveridge/.local/lib/python3.6/site-packages/mongo_connector/connector.py", line 1410, in main setup_logging(conf) File "/home/leveridge/.local/lib/python3.6/site-packages/mongo_connector/connector.py", line 1346, in setup_logging backupCount=conf["logging.rotationBackups"], File "/usr/lib/python3.6/logging/handlers.py", line 202, in init BaseRotatingHandler.init(self, filename, 'a', encoding, delay) File "/usr/lib/python3.6/logging/handlers.py", line 57, in init logging.FileHandler.init(self, filename, mode, encoding, delay) File "/usr/lib/python3.6/logging/init.py", line 1032, in init StreamHandler.init(self, self._open()) File "/usr/lib/python3.6/logging/init.py", line 1061, in _open return open(self.baseFilename, self.mode, encoding=self.encoding) PermissionError: [Errno 13] Permission denied: '/home/leveridge/mongo-connector.log'