title: cx_oracle TNS: Connect timeout
body: <p>I am trying to link to a Oracle Database using cx_Oracle in python and keep getting the error:
  <code>DatabaseError: ORA-12170: TNS:Connect timeout occurred</code></p>
  
  <p>Here is the code I am running:</p>
  
  <pre><code>import cx_Oracle
  dsn_tns = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=*ip*)(PORT=*port*))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=*service_name*)))'
  db= cx_Oracle.connect('*username*', '*password*', dsn_tns, encoding="UTF-8")
  </code></pre>