Why I am not able to host java application on Azure Linux VM Virtual IP?

2017-08-04T16:32:29

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.

These are

  1. virtual IP Address-1.1.1.1
  2. 0.0.0.0 (private IP)

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

java -jar leshan-server-demo-1.0.0-SNAPSHOT-jar-with-dependencies.jar -wh 0.0.0.0.

but it is throwing the exception

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].

NOTE- It is running perfectly on local (private IP) and port is also open and not in use.

Is there other way to connect socket connection on azure or aws vms public IPs?

Copyright License:
Author:「ram」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/45501926/why-i-am-not-able-to-host-java-application-on-azure-linux-vm-virtual-ip

About “Why I am not able to host java application on Azure Linux VM Virtual IP?” questions

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. These are virtual IP Address-1.1.1.1 0.0.0.0 (priv...
I am running following two VM's on Azure within same cloud service. HOST NAME First PUBLIC VIRTUAL IP (VIP) ADDRESS 104.xx.xx.26 HOST NAME Second PUBLIC VIRTUAL IP (VIP) ADDRESS 104.xx.xx.26 On F...
I have hosted a python flask web application on azure virtual machine (Windows OS). When I start the python application, it gets hosted on 127.0.01:5000 i.e. localhost. I can access this in browser...
I have a Vm from Azure and in that vm I have another vm running in Hyper-v. That vm in Hyper-v is running a Ubuntu Linux (64 bit) guest operating system, with a virtual appliance. When I run it and...
I have an azure Linux VM say VM1 having only one network interface with private IP 10.3.0.5, I have another azure Linux VM say VM2 with two network interfaces, the private IP on primary network int...
I have an Azure virtual machine, on which a process listens on a certain port. A Node.js application on my local computer is able to connect to this process using the VM's public IP address. But th...
I am trying to write the Private IP address of virtual machine created by Ansible into host inventory. However, I wasn't able to find Azure private IP property for Ansible. Below is the code that ...
I have created a CentOS 7.1 VM using Resource Manager deployment model. I am not able to access the application using a browser on a machine connected to internet. However I am able to access the
I have LINUX VM on Windows Azure (Ubuntu), i have a web application running there and client Socket application. I want to restrict the ACCESS to limited IP's who can access the application via ht...
I am completely at a loss on how to get round this issue and would welcome some ideas. I've provisioned an Azure Windows Virtual Desktop (WVD) in my organisation's Azure VNet. I'd now like to RDP o...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.