kaa

AWS Kaa Sandox Connection timed out from Application


I am always getting the connetion timed out error, when running application for AWS Sandbox for Kaa 0.10.0:

Failed to receive operation servers list {} org.apache.http.conn.HttpHostConnectException: Connect to ec2-52-201-214-219.compute-1.amazonaws.com:9889 [ec2-52-201-214-219.compute-1.amazonaws.com/52.201.214.219] failed: Connection timed out: connect

I noticed that the conenction request is always made to ec2-52-201-214-219.compute-1.amazonaws.com:9889 irrespective of my AWS Sandbox Public DNS.

I watched the Introducing Kaa IoT platform Sandbox 0.7.0 avilable on the Kaa Project Getting Started Page. The video talked about the Oracle VB, but it did ask to update the IP address of the application so that Kaa server can talk globally. I never got that option in the AWS Sanbox.

I tried a few things to see if this fixes the issue:

  1. Open the AWS Sanbox wide open on internet i.e. allowing 0.0.0.0/0 on incoming all incoming. I made sure AWS security group as well as Sanbox firewall both allowed this.
  2. Launch new AWS Sanbox
  3. Build the application from source

None of these steps worked for me. My AMI details are:

Kaa-sandbox-0.10.0 (ami-xxxxxx5d)
Description: Kaa Sandbox version 0.10.0
Status: available
Platform: Other Linux
Image Size: 30GB
Visibility: Public
Owner: xxxxxxxx2249

Here is my kaa-desktop-client.log file. I was using MobaXterm on Win10 for runing the

I haven't tried the Oracle VB method yet, but will post the updates soon.

Could you please help me identify the problem? Or this is a bug? I think the HTTP connection should be to <my AWS Kaa Public DNS>:9899 instead of ec2-52-201-214-219.compute-1.amazonaws.com:9889 all the time.


Solution

  • Ok, I found a solution to this issue after back-tracing in to the server. I followed these steps:

    1. Change gui_change_host_enabled=false to true under /usr/lib/kaa-sanbox/conf/sandbox-server.properties
    2. Restart the Sandbox process sudo service kaa-sandbox restart (Kaa AWS Sandbox is an Ubuntu machine)
    3. Visit http://<AWS Kaa Public Domain>:9080/sandbox
    4. Management Tab should show up now. (You should also expect a pop up to change the host... there is a parameter in the same conf that's enabled by default.)
    5. Update the Host with <Your AWS Kaa Instance Public DNS>. It will take a moment to clean up the cache
    6. Change gui_change_host_enabled=true back to false under /usr/lib/kaa-sanbox/conf/sandbox-server.properties same as original conf
    7. Download the binary or source for your sandbox applications again, and you should not get the Connection Timeout problem

    Ultimately this updates the transport_public_interface=<Your AWS Kaa Instance Public DNS> parameter in /usr/lib/kaa-node/conf/kaa-node.properties and clears the cache of Sandbox downloaded apps.

    This was not documented on the website, so I would suggest to update the documentation for AWS Kaa Sanbox. I understand that the Management