?? 上周六,一工廠系統管理員反饋一數據庫連接不上,SSMS連接數據庫報“連接超時時間已到。在嘗試使用預登錄握手確認時超過了此超時時間.......”, 如下截圖所示:
?
?
另外遠程連接也連接不上,系統管理員只能通過vSphere Client連接到這臺服務器,我這邊也無法遠程登錄檢查具體情況,ping 這臺服務器發現網絡正常,沒有丟包或時延嚴重情況,那我就在Linux上使用nmap掃描了一下這臺服務器端口情況,發現1433端口沒有開放,另外發現該服務器居然沒有一個端口對外開放。
?
[oracle@DB-Server ~]$ nmap 192.xxx.xxx.xxx
?
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2016-07-23 09:28 CST
Note: Host seems down. If it is really up, but blocking our ping probes, try -P0
Nmap finished: 1 IP address (0 hosts up) scanned in 2.039 seconds
?
我檢查、對比了另外一臺正常的SQL Server 服務器開放的端口,如下所示:
?
[oracle@DB-Server ~]$ nmap 192.168.xxx.xxx
?
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2016-07-23 09:34 CST
Interesting ports on xxxx.xxx.xxx.com (192.168.xxx.xxx):
Not shown: 1670 filtered ports
PORT????? STATE SERVICE
135/tcp?? open? msrpc
139/tcp?? open? netbios-ssn
445/tcp?? open? microsoft-ds
1433/tcp? open? ms-sql-s
3389/tcp? open? ms-term-serv
10000/tcp open? snet-sensor-mgmt
?
Nmap finished: 1 IP address (1 host up) scanned in 30.326 seconds
?
所以,我可以斷定應該是防火墻屏蔽了所有端口,系統管理先將防火墻關閉后,一切恢復正常,后面他檢查發現是因為組策導致防火墻自動啟用,而這臺數據庫服務器沒有開放相關端口。從而導致了這個問題。另外,如果網絡出現延遲較嚴重或丟包現象,也會導致這個錯誤出現。