
我目前正在嘗試讓 SQL Server 和 Visual SVN 在執行 Windows 2012 的 VPS 上自動啟動。內部的地址。這是可透過 VPN 存取的位址。我們連接到 VPN 然後就可以了內部的我們可以用來連接到伺服器的位址。現在效果很好,但我遇到的問題是需要此位址上的套接字的服務無法啟動,因為在客戶端建立 VPN 連線之前它似乎不可用。
我將服務的啟動修改為“自動延遲“ 代替 ”自動的「但這並沒有幫助。我希望該地址能夠在那個階段提供。
啟動後我無法啟動服務(SQL Server 和 VisualSVN)。我使用應用程式來實現此目的,而不是“服務”視窗。因此,對於 VisualSVN,我右鍵單擊 Visual SVN 應用程式中的伺服器,然後按一下「啟動」;對於 SQL Server,我使用 SQL Server 設定管理員來啟動資料庫引擎。它不斷失敗直到我透過 VPN 連接。然後我就可以毫無問題地立即啟動提到的服務。
事件檢視器顯示以下內容:
SQL Server 日誌:
Server failed to listen on xxx.xxx.xxx.xxx <ipv4> xxxxx. Error: 0x2741. To proceed, notify your system administrator.
TDSSNIClient initialization failed with error 0x2741, status code 0xa. Reason: Unable to initialize the TCP/IP listener. The requested address is not valid in its context.
TDSSNIClient initialization failed with error 0x2741, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. The requested address is not valid in its context.
Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
可視化SVN日誌:
make_sock: could not bind to address xxx.xxx.xxx.xxx:xxxx
(OS 10049) The requested address is not valid in its context.
no listening sockets available, shutting down
Unable to open logs
我希望這些服務在啟動時自動啟動。現在,這些服務在重新啟動後將不可用,因為一旦它們啟動失敗,當位址可用時它們將不會啟動。
答案1
最終,我將 SVN 配置為可在另一個「硬連線」IP 位址上使用,以避免出現該問題。
SQL 的問題現在也透過將其綁定到完全相同的「硬連線」IP 位址來解決。如果伺服器重新啟動,它將綁定到 IP 位址並因此可以啟動。然後,在建立 VPN 連線後,它就可以在「虛擬」IP 位址上使用。