title: Why I am not able to host java application on Azure Linux VM Virtual IP?
body: <p>I want to run my java application (i.e. Leshan Server) run Azure Linux VM. My VM is configured as dynamic IP. It is showing two IP addresses.</p>
  
  <p>These are </p>
  
  <ol>
  <li>virtual IP Address-1.1.1.1 </li>
  <li>0.0.0.0  (private IP)</li>
  </ol>
  
  <p>these IP addresses are for example only. 
  My java application is using jetty server inside the code and I am passing the public from command window like this </p>
  
  <p><code>java -jar leshan-server-demo-1.0.0-SNAPSHOT-jar-with-dependencies.jar -wh 0.0.0.0</code>.</p>
  
  <p>but it is throwing the exception </p>
  
  <p><code>java.net.BindException: Cannot assign requested address
          at sun.nio.ch.Net.bind0(Native Method) ~[?:1.8.0_141]
          at sun.nio.ch.Net.bind(Net.java:433) ~[?:1.8.0_141]
          at sun.nio.ch.Net.bind(Net.java:425) ~[?:1.8.0_141].</code></p>
  
  <p>NOTE- It is running perfectly on local (private IP) and port is also open and not in use.</p>
  
  <p>Is there other way to connect socket connection on azure or aws vms public IPs?</p>