[登录前]初始化= 19286;握手= 16099; SQL 2017 CU14 [英] [Pre-Login] initialization=19286; handshake=16099; SQL 2017 CU14

查看:74
本文介绍了[登录前]初始化= 19286;握手= 16099; SQL 2017 CU14的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我在最新的CU14上获得了一个简单的HA / AG SQL 2017。


我正在尝试将用户从主要用户复制到次要用户,这一切都运行良好端口1433。


我可以启用/禁用防火墙,脚本按预期工作。



问题是当1433 TCP端口更改为另一个端口时,只要在预期目标上启用了防火墙,脚本就会失败。如果我禁用FW,它就可以了。



所以我尝试打开端口5022和49000-51000,同样失败,多次重启,将SQLAgent和..CEIP ..应用于防火墙允许的Communitaction - 都失败了。进程监视器不告诉我什么被阻止并报告预期的端口和应用程序
按预期和成功响应。 


在Powershell中我使用相同的脚本,零修改。


我的脚本在运行时失败 


Invoke-Sqlcmd -Query $ Query -ServerInstance 10.10.15.204


确切的失败讯息是


 

Invoke-Sqlcmd:连接超时已过期。 尝试使用登录前握手确认时超时时间已过。 这可能是因为登录前握手失败或服务器无法及时回复。 
尝试连接到此服务器所花费的时间是 - [Pre-Login] initialization = 19286;握手= 16099; 


在C:\ scripts\powershell.ps1:344 char:17

+ ...              Invoke-Sqlcmd -Query $ Query -ServerInstance 10.10.15.204

+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~

    + CategoryInfo          :InvalidOperation:(:) [Invoke-Sqlcmd],SqlException

    + FullyQualifiedErrorId:SqlExectionError,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand



Invoke-Sqlcmd: 

在C:\ scripts \ #powershell.ps1:344 char:17

+ ...              Invoke-Sqlcmd -Query $ Query -ServerInstance 10.10.15.204

+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~

    + CategoryInfo          :ParserError:(:) [Invoke-Sqlcmd],ParserException

    + FullyQualifiedErrorId:ExecutionFailureException,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand


我该怎么办?

解决方案

这是一个防火墙问题而不是脚本任务。请花些时间了解如何将自定义端口添加到防火墙。


在网络论坛中发布以帮助修改防火墙。



Hey I got a simple HA/AG SQL 2017 on the latest CU14.

I am trying to copy users from the primary to the secondary and it all works well on port 1433.

I can enable/disable the firewall and the script works as expected.

The problem is that when the 1433 TCP Port is changed to another port, the script fails whenever the firewall is enabled on the intended destination. If I disable the FW, it just works.

So i tried open ports 5022, and 49000-51000, same fail, multiple reboots, applying SQLAgent and ..CEIP.. to the firewall allowed communitaction - all fails. Process monitor does not tell me what is blocked and reports the expected ports and applications are responding as intended and succeded. 

In Powershell I used the same script, zero modifications.

My Script fails when it runs 

Invoke-Sqlcmd -Query $Query -ServerInstance 10.10.15.204

The exact failure message is

 

Invoke-Sqlcmd : Connection Timeout Expired.  The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.  This could be because the pre-login handshake failed or the server was unable to respond back in time.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=19286; handshake=16099; 

At C:\scripts\powershell.ps1:344 char:17
+ ...              Invoke-Sqlcmd -Query $Query -ServerInstance 10.10.15.204
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Invoke-Sqlcmd], SqlException
    + FullyQualifiedErrorId : SqlExectionError,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand

Invoke-Sqlcmd : 
At C:\scripts\powershell.ps1:344 char:17
+ ...              Invoke-Sqlcmd -Query $Query -ServerInstance 10.10.15.204
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ParserError: (:) [Invoke-Sqlcmd], ParserException
    + FullyQualifiedErrorId : ExecutionFailureException,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand

What Do I Do?

解决方案

This is a firewall question and not a scripting questing. Please take the time to learn how to add custom ports to your firewall.

Post in the networking forum for help modifying your firewall.


这篇关于[登录前]初始化= 19286;握手= 16099; SQL 2017 CU14的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