Skip to Content.
Sympa Menu

freetds - [freetds] tds7_get_instance_port timed out

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Gregor at HostGIS <gregor AT hostgis.com>
  • To: FreeTDS AT lists.ibiblio.org
  • Subject: [freetds] tds7_get_instance_port timed out
  • Date: Fri, 19 Mar 2010 21:33:02 -0700

Hey guys. I'm extensively familiar with MySQL and PostgreSQL, but connecting to MSSQL 2008 from Linux/PHP has me stumped.

My specific PHP code is this simple line:

$db = mssql_connect('ec2-174-129-135-45.compute-1.amazonaws.com\SQLSERVER,1433', 'user', 'pass');

The result is "Unable to connect to server"


Client platform:
PHP 5.2.13
Mostly PHP CLI for testing, will be Apache 2.0
Slamd64 Linux
FreeTDS, not sure how to find the exact version but was the latest stable about 3 weeks ago

MS SQL Server:
SQL Server 2008
on a Amazon EC2


The FreeTDS log shows this:

21:13:03.249137 23593 (net.c:836):tds7_get_instance_port(174.129.135.45, SQLSERVER, 1433)
21:13:04.248694 23593 (net.c:905):tds7_get_instance_port: timed out on try 0 of 16
(... and so on...)
21:13:19.731750 23593 (net.c:974):instance port is 0
21:13:19.731764 23593 (login.c:418):invalid port number


I have verified via 'telnet' that I can connect to port 1433; not a firewall thing at that level.

I have seen vague clues about the instance name being important, and some mentions that 1433 isn't the TCP port for the instance. Can someone explain that to me? It may be relevant that the MS SQL is on a Amazon EC2 instance, which has firewalls beyond the Windows Firewall. I cannot for instance telnet to port 25 and properly get a Connection Refused.

--
HostGIS, Open Source solutions for the global GIS community
Greg Allensworth - SysAdmin, Programmer, GIS Person, Security
Network+ Server+ A+ Security+ Linux+
PHP PostgreSQL MySQL DHTML/JavaScript/AJAX

"No one cares if you can back up — only if you can recover."




Archive powered by MHonArc 2.6.24.

Top of Page