Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to connect to elasticsearch | SQLAlchemy #158

Open
bonysimon007 opened this issue Jan 29, 2020 · 3 comments
Open

unable to connect to elasticsearch | SQLAlchemy #158

bonysimon007 opened this issue Jan 29, 2020 · 3 comments

Comments

@bonysimon007
Copy link

bonysimon007 commented Jan 29, 2020

I tried to establish a connection to elasticsearch after installing elasticsearch-dbapi package. When I performed a test connection in the database setup page, I received an error from SQLAlchemy.

image

Error Response :

ERROR: {"error": "Connection failed!\n\nThe error message returned was:\nCan't load plugin: sqlalchemy.dialects:elasticsearch.http", "stacktrace": "Traceback (most recent call last):\n File "/usr/local/lib/python3.6/site-packages/superset/views/core.py", line 1702, in testconn\n engine = database.get_sqla_engine(user_name=username)\n File "/usr/local/lib/python3.6/site-packages/superset/utils/core.py", line 131, in call\n value = self.func(*args, **kwargs)\n File "/usr/local/lib/python3.6/site-packages/superset/models/core.py", line 911, in get_sqla_engine\n return create_engine(url, **params)\n File "/home/superset/.local/lib/python3.6/site-packages/sqlalchemy/engine/init.py", line 479, in create_engine\n return strategy.create(*args, **kwargs)\n File "/home/superset/.local/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 61, in create\n entrypoint = u._get_entrypoint()\n File "/home/superset/.local/lib/python3.6/site-packages/sqlalchemy/engine/url.py", line 172, in _get_entrypoint\n cls = registry.load(name)\n File "/home/superset/.local/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 240, in load\n "Can't load plugin: %s:%s" % (self.group, name)\nsqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:elasticsearch.http\n"}

FIX:

This issue is caused because of an older version of SQLAlchemy package used in the docker image. Once I the package is updated, it works fine.

@bonysimon007 bonysimon007 changed the title unable to connect to elasticsearch db connection unable to connect to elasticsearch | SQLAlchemy Jan 29, 2020
@ebuildy
Copy link
Contributor

ebuildy commented Feb 20, 2020

I can do a PR to include the plugin if you want !

@iercan
Copy link
Contributor

iercan commented Jun 26, 2020

I had similar issue and I fixed it by upgrading elasticsearch-dbapi. Can you add elasticsearch-dbapi==0.1.2 into latest image? Or is there a easy way make upgrade persistent so that I don't need to upgrade again if I recreate container?

@amancevice
Copy link
Owner

this has been added to the edge images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants