I'm getting a 'could not connect to the host on port 1433' error with the below code. I've checked my URL string several times with what MS says it should be, and my Windows Firewall is off. I've ensured that MSSQLServer is using TCP 1433 and running, BUT, and I'm not sure why this is, when I do netstat, I do not see anything listening on 1433. The SQL Server process in the task manager does not match with anything from the netstat output, and the .exe (I used -anob switches with netstat) does not match up. The closest thing I see is SQL Browser listening on port 1434. Am I missing some important detail?
Full error:
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:170)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1049)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at database.Main.main(Main.java:23)