Android notification app terminate with error unfortunately appplication has been stopped.

283 views
Skip to first unread message

Manoj Verma

unread,
Jul 2, 2016, 4:15:58 AM7/2/16
to Kaa project
Hi all, 

Kaa IOT Framework Application Platform 0.9.0 
Kaa Sandbox Frame 1.3.2

Attached Kaa Logs.
 
Kaa notification log cat:-
07-02 13:25:23.696 I/ActivityManager(871): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.kaaproject.kaa.demo.notification/.NotificationDemoActivity (has extras)} from uid 10022 on display 0
07-02 13:25:23.729 I/ActivityManager(871): Start proc 14524:org.kaaproject.kaa.demo.notification/u0a150 for activity org.kaaproject.kaa.demo.notification/.NotificationDemoActivity
07-02 13:25:23.826 W/ActivityThread(14524): Application org.kaaproject.kaa.demo.notification can be debugged on port 8100...
07-02 13:25:23.849 W/System  (14524): ClassLoader referenced unknown path: /data/app/org.kaaproject.kaa.demo.notification-1/lib/arm
07-02 13:25:23.979 E/AndroidRuntime(14524): Process: org.kaaproject.kaa.demo.notification, PID: 14524
07-02 13:25:23.979 E/AndroidRuntime(14524): java.lang.RuntimeException: Unable to create application org.kaaproject.kaa.demo.notification.KaaNotificationApp: java.lang.RuntimeException: Unable to obtain list of bootstrap servers.
07-02 13:25:23.979 E/AndroidRuntime(14524):  at org.kaaproject.kaa.client.AbstractKaaClient.<init>(AbstractKaaClient.java:190)
07-02 13:25:23.979 E/AndroidRuntime(14524):  at org.kaaproject.kaa.client.BaseKaaClient.<init>(BaseKaaClient.java)
07-02 13:25:23.979 E/AndroidRuntime(14524):  at org.kaaproject.kaa.client.Kaa.newClient(Kaa.java:47)
07-02 13:25:23.979 E/AndroidRuntime(14524):  at org.kaaproject.kaa.client.Kaa.newClient(Kaa.java:42)
07-02 13:25:23.979 E/AndroidRuntime(14524):  at org.kaaproject.kaa.demo.notification.KaaNotificationApp.onCreate(KaaNotificationApp.java:75)
07-02 13:25:23.984 W/ActivityManager(871):   Force finishing activity org.kaaproject.kaa.demo.notification/.NotificationDemoActivity
07-02 13:25:24.508 W/ActivityManager(871): Activity pause timeout for ActivityRecord{9d2868c u0 org.kaaproject.kaa.demo.notification/.NotificationDemoActivity t2356 f}
07-02 13:25:28.469 I/ActivityManager(871): Process org.kaaproject.kaa.demo.notification (pid 14524) has died

From cat logs its confirmed that error is unable to find bootstrap server.

From telnet i confirmed that bootstrap ports are active and acepting connections
 enigma  enigma-H55M-D2H  ~  $  telnet 192.168.0.102 9888  
Trying 192.168.0.102... 
Connected to 192.168.0.102. 
Escape character is '^]'. 


�Connection closed by foreign host. 
enigma  enigma-H55M-D2H  ~  1  $  telnet 192.168.0.102 9889 
Trying 192.168.0.102... 
Connected to 192.168.0.102. 
Escape character is '^]'. 



sd 
HTTP/1.1 400 Bad Request 
Content-Type: text/plain; charset=UTF-8 
Content-Length: 49 
Connection: close 

java.lang.IllegalArgumentException: text is emptyConnection closed by foreign host. 
enigma  enigma-H55M-D2H  ~  1  $   
                                                   

Manoj Kumar
NEC technologies
Message has been deleted
Message has been deleted

Peter Krutsiuk

unread,
Jul 4, 2016, 11:56:56 AM7/4/16
to Kaa project
Hi,

Most likely you got this error because you changed sandbox network configuration and don't regenerate new SDK. Note that operations service embeds list of ip addresses/hosts of bootstrap servers in SDK.
Refer to this and this thread for more details.

Best regards,
Peter.

Manoj Verma

unread,
Jul 4, 2016, 12:55:27 PM7/4/16
to Kaa project
No i didn't that's fresh kaa ova installation.
I did the same with regenrated SDK but still the same error. :(

Peter Krutsiuk

unread,
Jul 5, 2016, 3:42:04 AM7/5/16
to Kaa project
Hi,

1) What kind of network did you choose in VirtualBox network configuration section for Sandbox VM - Bridge mode or NA?
2) If VM configured to NAT check out content of /etc/hosts file, localhost must be set to 127.0.0.1.

Also some useful information you can find in threads that I mentioned before.

Best regards,
Peter.

Manoj Verma

unread,
Jul 5, 2016, 11:45:49 AM7/5/16
to Kaa project
Hi Peter

Thanks for your continous support.


1) What kind of network did you choose in VirtualBox network configuration section for Sandbox VM - Bridge mode or NA?
bridge

2) # Interface that will be reported by all transports
transport_public_interface=192.168.0.103
_______________

I regenrated SDK and build with max trace i am getting gollowing trace


enigma enigma-H55M-D2H ~ Downloads kaa-first-app kaa-first-app c++ $ ./demo_client  
[client_1][2016-Jul-05 21:03:31.116430][0x00007fc305c06740][debug][ClientStatus.cpp:553]:       Read topic list hash: 0
[client_1][2016-Jul-05 21:03:31.125257][0x00007fc305c06740][info][ClientStatus.cpp:400]:        SDK properties were updated
[client_1][2016-Jul-05 21:03:31.125342][0x00007fc305c06740][info][KaaClient.cpp:63]:    Creating Kaa C++ SDK instance: version 0.9.0, commit ha
sh  
[client_1][2016-Jul-05 21:03:32.934412][0x00007fc305c06740][debug][ClientStatus.cpp:568]:       Persisting topic states
[client_1][2016-Jul-05 21:03:32.934646][0x00007fc305c06740][info][MemoryLogStorage.cpp:32]:     Going to use  unlimited storage. Bucket: max_si
ze 16384 bytes, max_record_count 256
[client_1][2016-Jul-05 21:03:32.934861][0x00007fc305c06740][info][KaaClient.cpp:263]:   Going to set default bootstrap channel: 0x1a0b0a0
[client_1][2016-Jul-05 21:03:32.934945][0x00007fc305c06740][warning][KaaChannelManager.cpp:192]:        Failed to find bootstrap server for cha
nnel "default_bootstrap_channel" (protocol: id=0xfb9a3cf0, version=1)
[client_1][2016-Jul-05 21:03:32.935018][0x00007fc305c06740][info][KaaChannelManager.cpp:250]:   Channel (id='default_bootstrap_channel') will b
e used for BOOTSTRAP transport type
[client_1][2016-Jul-05 21:03:32.935129][0x00007fc305c06740][info][KaaClient.cpp:270]:   Going to set default operations Kaa TCP channel: 0x1a1a
390
[client_1][2016-Jul-05 21:03:32.935206][0x00007fc305c06740][info][KaaChannelManager.cpp:195]:   Failed to find operations server for channel "d
efault_operation_kaa_tcp_channel" (protocol: id=0x56c8ff92, version=1)
[client_1][2016-Jul-05 21:03:32.935280][0x00007fc305c06740][info][KaaChannelManager.cpp:250]:   Channel (id='default_operation_kaa_tcp_channel'
) will be used for PROFILE transport type
[client_1][2016-Jul-05 21:03:32.935351][0x00007fc305c06740][info][KaaChannelManager.cpp:250]:   Channel (id='default_operation_kaa_tcp_channel'
) will be used for CONFIGURATION transport type
[client_1][2016-Jul-05 21:03:32.935422][0x00007fc305c06740][info][KaaChannelManager.cpp:250]:   Channel (id='default_operation_kaa_tcp_channel'
) will be used for NOTIFICATION transport type
[client_1][2016-Jul-05 21:03:32.935494][0x00007fc305c06740][info][KaaChannelManager.cpp:250]:   Channel (id='default_operation_kaa_tcp_channel'
) will be used for USER transport type
[client_1][2016-Jul-05 21:03:32.935564][0x00007fc305c06740][info][KaaChannelManager.cpp:250]:   Channel (id='default_operation_kaa_tcp_channel'
) will be used for EVENT transport type
[client_1][2016-Jul-05 21:03:32.935643][0x00007fc305c06740][info][KaaChannelManager.cpp:250]:   Channel (id='default_operation_kaa_tcp_channel'
) will be used for LOGGING transport type
Presss any key to stop Kaa SDK client
[client_1][2016-Jul-05 21:03:32.935907][0x00007fc3028f2700][trace][ConfigurationManager.cpp:86]:        Calculated configuration hash: [ 96 3F
7B AF 9D 5F F1 9B 0C DB 0C 98 51 D7 AB FC FF EC FB 92 ]
[client_1][2016-Jul-05 21:03:32.936197][0x00007fc3028f2700][info][ConfigurationManager.cpp:110]:        Loaded default configuration
[client_1][2016-Jul-05 21:03:32.936341][0x00007fc3028f2700][warning][AbstractHttpChannel.cpp:120]:      Can't sync channel default_bootstrap_ch
annel. Server is null
Kaa SDK client started!


Still in trouble, trying to know what's the problem ?
would you let me know in which header file you add entry for bootserver?


Below is refrence of kaa node file:- 


# Enabled Servers configuration

# Specifies if Control Server is enabled.
control_server_enabled=true

# Specifies if Bootstrap Server is enabled.
bootstrap_server_enabled=true

# Specifies if Operations Server is enabled.
operations_server_enabled=true

# Thrift configurations (more information about thrift look at http://thrift.apache.org/)
# The Control Server notifies every Operations/Bootstrap Server on most data updates via a Thrift-based protocol.

# Thrift server host
thrift_host=localhost

# Thrift server port
thrift_port=9090

# Kaa Admin Web server port
admin_port=8080

# Zookeeper service configuration
# Each Kaa cluster node (Kaa server) reports its state to Apache Zookeeper.
# Every node in the deployment can always obtain location of the active Control Server
# and the list of active Bootstrap and Operations Servers.

# Specifies if need to use zookeeper service. This is property have to be always "true".
# It is possible to change it for development or debug process.
zk_enabled=true

# Zookeeper service url list.
zk_host_port_list=localhost:2181

# The max retry time in milliseconds.
zk_max_retry_time=3000

# Time to sleep in milliseconds between searches for work.
zk_sleep_time=1000

# Specifies if need to throw runtime exception during registration control zookeeper node.
zk_ignore_errors=true

# Minimum difference between amount of endpoints that need to be present in
# order to trigger rebalancing
loadmgmt_min_diff=10000

# Maximum redirect probability for new sessions
loadmgmt_max_init_redirect_probability=0.75

# Maximum redirect probability for existing sessions
loadmgmt_max_session_redirect_probability=0.0

# Recalculate period in seconds for Operations server load process.
recalculation_period=10

# Specify hash partitions count for each server node
user_hash_partitions=10

# Specify the max number of neighbor connections
max_number_neighbor_connections=3

# Default TTL in seconds for historical information about Operations server load.
ops_server_history_ttl=3600


# Handler thread pool executor size
worker_thread_pool=8

# Bootstrap server keys configurations.
# Each client have to know bootstrap public key to make successful connection to bootstrap server.

# Path to Bootstrap server private key
bootstrap_keys_private_key_location=keys/bootstrap/private.key

# Path to Bootstrap server public key
bootstrap_keys_public_key_location=keys/bootstrap/public.key

# Operations server keys configurations.

# Path to Operations server private key
operations_keys_private_key_location=keys/operations/private.key

# Path to Operations server public key
operations_keys_public_key_location=keys/operations/public.key

# Specify if support unencrypted connection
support_unencrypted_connection=true

# Interface that will be used by all transports
transport_bind_interface=0.0.0.0

# Interface that will be reported by all transports
transport_public_interface=192.168.0.103


# Metrics collect enabled
metrics_enabled=true

# Path to logs root directory
logs_root_dir=/kaa_log_uploads

# Date pattern for file log appender
date_pattern='.'yyyy-MM-dd-HH-mm

# Layout pattern for file log appender
layout_pattern=%m%n

# Path to tmp keys directory
tmp_keys=/home/kaa/tmp_keys
# Frequency of load status check
load_stats_update_frequency=10000

# specify additional package to scan kaa plugins configuration
additional_plugins_scan_package=

Peter Krutsiuk

unread,
Jul 8, 2016, 8:16:13 AM7/8/16
to Kaa project
Hi,

Can you ping Sandbox from machine where you running the sample app?

Best regards,
Peter.

mohammed irshad mohammmed yousuf ansari

unread,
May 1, 2017, 12:43:09 AM5/1/17
to Kaa project
Hi, Peter Krutsiuk 

i am trying to send the notification using following command to send the notification

curl -v -S -u devuser:devuser123 -F'notification={ "applicationId": "32768", "schemaId": "65546", "topicId": "98304", "type": "USER" };type=application/json' -F file=@notification.json "http://localhost:8080/kaaAdmin/rest/api/sendNotification" | python -mjson.tool


but it is showing me the following error


Required request part 'notification' is not present
Reply all
Reply to author
Forward
0 new messages