You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/01/14 12:51:36 UTC

[GitHub] [incubator-superset] pachico opened a new issue #8963: ClickHouse driver: user/pass are ignored therefore connection fails

pachico opened a new issue #8963: ClickHouse driver: user/pass are ignored therefore connection fails
URL: https://github.com/apache/incubator-superset/issues/8963
 
 
   I am trying to connect to a ClickHouse cluster using your docker-compose based installation but once I add it as a new database it fails complaining
   ```
   ERROR:root:Code: 194, e.displayText() = DB::Exception: Password required for user default (version 19.17.5.18 (official build))
   ```
   although it is set in URI.
   
   **How to reproduce it:**
   I have appended `sqlalchemy-clickhouse` to the end of `requirements-eextra.txt` and run `docker-compose up`.
   In `add database` form I set `clickhouse://user:pass@clickhousehost:8123/mydb` (obviously redacted here) and when pressing `test connection` I get a message in a popup:
   
   ```
   ERROR: {"error": "Connection failed!\n\nThe error message returned was:\nCode: 194, e.displayText() = DB::Exception: Password required for user default (version 19.17.5.18 (official build))\n", "stacktrace": "Traceback (most recent call last):\n  File \"/app/superset/views/core.py\", line 1511, in testconn\n    with closing(engine.connect()) as conn:\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py\", line 2196, in connect\n    return self._connection_cls(self, **kwargs)\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py\", line 103, in __init__\n    else engine.raw_connection()\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py\", line 2296, in raw_connection\n    self.pool.unique_connection, _connection\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py\", line 2265, in _wrap_pool_connect\n    return fn()\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py\", line 303, in unique_connection\n    return _ConnectionFairy._checkout(self)\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py\", line 760, in _checkout\n    fairy = _ConnectionRecord.checkout(pool)\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py\", line 492, in checkout\n    rec = pool._do_get()\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/impl.py\", line 238, in _do_get\n    return self._create_connection()\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py\", line 308, in _create_connection\n    return _ConnectionRecord(self)\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py\", line 437, in __init__\n    self.__connect(first_connect_check=True)\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py\", line 639, in __connect\n    connection = pool._invoke_creator(self)\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py\", line 114, in connect\n    return dialect.connect(*cargs, **cparams)\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py\", line 453, in connect\n    return self.dbapi.connect(*cargs, **cparams)\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy_clickhouse/connector.py\", line 111, in connect\n    return Connection(*args, **kwargs)\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy_clickhouse/connector.py\", line 118, in __init__\n    super(Connection, self).__init__(db_name, db_url, username, password, readonly)\n  File \"/usr/local/lib/python3.6/site-packages/infi/clickhouse_orm/database.py\", line 112, in __init__\n    self.db_exists = self._is_existing_database()\n  File \"/usr/local/lib/python3.6/site-packages/infi/clickhouse_orm/database.py\", line 393, in _is_existing_database\n    r = self._send(\"SELECT count() FROM system.databases WHERE name = '%s'\" % self.db_name)\n  File \"/usr/local/lib/python3.6/site-packages/sqlalchemy_clickhouse/connector.py\", line 102, in _send\n    raise Exception(r.text)\nException: Code: 194, e.displayText() = DB::Exception: Password required for user default (version 19.17.5.18 (official build))\n\n"}
   ```
   
   and logs output
   ```
   superset_1         | INFO:root:Database.get_sqla_engine(). Masked URL: clickhouse:///user:pass@clickhousehost:8123/mydb
   superset_1         | DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): clickhousehost:8123
   superset_1         | DEBUG:urllib3.connectionpool:http://clickhousehost:8123 "POST / HTTP/1.1" 401 None
   superset_1         | ERROR:root:Code: 194, e.displayText() = DB::Exception: Password required for user default (version 19.17.5.18 (official build))
   superset_1         | Traceback (most recent call last):
   superset_1         |   File "/app/superset/views/core.py", line 1511, in testconn
   superset_1         |     with closing(engine.connect()) as conn:
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2196, in connect
   superset_1         |     return self._connection_cls(self, **kwargs)
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 103, in __init__
   superset_1         |     else engine.raw_connection()
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2296, in raw_connection
   superset_1         |     self.pool.unique_connection, _connection
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2265, in _wrap_pool_connect
   superset_1         |     return fn()
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 303, in unique_connection
   superset_1         |     return _ConnectionFairy._checkout(self)
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 760, in _checkout
   superset_1         |     fairy = _ConnectionRecord.checkout(pool)
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 492, in checkout
   superset_1         |     rec = pool._do_get()
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/impl.py", line 238, in _do_get
   superset_1         |     return self._create_connection()
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 308, in _create_connection
   superset_1         |     return _ConnectionRecord(self)
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 437, in __init__
   superset_1         |     self.__connect(first_connect_check=True)
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 639, in __connect
   superset_1         |     connection = pool._invoke_creator(self)
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
   superset_1         |     return dialect.connect(*cargs, **cparams)
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 453, in connect
   superset_1         |     return self.dbapi.connect(*cargs, **cparams)
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy_clickhouse/connector.py", line 111, in connect
   superset_1         |     return Connection(*args, **kwargs)
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy_clickhouse/connector.py", line 118, in __init__
   superset_1         |     super(Connection, self).__init__(db_name, db_url, username, password, readonly)
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/infi/clickhouse_orm/database.py", line 112, in __init__
   superset_1         |     self.db_exists = self._is_existing_database()
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/infi/clickhouse_orm/database.py", line 393, in _is_existing_database
   superset_1         |     r = self._send("SELECT count() FROM system.databases WHERE name = '%s'" % self.db_name)
   superset_1         |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy_clickhouse/connector.py", line 102, in _send
   superset_1         |     raise Exception(r.text)
   superset_1         | Exception: Code: 194, e.displayText() = DB::Exception: Password required for user default (version 19.17.5.18 (official build))
   superset_1         | 
   superset_1         | 172.20.0.1 - - [14/Jan/2020 12:48:15] "POST /superset/testconn HTTP/1.1" 500 -
   superset_1         | INFO:werkzeug:172.20.0.1 - - [14/Jan/2020 12:48:15] "POST /superset/testconn HTTP/1.1" 500 -
   ```
   
   It seems user and pass are ignored despite they are provided in URI.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] willbarrett commented on issue #8963: ClickHouse driver: user/pass are ignored therefore connection fails

