简体   繁体   中英

Can't telnet to Azure VM from local network

I have a azure cloud cluster with an sql availability (2 sql machines and one quorum) group and a listener on port 51101. The cluster also contains several other VMs, all on the same virtual network.

I'm having problem connecting to the listener, and the problem is not SQL specific, since I can't even telnet to the port. The weird thing is that this happens only when connecting from a machine on the same virtual network. If I try to connect from my local non-azure machine, everything works fine. It also works if it's an azure machine on a different network.

Here's what I have: - Firewall rules for the port. I even tried disabling the firewall completely on all the machines

  • The port has a load balanced endpoint on the Azure portal. Note that the same problem applies to all the ports that were open by default by Azure (RDP and WinRmHttps) - I can telnet to those ports from my machine, but not from a machine on the Virtual Network.

  • I can reach the SQL intance directly (If I use the instance name instead of the listener)

Here's my virtual network configuration:

网络配置

Any suggestions for the cause of the problem, or some ways to debug this are welcome.

Just in case anyone runs into this, I found the answer here :

Keep in mind that your application, in case is deployed in Azure, cannot reside in the same Cloud Service with SQL Server VMs otherwise routing in Azure will fail: it's highly recommended to use a dedicated Cloud Service containing only the SQL Server VM;

Once I put the connecting machine on a separate service, everything worked.

Try these standard techniques for debugging listeners: http://www.eraofdata.com/verifying-and-troubleshooting-sql-server-listener-connectivity/ Azure won't treat them any differently if you are using a Virtual Network and a single Cloud Service.

Have you don't a netstat on the machine the listener is on to see if anything is listening on that TCP port?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM