title: ORA-12541 TNS :no listener on 1 specific remote database, but not on others
body: <p>Some context:  I'm setting up an environment to run some Ruby code our Lead wrote to connect to some remote Databases. I'm using Win10 and have WSL installed.  I have installed SQL*Plus, docker, and Ruby, and am sure I have installed all the dependent gems (actually at this point I know for a fact its not a ruby problem).  I'm using Docker to use a pre-built image of an Oracle Database, and I have populated it with data.</p>
  <p><em>Obfuscated company DB information:</em></p>
  <p>'Broken' DB (TNS no listener)</p>
  <ul>
  <li>Username: W-WORK-DEV</li>
  <li>Password: password</li>
  <li>Host: host1</li>
  <li>Port: 999</li>
  <li>SID: W-WORK-DB.tech.company</li>
  </ul>
  <p>'Working' DB (can connect just fine)</p>
  <ul>
  <li>Username: C-OLD-DEV</li>
  <li>Password: password</li>
  <li>Host: host2</li>
  <li>Port: 999</li>
  <li>SID: C-OLD-DB.tech.company</li>
  </ul>
  <blockquote>
  <p>Please note the names I have provided here are purely for obfuscation, they do not represent anything about age or even config.  They are essentially the same, just different databases on different hosts.  Also note this is a corporate company and would have a lot of base infrastructure for their internal network.</p>
  </blockquote>
  <p>The issue I am having is that with the specific database I am working on, I cannot connect to it.  I connect to the company intranet via a VPN (I work offsite) and have issues connecting to <code>WORK-DB.tech.company</code>, though I can connect to <code>C-OLD-DB.tech.company</code>.  Methods I have tried to connect with:</p>
  <ul>
  <li>Oracle SQL Developer</li>
  </ul>
  <p>I have inputted all the correct jdbc strings and username / password.  <strong>Have even asked other people to attempt to connect (at least 3 others).</strong>  They can all access <code>C-OLD-DB</code> as well as <code>W-WORK-DB</code>.  When using this method, I get <code>The network adapter could not establish the connection</code>.</p>
  <blockquote>
  <p>Side note:  I'm fairly sure I have connected to the DB just fine in the past, though I can't be certain because I'm fairly new to this team and have only accessed it once, if that.</p>
  </blockquote>
  <ul>
  <li>SQL*Plus via WSL</li>
  </ul>
  <p>I installed SQL*Plus because I think Ruby was accessing it in some capacity when running the script.  I got to the point where the script was able to connect to my local docker Database, but when it tried to connect to the remote database, it would return <code>TNS: no listener</code>.   I attempted this using sqlplus as well and got the same error.</p>
  <blockquote>
  <p>Example:</p>
  <ul>
  <li>sqlplus C-OLD-DEV/password@host2:999/C-OLD-DB.tech.company
  <ul>
  <li>This command works and connected to the DB jsut fine.</li>
  </ul>
  </li>
  <li>sqlplus W-WORK-DEV/password@host1:999/W-WORK-DB.tech.company
  <ul>
  <li>This command gave me TNS: no listener.</li>
  </ul>
  </li>
  </ul>
  </blockquote>
  <p>During my research I had found mentions about tnsnames.ora, sqlnet.ora, and listener.ora.  I have found relevant files around the company intranet and attempted to use them in my own personal environment to no avail (one of the sqlnet.ora files actually stopped me from being able to connect to any)  I found mention about a <code>config/database.yml</code> file related to ruby, but our code already has the database information set up and I seem to be getting to the same solution as the script when trying to manually connect via sqlplus.</p>
  <p>Here are some relevant environment variables I have set up when doing these installs.  I'm thinking that at some point when trying to set up my environment, I messed up some config that changed the way sqldeveloper or sql plus would connect to that database.</p>
  <blockquote>
  <p>$ echo $ORACLE_HOME: /usr/lib/oracle/12.2/client64/</p>
  <p>$ echo $TNS_ADMIN: /usr/lib/oracle/12.2/client64/network/admin</p>
  <p>$ echo $LD_LIBRARY_PATH: /usr/lib/oracle/12.2/client64/lib</p>
  </blockquote>
  <p>I hope I have provided all the information I have come across and have explained clearly what my issue is, if you have any questions feel free to comment about it so I can clear it up.  Thank you for any and all your help.</p>