[freetds] tds7_get_instance_port timed out
robert at robert-gonzalez.com
Sat Mar 20 10:24:06 EDT 2010
The connection string might be confusing PHP. Where I work we connect to SQL
server from Ubuntu and have configured all of our connection names in our
FreeTDS conf file.
We have tried to connect to the servers like you have and have failed pretty
much the same way you did here.
My build instructions for our setup are here -->
I suspect you have done all that already. The only thing I could offer is to
make sure to enter the appropriate pieces of information in your FreeTDS
On Fri, Mar 19, 2010 at 9:33 PM, Gregor at HostGIS <gregor at hostgis.com>wrote:
> 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 =
> '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(220.127.116.11,
> 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+
> "No one cares if you can back up — only if you can recover."
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
More information about the FreeTDS