0

I am working in the Synapse Workspace and trying to connect to AWS RDS from the Synapse Notebook.

Whenever I try to connect, it throws the below timeout error -

The TCP/IP connection to the host my-host, port 1433 has failed. 
Error: "connect timed out. 
Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. 
Make sure that TCP connections to the port are not blocked by a firewall.

To check whether I can ping the host from the Synapse Notebook - I tried the below code -

import subprocess  
temp = subprocess.Popen(
    ['ping', '-c 1', 'my-host'], stdout = subprocess.PIPE) 

output = str(temp.communicate())
print(output)

and this throws

ping statistics ---\n1 packets transmitted, 0 received, 100% packet loss

I get that this is the timeout error and the notebook cannot reach the server. What is surprising is, if I try to connect to the same AWS RDS Server by creating a linked service from the Synapse pipeline, it connects successfully.

On my source AWS RDS, do I need to open the firewall for Synapse notebooks specifically? Is there any endpoint that I should mention in my notebook?

Also, Isn't it handled at the resource group level?

Any help is appreciated.

Thank you,

Sanket Kelkar

Sanket Kelkar
  • 129
  • 2
  • 9

1 Answers1

0

If you have already configured your database to listen on TCP/IP traffic on port 1433 then it could be any of following three reasons:

  • JDBC connection string might be incorrect.
  • Firewall is blocking the incoming connection. Make sure that it is publicly accessible. You can check this when you check the availability.
  • AWS RDS SQL database is not running. Ensure that "available" is shown as the status.
  • make sure you specify the port 1433 while creating SQL server.
  • Check to see if your DB instance can be accessed by the inbound rules of your VPC security group. For more information, see Can't connect to Amazon RDS DB instance.
Pratik Lad
  • 4,343
  • 2
  • 3
  • 11