mongodbiotkaadata-collection

kaa data collection doesn't retrieve data mongodb


I installed kaa iot server manually on ubuntu 16.04, and use data collection sample to test how it works. the code run without any errors, but when I run these commands below nothing happens:

mongo kaa
db.logs_$my_app_token$.find()

I even comment out bind_ip of mongodb.conf and restart mongodb, zookeeper and kaa-node services, but nothings changed. I also regenerated SDK and rebuild project but that wouldn't help either.

finally this is the kaa log:

2018-06-05 15:03:53,899 [Thread-3] TRACE 
o.k.k.s.c.s.l.DynamicLoadManager - DynamicLoadManager recalculate() got 0 redirection rules
2018-06-05 15:03:59,472 [EPS-core-dispatcher-6] DEBUG 
o.k.k.s.o.s.a.a.c.OperationsServerActor - Received: org.kaaproject.kaa.server.operations.service.akka.messages.core.stats.StatusRequestMessage@30d61bb1
2018-06-05 15:03:59,472 [EPS-core-dispatcher-6] DEBUG o.k.k.s.o.s.a.a.c.OperationsServerActor - [14fc1a87-8b34-47f6-8f39-d91aff7bfff7] Processing status request
2018-06-05 15:03:59,475 [pool-5-thread-1] INFO  o.k.k.s.o.s.l.DefaultLoadBalancingService - Updated load info: {"endpointCount": 0, "loadAverage": 0.02}
2018-06-05 15:03:59,477 [Curator-PathChildrenCache-0] INFO  o.k.k.s.c.s.l.DynamicLoadManager - Operations server [-1835393002][localhost:9090] updated
2018-06-05 15:03:59,477 [Curator-PathChildrenCache-4] DEBUG o.k.k.s.o.s.c.DefaultClusterService - Update of node [localhost:9090:1528181889050]-[{"endpointCount": 0, "loadAverage": 0.02}] is pushed to resolver org.kaaproject.kaa.server.hash.ConsistentHashResolver@1d0276a4
2018-06-05 15:04:03,899 [Thread-3] INFO  o.k.k.s.c.s.l.LoadDistributionService - Load distribution service recalculation started...
2018-06-05 15:04:03,899 [Thread-3] INFO  o.k.k.s.c.s.l.DynamicLoadManager - DynamicLoadManager recalculate() started... lastBootstrapServersUpdateFailed false
2018-06-05 15:04:03,899 [Thread-3] DEBUG o.k.k.s.c.s.l.d.EndpointCountRebalancer - No rebalancing in standalone mode
2018-06-05 15:04:03,899 [Thread-3] TRACE o.k.k.s.c.s.l.DynamicLoadManager - DynamicLoadManager recalculate() got 0 redirection rules

thank you for your help to fix this problem...


Solution

  • After lots of searching and checking, I finally found it!!! there are multiple reason that this would happen:

    1. if you are using Kaa Sanddbox make sure that you set your network setting into bridge (not NAT).

    2. check your iptables and find out if these ports are open: 9888,9889,9997,9999.

    3. if you are using virtual machine as your server, make sure that hosts firewall system doesn't block the ports.(This is what happened to me...)