Question

Using Worklight Studio 6.1.0.1 and Eclipse Kepler on Windows 7, I am seeing an inconsistency with the Worklight Development Server host IP. I have changed the host name from localhost to the IP address I want to use. That IP address is being used when I open the Worklight Console. However, my application includes a Mobile Web application and when I click its "Get App URL" link in the Worklight Console it displays a link using a different IP address. I have several network adapters that have IP addresses - my wired LAN adapter (which has the IP I want to use), my VPN adapter and an adapter configured by VirtualBox. If I am connected to the VPN, the app URL uses the IP address for the VPN adapter. If I am not connected to the VPN, the app URL uses the IP address for the VirtualBox adapter (which is a 169.254.x.x address). In neither case does it use the IP address for my wired adapter. I have modified the Windows Network Connections Advanced Settings so that the wired adapter takes precedence over the VPN adapter which takes precedence over the VirtualBox adapter.

Is there anything I can do to fix this? This makes the app URL difficult to use since my device cannot access either of those IP addresses. The best I can do is scan the QR code then manually change the IP address on my device.

Was it helpful?

Solution

To control the URL used for the Mobile Web envrionment's "Get App URL" in preview:

  1. Open your-project\server\conf\worklight.properties
  2. Uncomment the publicWorkLightHostname property
  3. Provide a host or IP address
  4. Re-deploy the application
  5. Load Worklight Console and click on "Get App URL"

The URL should now point to the address from step 3 above.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top