Jump to content

Lesson Learned #269: Unable to connect - Is unavailable or does not exist - Connection Time out


Recommended Posts

Guest Jose_Manuel_Jurado
Posted

Today, I worked on a service request that your customer is facing the following error message: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "src/pymssql/_pymssql.pyx", line 653, in pymssql._pymssql.connect pymssql._pymssql.OperationalError: (20009, b'DB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (servername.database.windows.net)\nNet-Lib error during Connection timed out (110)\nDB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (servername.database.windows.net)\nNet-Lib error during Connection timed out (110)\n')

 

 

 

It is a python application using pymssql library running in Ubuntu 18.04. Our customer reported that previous connections were fine and this issue suddenly happened.

 

 

 

After checking the port 1433 and redirection ports in Network Security Groups we didn't see any issue.

 

 

 

To check if the ports are available from this machine we ran the command telnet servername.database.windows.net 1433 and we saw that is not possible to connect.

 

 

 

The IP reported is 10.10.1.25. This IP looks like a private link but checking the private link the IP has dynamically changed to 10.10.1.26. In this situation, we checked the DNS server and Local DNS for Private Link and everything is fine, so the next action was to review if we have any configuration in the hosts file of Linux. We found that they have this configuration in their file.

 

 

 

Changing the value of /etc/host file from 10.10.1.25 to 10.10.1.26 everything was started to work correctly and we suggested to discuss with their IT Security team to check why this situation happened or change the private link to static.

 

 

 

531x391vv2.png.cc158e3666a81da5543bc5d5ae6dfb6e.png

 

 

 

Enjoy!

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...