2
  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?

4

1 回答 1

1

我找到了上述问题的解决方案。

  1. MSDN 文档说——在 Azure SDK 1.5 之前,Web 角色部署被分配在相同的 IP 地址——127.0.0.1,不同的端口号用于区分 Web 角色。

如果模拟器模式为 iisexpress,这种行为(相同的 IP 地址但不同的 Web 角色的端口不同)将存在。

  1. 我在 Azure SDK 2.5 中意识到 - 默认情况下是 iisexpress 模式(在 Azure SDK 2.1 中 - 默认情况下是 fullemulator 模式)。当 fullemulator 参数设置时,一切都开始工作了/usefullemulator
csrun.exe /devfabric:shutdown /usefullemulator

csrun.exe /devfabric:clean /usefullemulator

csrun.exe /devfabric:启动 /usefullemulator

csrun.exe /run [包] /usefullemulator
于 2015-07-14T18:28:46.650 回答