question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mongo connector in docker loading manager error

See original GitHub issue

Hi,

I have trouble with mongo-connector in docker. I made Dockerfile where entrypoint is mongo-connector with proper params like mongo-connector -m localhost:27017 -t localhost:9200 -d elastic_doc_manager. When I run dokcer i get error, that cannot load elastic_doc_amanger:

`Fatal Exception Traceback (most recent call last): File “/usr/local/lib/python3.4/dist-packages/mongo_connector/connector.py”, line 803, in import_dm_by_name module = import(full_name, fromlist=(name,)) ImportError: No module named ‘mongo_connector.doc_managers. elastic_doc_manager’

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/usr/local/lib/python3.4/dist-packages/mongo_connector/util.py”, line 85, in wrapped func(_args, *_kwargs) File “/usr/local/lib/python3.4/dist-packages/mongo_connector/connector.py”, line 1037, in main conf.parse_args() File “/usr/local/lib/python3.4/dist-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/python3.4/dist-packages/mongo_connector/connector.py”, line 820, in apply_doc_managers module = import_dm_by_name(dm[‘docManager’]) File “/usr/local/lib/python3.4/dist-packages/mongo_connector/connector.py”, line 810, in import_dm_by_name “Could not import %s.” % full_name) mongo_connector.errors.InvalidConfiguration: Could not import mongo_connector.doc_managers. elastic_doc_manager. Traceback (most recent call last): File “/usr/local/lib/python3.4/dist-packages/mongo_connector/connector.py”, line 803, in import_dm_by_name module = import(full_name, fromlist=(name,)) ImportError: No module named ‘mongo_connector.doc_managers. elastic_doc_manager’

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/usr/local/bin/mongo-connector”, line 9, in <module> load_entry_point(‘mongo-connector==2.2.dev0’, ‘console_scripts’, ‘mongo-connector’)() File “/usr/local/lib/python3.4/dist-packages/mongo_connector/util.py”, line 85, in wrapped func(_args, *_kwargs) File “/usr/local/lib/python3.4/dist-packages/mongo_connector/connector.py”, line 1037, in main conf.parse_args() File “/usr/local/lib/python3.4/dist-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/python3.4/dist-packages/mongo_connector/connector.py”, line 820, in apply_doc_managers module = import_dm_by_name(dm[‘docManager’]) File “/usr/local/lib/python3.4/dist-packages/mongo_connector/connector.py”, line 810, in import_dm_by_name “Could not import %s.” % full_name) mongo_connector.errors.InvalidConfiguration: Could not import mongo_connector.doc_managers. elastic_doc_manager.`

But when I execute this docker with entry point (–entrypoint bash) and run command like earlier everything works fine.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Percheworkcommented, Apr 25, 2016

ok, I think your problem come from your ENTRYPOINT :

try with this : ENTRYPOINT [“mongo-connector”, “-m”, “localhost:27017”, “-t”, “localhost:9200”, “-d”, “elastic2_doc_manager”, “-v”]

0reactions
asiqq23commented, Apr 25, 2016

It wroks excellent, thank you, I thought that i tried this solution but it turns out that I forgot to try 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to connect to mongodb running in a docker container ...
I am running an empty mongodb instance in a docker desktop container using: docker run --name mongodb -d -p 64000:64000 mongo.
Read more >
Unable to connect to mongodb using URL using monstache
After many attempts and changes in my dockerfile and in my docker-compose I get this error, but the container with mongodb is up...
Read more >
Severe Performance Degradation Mongo Connector - Airbyte
It's the same server for both connectors, the v2 connector loaded the same incremental in less than a minute previous to upgrade.
Read more >
mysql - Official Image - Docker Hub
Start a mysql server instance. Starting a MySQL instance is simple: $ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d ...
Read more >
How to Run & Deploy MongoDB Docker Container? - Learn
This article provides you with 2 simple steps to effectively run & deploy your MongoDB Docker Containers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found