dbcli / dbcli/mssql-cli

Unable to connect to server

Open
#248 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
191
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am unable to connect to a SQL Server 2016 running on the standard port 1433 on a Windows Server, but succeed in connecting with sqlcmd.

- **Expected**: Successful connection to SQL Server as with sqlcmd on port 1433.
- **Actual**: Error, Connection reset by peer.

I have installed mssql-cli v0.15 using Direct Download and the RHEL default pkg manager yum.

- Distribution: Red Hat Enterprise Linux Server release 7.6 (Maipo)
- System: Linux 3.10.0-957.5.1.el7.x86_64 #1 SMP Wed Dec 19 10:46:58 EST 2018 x86_64 x86_64 GNU/Linux
- MSSQL-CLI version: 0.15 (mssql-cli-0.15.0-1.el7.x86_64)
- Python version: Python 2.7.5 (python-2.7.5-76.el7.x86_64)
- sqlcmd version: Version 17.3.0000.1 Linux (mssql-tools-17.3.0.1-1.x86_64)
- ODBC version: 2.3.7 (unixODBC-2.3.7-1.rh.x86_64, unixODBC-devel-2.3.7-1.rh.x86_64)
- SQL Server: Microsoft SQL Server 2016 (SP1-CU3) - 13.0.4435.0 (X64)

The command being run is

`mssql-cli -S server.hostname.tld -U actual_username -P $MSSQL_CLI`
I have also run the same but with manual password prompting (i.e. without the -P flag).

The error presented is
`Error message: One or more errors occurred. (Unable to write data to the transport connection: Connection reset by peer.)`

With sqlcmd, I am running the following string and I get a command prompt on the server
`$ sqlcmd -S server.hostname.tld -U actual_username -P $MSSQL_CLI`
This allows me to execute SQL statements.
>1>

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.