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

Problem connecting with SQL Server #8232

Closed
3 tasks done
SWoto opened this issue Sep 16, 2019 · 4 comments
Closed
3 tasks done

Problem connecting with SQL Server #8232

SWoto opened this issue Sep 16, 2019 · 4 comments

Comments

@SWoto
Copy link

SWoto commented Sep 16, 2019

Cannot connect to SQL Server through Apache Superset on Ubuntu 18 in a Dedicated Server.

My SQLAlchemy URI is mssql+pymssql://user:password@serverip:port/db.

I've followed this tutorial: http://jaygrossman.com/post/2019/03/02/Apache-Superset-Test-Drive.aspx that says to install the pymssql inside the container with docker exec -it container_ID bash and pip install pymssql.

when i try for the second time:
root@container_id:/home/superset# pip install pymssql Requirement already satisfied: pymssql in /root/.local/lib/python3.6/site-packages (2.1.4)

also inside the container, when i try to use python -i than import pymssql and make a connection like the pymssql examples i get no error message, everything works smoothly...

Than I tried to change de requirements.txt in the server adding pymssql and relaunch the docker-compose...

Actual results

ERROR: {"error": "Connection failed!\n\nThe error message returned was:\nNo module named 'pymssql'", "stacktrace": "Traceback (most recent call last):\n File \"/home/superset/superset/views/core.py\", line 1745, in testconn\n engine = database.get_sqla_engine(user_name=username)\n File \"/home/superset/superset/utils/core.py\", line 132, in __call__\n value = self.func(*args, **kwargs)\n File \"/home/superset/superset/models/core.py\", line 900, in get_sqla_engine\n return create_engine(url, **params)\n File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/__init__.py\", line 435, in create_engine\n return strategy.create(*args, **kwargs)\n File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py\", line 87, in create\n dbapi = dialect_cls.dbapi(**dbapi_args)\n File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/dialects/mssql/pymssql.py\", line 61, in dbapi\n module = __import__(\"pymssql\")\nModuleNotFoundError: No module named 'pymssql'\n"}

Environment

(please complete the following information):

  • superset version: 0.999.0dev
  • python version: Python 3.6.9
  • node.js version: v10.16.3
  • npm version: 6.9.0

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

looks like the same problem here, but no solution. #7970

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label #question to this issue, with a confidence of 0.73. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@dpgaspar
Copy link
Member

Hi @SWoto,

Were you able to solve this? check if your WSGI is running on a python virtenv

@SWoto
Copy link
Author

SWoto commented Sep 26, 2019

I kind of solve it using the hard way... had to do a stop in all containers, deleted the images, changed the file of requirements.txt to install pymssql and rebuild them using the docker-compose. I still didn't figure out what happened neither how to solve it. But it's ok now.

@dpgaspar
Copy link
Member

Glad it's all good

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

2 participants