Posted by GitBox <gi...@apache.org>.
willbarrett commented on issue #8963: ClickHouse driver: user/pass are ignored therefore connection fails
URL: https://github.com/apache/incubator-superset/issues/8963#issuecomment-596776354
 
 
   Another probably-related issue: https://github.com/apache/incubator-superset/issues/8953 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] issue-label-bot[bot] commented on issue #8963: ClickHouse driver: user/pass are ignored therefore connection fails

Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #8963: ClickHouse driver: user/pass are ignored therefore connection fails
URL: https://github.com/apache/incubator-superset/issues/8963#issuecomment-574159354
 
 
   Issue-Label Bot is automatically applying the label `#bug` to this issue, with a confidence of 0.79. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback! 
   
    Links: [app homepage](https://github.com/marketplace/issue-label-bot), [dashboard](https://mlbot.net/data/apache/incubator-superset) and [code](https://github.com/hamelsmu/MLapp) for this bot.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] stale[bot] commented on issue #8963: ClickHouse driver: user/pass are ignored therefore connection fails

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on issue #8963:
URL: https://github.com/apache/incubator-superset/issues/8963#issuecomment-626084899


   This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue `.pinned` to prevent stale bot from closing the issue.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] stale[bot] closed issue #8963: ClickHouse driver: user/pass are ignored therefore connection fails

Posted by GitBox <gi...@apache.org>.
stale[bot] closed issue #8963:
URL: https://github.com/apache/incubator-superset/issues/8963


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org