docker-superset icon indicating copy to clipboard operation
docker-superset copied to clipboard

unable to connect to elasticsearch | SQLAlchemy

Open bonysimon007 opened this issue 5 years ago • 3 comments

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 avatar Jan 29 '20 13:01 bonysimon007

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

ebuildy avatar Feb 20 '20 11:02 ebuildy

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?

iercan avatar Jun 26 '20 08:06 iercan

this has been added to the edge images.

amancevice avatar Jun 27 '20 12:06 amancevice