title: SqlServer on Linux
body: <p>I get a problem today with my sql-server on linux, my dotnet app stop work cause cant connect to sql-server on localhost, but work OK on my production database on azure.</p>
  
  <p>Using <code>sqlcmd -S localhost,1433 -U SA -p</code> or to connect with user on a database I get</p>
  
  <pre><code>Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2746.
  Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Client unable to establish connection.
  </code></pre>
  
  <p>if I use sqlcmd to connect on my production database on azure work OK
  if I use sqlectron to connection on my localhost database work OK</p>
  
  <p>after I get error to connect</p>
  
  <pre><code>$ ss -atunp | grep 1433
  tcp    LISTEN     0      128       *:1433                  *:*                  
  tcp    TIME-WAIT  0      0      127.0.1.1:1433               127.0.0.1:42839              
  tcp    LISTEN     0      128      :::1433                 :::*  
  </code></pre>
  
  <p>after I connect with sqlectron</p>
  
  <pre><code>$ sudo ss -atunp | grep 1433
  tcp    LISTEN     0      128       *:1433                  *:*                   users:(("sqlservr",pid=4312,fd=134))
  tcp    ESTAB      0      0      127.0.0.1:51466              127.0.0.1:1433                users:(("sqlectron",pid=4689,fd=94))
  tcp    ESTAB      0      0      127.0.0.1:51468              127.0.0.1:1433                users:(("sqlectron",pid=4689,fd=96))
  tcp    ESTAB      0      0      127.0.0.1:1433               127.0.0.1:51464               users:(("sqlservr",pid=4312,fd=142))
  tcp    ESTAB      0      0      127.0.0.1:1433               127.0.0.1:51468               users:(("sqlservr",pid=4312,fd=148))
  tcp    ESTAB      0      0      127.0.0.1:51470              127.0.0.1:1433                users:(("sqlectron",pid=4689,fd=97))
  tcp    ESTAB      0      0      127.0.0.1:51472              127.0.0.1:1433                users:(("sqlectron",pid=4689,fd=98))
  tcp    ESTAB      0      0      127.0.0.1:1433               127.0.0.1:51462               users:(("sqlservr",pid=4312,fd=85))
  tcp    ESTAB      0      0      127.0.0.1:51462              127.0.0.1:1433                users:(("sqlectron",pid=4689,fd=87))
  tcp    ESTAB      0      0      127.0.0.1:1433               127.0.0.1:51466               users:(("sqlservr",pid=4312,fd=147))
  tcp    TIME-WAIT  0      0      127.0.0.1:1433               127.0.0.1:53693              
  tcp    ESTAB      0      0      127.0.0.1:1433               127.0.0.1:51470               users:(("sqlservr",pid=4312,fd=149))
  tcp    ES -atunp | grep 1433
  tcp    LISTEN     0      128       *:1433                  *:*                   users:(("sqlservr",pid=4312,fd=134))
  tcp    ESTAB      0      0      127.0.0.1:51466              127.0.0.1:1433                users:(("sqlectron",pid=4689,fd=94))
  tcp    ESTAB      0      0      127.0.0.1:51468              127.0.0.1:1433                users:(("sqlectron",pid=4689,fd=96))
  tcp    ESTAB      0      0      127.0.0.1:1433               127.0.0.1:51464               users:(("sqlservr",pid=4312,fd=142))
  tcp    ESTAB      0      0      127.0.0.1:1433               127.0.0.1:51468               users:(("sqlservr",pid=4312,fd=148))
  tcp    ESTAB      0      0      127.0.0.1:51470              127.0.0.1:1433                users:(("sqlectron",pid=4689,fd=97))
  tcp    ESTAB      0      0      127.0.0.1:51472              127.0.0.1:1433                users:(("sqlectron",pid=4689,fd=98))
  tcp    ESTAB      0      0      127.0.0.1:1433               127.0.0.1:51462               users:(("sqlservr",pid=4312,fd=85))
  tcp    ESTAB      0      0      127.0.0.1:51462              127.0.0.1:1433                users:(("sqlectron",pid=4689,fd=87))
  tcp    ESTAB      0      0      127.0.0.1:1433               127.0.0.1:51466               users:(("sqlservr",pid=4312,fd=147))
  tcp    TIME-WAIT  0      0      127.0.0.1:1433               127.0.0.1:53693              
  tcp    ESTAB      0      0      127.0.0.1:1433               127.0.0.1:51470               users:(("sqlservr",pid=4312,fd=149))
  tcp    ESTAB      0      0      127.0.0.1:1433               127.0.0.1:51472               users:(("sqlservr",pid=4312,fd=150))
  tcp    ESTAB      0      0      127.0.0.1:51464              127.0.0.1:1433                users:(("sqlectron",pid=4689,fd=91))
  tcp    LISTEN     0      128      :::1433                 :::*                   users:(("sqlservr",pid=4312,fd=128))
  TAB      0      0      127.0.0.1:1433               127.0.0.1:51472               users:(("sqlservr",pid=4312,fd=150))
  tcp    ESTAB      0      0      127.0.0.1:51464              127.0.0.1:1433                users:(("sqlectron",pid=4689,fd=91))
  tcp    LISTEN     0      128      :::1433                 :::*                   users:(("sqlservr",pid=4312,fd=128))
  </code></pre>
  
  <p>I try complete uninstall and install, but not success.</p>
  
  <p>Server are running, </p>
  
  <pre><code>$ service mssql-server status
  ● mssql-server.service - Microsoft SQL Server Database Engine
     Loaded: loaded (/lib/systemd/system/mssql-server.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2018-04-09 18:34:06 -03; 37min ago
       Docs: https://docs.microsoft.com/en-us/sql/linux
   Main PID: 683 (sqlservr)
      Tasks: 168
     Memory: 1.5G
        CPU: 56.406s
     CGroup: /system.slice/mssql-server.service
             ├─683 /opt/mssql/bin/sqlservr
             └─843 /opt/mssql/bin/sqlservr
  
  Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
  </code></pre>
  
  <p>I can connect with SqlElectron, but with sqlcmd or dotnet program no.</p>
  
  <p>My problem is not with SqlServer, is with libssl on linux, if i try connect with SqlElectron with SSL connection fail.</p>