2
votes
  1. The documentation says – prior to Azure SDK 1.5, web role deployments were allocated at the same IP address – 127.0.0.1, different port numbers used to differentiate the web roles. Do this behavior is back now? I noticed my web roles deployed under the same IP address with difference in port numbers.

  2. I’m consistently getting port remapping if the app run for the first time after machine reboot. On further investigation I noticed the below things.

    • If machine rebooted without exiting Compute Emulator then the ports in which the web roles previously deployed are NOT getting released. Find the output of netstat below after machine reboot. This make the compute emulator to find the port (8070) mentioned in csdef as busy and consider for remapping on next deployment. Say if we exit compute emulator or do csrun.exe removeall/clean/shutdown from commandline before restart then it all the ports used to deploy the services are released.

netstat -aon | findstr 8070

Proto Local Address Foreign Address State PID

TCP 0.0.0.0:8070 0.0.0.0:0 LISTENING 4

TCP [::]:8070 [::]:0 LISTENING 4

TASKLIST /FI "PID eq 4"

Image Name PID Session Name Session# Mem Usage

System 4 Services 0 288 K

  • The service is not available at the expected address (ip:port) due to this remapping of port for the above scenario in Azure SDK 2.5. Remapping happening in Azure SDK 2.1 too but only private port got affected and the app worked as the public port remain unchanged. But with Azure SDK 2.5 – the public port got remapped which results in app failure. Find the below screen capture of csrun.exe /run [pack details] in both Azure SDK 2.1 and 2.5

csrun comparison between 2.1 & 2.5 Azure SDKs

Do you recommend a solution to fix this issue?

1

1 Answers

1
votes

I found the solution for the above issue.

  1. MSDN documentation says – prior to Azure SDK 1.5, web role deployments were allocated at the same IP address – 127.0.0.1, different port numbers used to differentiate the web roles.

This behavior (same ip address but different port for different web roles) will exist if the emulator mode is in iisexpress.

  1. I realized in Azure SDK 2.5 - iisexpress mode is by default (where as in Azure SDK 2.1 - fullemulator mode is default). All started working back when fullemulator argument set /usefullemulator
csrun.exe /devfabric:shutdown /usefullemulator

csrun.exe /devfabric:clean /usefullemulator

csrun.exe /devfabric:start /usefullemulator

csrun.exe /run [pack]  /usefullemulator