dbcli / dbcli/mssql-cli

Problems connecting to SQL Server 2014

オープン
#526 コメント 2 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
1.4k
フォーク
191
PR マージ指標
30日以内にマージされた PR はありません

説明

**System Information**
Connecting OS: Ubuntu 20.04
Server OS: Microsoft Windows Server 2012
SQL Server: Microsoft SQL Server 2014

**Problem**
Can't connect to my SQL Server after installing `mssql-cli` through `pip`. There doesn't seem to be an apt repository for Ubuntu 20.04 so couldn't install via that method like adviced in documentation.
Running `mssql-cli -S 192.168.100.201 -U -P ` gives an error of: `Error message: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
`.
Running it with `--enable-sqltoolsservice-logging` gives an output of:
```
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.SqlTools.Utility.Logger.Close() in D:\a\1\s\src\Microsoft.SqlTools.Hosting\Utility\Logger.cs:line 79
at Microsoft.SqlTools.ServiceLayer.Program.Main(String[] args) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Program.cs:line 27
Traceback (most recent call last):
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/jsonrpc/contracts/request.py", line 51, in get_response
response = self.json_rpc_client.get_response(self.request_id, self.owner_uri)
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/jsonrpc/jsonrpcclient.py", line 84, in get_response
raise self.exception_queue.get()
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/jsonrpc/jsonrpcclient.py", line 124, in _listen_for_response
response = self.reader.read_response()
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/jsonrpc/jsonrpcclient.py", line 272, in read_response
while (not self.needs_more_data or self.read_next_chunk()):
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/jsonrpc/jsonrpcclient.py", line 326, in read_next_chunk
raise EOFError(u'End of stream reached, no output.')
EOFError: End of stream reached, no output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/main.py", line 122, in
main()
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/main.py", line 115, in main
run_cli_with(mssqlcli_options)
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/main.py", line 52, in run_cli_with
mssqlcli.connect_to_database()
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/mssql_cli.py", line 278, in connect_to_database
owner_uri, error_messages = self.mssqlcliclient_main.connect_to_database()
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/mssqlcliclient.py", line 91, in connect_to_database
owner_uri, error_messages = self._execute_connection_request_with(connection_params)
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/mssqlcliclient.py", line 180, in _execute_connection_request_with
response = connection_request.get_response()
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/jsonrpc/contracts/request.py", line 67, in get_response
return self.response_error(error)
File "/home/judasmoses/.local/lib/python3.8/site-packages/mssqlcli/jsonrpc/contracts/connectionservice.py", line 22, in response_error
u'ownerUri': cls.owner_uri,
AttributeError: type object 'ConnectionRequest' has no attribute 'owner_uri'
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Ubuntu 20.04 で接続コマンドを再現し、その後 mssql_cli.py、mssqlcliclient.py、connectionservice.py、および traceback に示されている Logger.Close の失敗を調査します。プレログイン handshake と JSON-RPC のエラーパスを追跡します。完了条件は、SQL Server 接続が報告された handshake エラーまたは EOF エラーで失敗しなくなり、根本の失敗が適切に表面化されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python, sql
領域
cli, databases
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。