title: Starting oracle with docker: "TNS:listener: all appropriate instances are blocking new connections" error
body: <p>I'm using docker to start an oracle container.  The container starts fine and the DB comes up, when when I try to run a maven command to load in some sql files however, i get the following error:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.4.1:dropAll (default-cli) on project edacm-se: Error setting up or running Liquibase: liquibase.exception.DatabaseException: java.sql.SQLException: Listener refused the connection with the following error:
  [ERROR] ORA-12528, TNS:listener: all appropriate instances are blocking new connections
  </code></pre>
  
  <p>If I have 2 maven commands however, one to drop all first and then one to update, the first one will fail with the above message, and the second one will pass, so it's obviously a question of waiting until the oracle instance becomes available.</p>
  
  <p>The question then is, how would you find out if the TNS listener within the oracle docker container instance is available for remote requests or not? Could this be done in a shell script?</p>
  
  <p>My oracle instance is running as:</p>
  
  <pre><code>f543a59dad62        oracle              "/bin/sh -c '/usr/sbi"   22 minutes ago      Up 22 minutes       8080/tcp, 0.0.0.0:49160-&gt;22/tcp, 0.0.0.0:49161-&gt;1521/tcp   determined_khorana
  </code></pre>
  
  <p>And is based off this image:</p>
  
  <p><a href="https://hub.docker.com/r/wnameless/oracle-xe-11g/" rel="nofollow">https://hub.docker.com/r/wnameless/oracle-xe-11g/</a></p>