0

I have a virtual host, created with VMWare. I don't own the main machine, I just can make remote connection to virtual server.

I've installed SQL EXPRESS and want to remote connect it from my computer using SQL Studio. But the port Studio uses(1433 default) is closed. I've been searching for documents for last 2 days, tried everything I could find, but nothing worked.

I just couldn't make it to open a port. I guess it's because it's a virtual server. Just want to assure you that I've made all the configurations for SQL EXPRESS, it's only about port. When I write telnet localhost 1433 to MS-DOS, it says it was unsuccessful.

Is there a way to open this port ON the virtual machine?

4
  • You check Windows Firewall?
    – gravyface
    May 13, 2011 at 11:58
  • Welcome to Server Fault! VMware is a company which make several virtualization products. If you really want a VMware related tag on this question, please edit back in a product specific one as I have removed the vmware tag. May 13, 2011 at 12:10
  • @gravyface, It was closed from the beginning. Still.
    – kubilay
    May 13, 2011 at 12:13
  • Can you please specify the versions of Windows, SQL Server and VMware Server?
    – Massimo
    May 13, 2011 at 12:38

4 Answers 4

3

You said you tried NETSTAT and there is no port 1433 listening on your server; this means SQL Server Express is NOT accepting TCP/IP connections, so it obviously will not let you connect from other machines; you could then reply "but I can connect locally!"... yes, but that doesn't necessarily mean TCP/IP connections are allowed: when connecting locally, SQL Server can optimize the connections by skipping the TCP/IP part and let the server and the client application (Management Studio) talk directly using shared memory.

So, you should check that 1) TCP/IP connections are allowed to the server, and 2) that TCP/IP connections from remote machines are allowed. You can verify both settings from the SQL Server Configuration Manager.

1
  • 1
    Hi, I found the solution but I can't reply my own question before 8 hours because I'm a new user :) You gave the answer, I'm marking yours then. As you said, I had to re-configure SQL Server Configuration Manager. When I gave the value of "1433" for IPAll section, it opened the port itself. The port was not closed but was not being listened. Thank you all.
    – kubilay
    May 13, 2011 at 12:57
1

It shouldn't have anything to do with being a virtual server unless it's blocked at the host machine.

You don't directly say where you're trying to connect from (your machine, the VM to itself, internet -> virtual machine...?) but since you said telnet localhost, I'm assuming VM to itself. Use the Netstat command (like netstat -ab might work) to see if the application is listening on that port.

If you find it listening on the port, you'd next need to figure out if there's a software firewall or something configured in the NIC to disallow the connection. If nothing is blocking from there, you may have to triple check that SQL is configured security-wise to allow the connection.

1
  • Okay, I wanna make it more clear. I manage the server with mstsc, I install SQL Management Studio on my own computer. I also installed on server but it doesn't need to make remote connection, it connects by using "Windows Authentication". I typed netstat and there was no such port as 1433 working. And the Windows Firewall was closed from the beginning.
    – kubilay
    May 13, 2011 at 12:04
1

A virtual machine is never blocked by whatever firewalling software may be running on the host system; it has its own (virtual) network connection, and that's it: you don't need to open anything on the host system for the VM to talk to the network.

What you should check is how the VM is connected to the network. It may be connected to a dedicated subnet, and you could have a firewall between you and it; or, sine it's running on VMware Server, it may also running on a NATted virtual network, with the host acting as a NAT router between the VM's network and the external one.

First of all, check the IP address of your VM and the IP address of the computer you're trying to connect from; are they on the same network? If not, chances are there is something between you and it which is blocking your connection. Can you connect to the VM using other protocols, like Remote Desktop or Windows file sharing? Can you ping the VM?

By the way, you said you already checked everything... but have you also verified the configuration of Windows Firewall in the VM? Also, have you enabled remote connections to SQL Server Express, which by default doesn't allow them?

1
  • Hi, the IP adresses are like: xx.xx.xx.89, .90 till .94. I can ping(but only the IP, it doesn ping when I add a port like :3434), I connect vie Remote Connection Tool(mstsc). The Windows Firewall was closed from the beginning, it still is, and I opened SQLEXPRESS for remote connections, as it was told on msdn or other tutorials. So it seems 1433 is closed from somewhere above my server's position.
    – kubilay
    May 13, 2011 at 12:08
0

If your port is not in a listening state in a nestat -aon output, then there is no process asking for it to accept connections. Look deeper at the MySQL application. The application itself creates the definition to have a TCP or UDP port in the listening state. You can see this in the far right of the output of the netstat command, where you will find the PID(Process ID) associated with creating that connection. A process will always be associated with the TCP/UDP listener.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .