How can i solve ""Need to upload logs" Error - kaa

this ERROR is when i try to sent data temperature from FIRST APP TUTORIAL
[pool-1-thread-1] INFO FirstKaaDemo - Sampled Temperature: 31
[pool-4-thread-147] INFO org.kaaproject.kaa.client.logging.strategies.RecordCountLogUploadStrategy - Need to upload logs - current count: 147, threshold: 1
[Thread-2] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - Can't sync. Channel [default_operation_tcp_channel] is waiting for CONNACK message + KAASYNC message
Need to upload logs Need to upload logs Need to upload logs !!!!!!!!!!!!!!!????

Please check your connection to the server and configuration of the Mongo DB Log Appender:
Ensure the Kaa host on Kaa Sandbox Management page is configured correctly. Ideally, you should change localhost (127.0.0.1) there to real IP address of the PC host you are running the Kaa Sandbox on.
Ensure the application PC host can reach the Kaa Sandbox IP address by the IP address configured on the Kaa Sandbox Management page (see item 1).
Ensure the Kaa SDK used for the application was downloaded after the change of the Kaa host on the Kaa Sandbox Management page.
Check your MongoDB log appender configuration.

Related

API Management 2018.1 and DataPower 7.7

I am trying to add DataPower 7.7 into API Management 2018.1.
I need to configure API Connect Gateway Service in DataPower (new APIC 2018.1 doesn't work with XML Management Service).
After configuration I got an error:
8:07:19 mgmt notice 959 0x00350015 apic-gw-service (default):
Operational state down
8:07:19 apic-gw-service error 959 0x88e00001 apic-gw-service
(default): Unexpected queue error: Domain check failed! Please ensure that
the 'default' domain exists and is enabled. Also, please verify that the API
Gateway Service is configured with the correct domain and SOMA credentials.
8:07:19 apic-gw-service error 959 0x88e000a0 apic-gw-service
(default): Failed to initialize gateway environment: datapower
DP version is 7.7.
Please suggest, if you have any information or manuals.
Note: Domain exists, main services are enabled
It's hard to tell what exactly the problem is based on the log messages shown above.
Update to original answer:
See also the documentation that is now available in the IBM API Connect Knowledge Center: https://www.ibm.com/support/knowledgecenter/SSMNED_2018/com.ibm.apic.install.doc/tapic_install_datapower_gateway.html
However, here are the basic steps for configuring a DataPower gateway to work with API Connect 2018.x.
You will need to ensure:
DataPower is running DP 7.7.0.0 or higher.
You have the AppOpt license installed. (Use the “show license” command in the DataPower CLI to confirm.)
You have a shared certificate and a private key for securing the
communication between the API Connect management server and the
gateway.
On DataPower, you need to:
Create an application domain. All of the subsequent configuration should be done in the application domain.
Enable statistics
Upload your private key and shared certificate to the cert:// directory in the application domain.
Create a crypto key object, a crypto certificate and a crypto identification credentials object using your key and certificate.
Create an SSL client profile and an SSL server profile that reference the crypto identification credential object.
Configure a gateway-peering object.
Configure and enable the API Connect Gateway Service in the application domain.
At that point, you should be able to configure the gateway in the API Connect cloud manager.
Here are the DataPower CLI commands to create a basic configuration. In the configuration below, IP address 1.1.1.1 represents a local IP address on your DataPower appliance. Traffic from the API Connect management server to the gateway will be sent to port 3000. API requests will go to port 9443 (but you can change it to the more standard port, 443, if you prefer.)
For a production environment, you will want to build on this configuration to ensure you are running with at least 3 gateways in the peer group, but this will get you started.
Create the application domain called apiconnect
top; configure terminal;
domain apiconnect; visible default; exit;
write mem
Use the Web GUI to upload your private key and shared certificate to the cert:// folder in the apiconnect domain
Then run these commands to create the configuration in the apiconnect domain
switch apiconnect
statistics
crypto
key gw_to_apic cert:///your-privkey.cer
certificate gw_to_apic cert:///your-sscert.cer
idcred gw_to_apic gw_to_apic gw_to_apic
ssl-client gwd_to_mgmt
idcred gw_to_apic
no validate-server-cert
exit
ssl-server gwd_to_mgmt
idcred gw_to_apic
no request-client-auth
validate-client-cert off
exit
exit
gateway-peering apic
admin-state enabled
local-address 1.1.1.1
local-port 15379
monitor-port 25379
priority 100
enable-ssl off
enable-peer-group off
persistence local
exit
apic-gw-service
admin-state enabled
local-address 0.0.0.0
local-port 3000
api-gw-address 0.0.0.0
api-gw-port 9443
v5-compatibility-mode on
gateway-peering apic
ssl-server gwd_to_mgmt
ssl-client gwd_to_mgmt
exit
write mem
The problem you are seeing is an issue with creating your api connect service in the default domain. To work around just put your Api Gateway Service in a domain other than default.

Deploy Springboot TCP APP on PWS

Trying to deploy SpringBoot TCP server application on Pivotal Web Service(Cloud Foundry)
The following is in manifest.yml file
applications:
- name: myapp-api
path: target/myapp-api-0.0.1-SNAPSHOT.jar
host: app
domain: cf-tcpapps.io
memory: 1G
instances: 1
When i cf push i get this error
FAILED
Server error, status code: 400, error code: 310009, message: You have exceeded the total reserved route ports for your organization's quota.
when i cf router-groups i get
FAILED
Failed fetching router groups.
Server error, status code: 401, error code: UnauthorizedError, message: You are not authorized to perform the requested action
How can one deploy a spring mvc api that exposes a TCP port
The PWS docs indicate:
Note: By default, PWS only supports routing of HTTP requests to applications.
This implies maybe they do, if you get a special dispensation? May be worth contacting PWS support.
The cf router-groups command is an admin-only command.
If cf domains returns the cf-tcpapps.io domain, a router group has already been set up, but your org or space has not been given permission (i.e., a quota of available TCP ports) to use it.
Ask your platform operator/admin. They may be able to increase your quota, or create a new TCP domain for you to use.

Kaa - Issue with Raspberry Pi example app

I am attempting to follow this tutorial: http://docs.kaaproject.org/display/KAA/Raspberry+Pi
When I run the final commands:
tar -zxf notification_demo.tar.gz
cd CppNotificationDemo/
./build.sh deploy
After it finishes building it displays:
Press Enter to subscribe to optional topics
I press Enter, then it displays:
Press Enter to exit
I do not press Enter, and after a couple minutes this error message shows up
[client_1][2017-Jan-19 11:29:22.287762][0x755ff450][warning][HttpClient.cpp:41]:Transport error occurred: Connection timed out
[client_1][2017-Jan-19 11:29:22.313916][0x755ff450][warning][AbstractHttpChannel.cpp:103]: Channel [default_bootstrap_channel] failed to connect 130.113.109.160:9889: Connection timed out
[client_1][2017-Jan-19 11:29:22.353513][0x755ff450][warning][AbstractHttpChannel.cpp:124]: Channel [default_bootstrap_channel] detected 'CURRENT_BOOTSTRAP_SERVER_NA' failover for TransportConnectionInfo{ server: 'BOOTSTRAP', protocol: 'TransportProtocolId{ id: 0xfb9a3cf0, version: 1 }', accessPointId: -1835393002, isFailed: 'false' }
[client_1][2017-Jan-19 11:29:22.354396][0x755ff450][warning][KaaChannelManager.cpp:157]: No Bootstrap services are accessible for TransportProtocolId{ id: 0xfb9a3cf0, version: 1 }. Processing failover...
[client_1][2017-Jan-19 11:29:22.355018][0x755ff450][warning][KaaChannelManager.cpp:148]: Attempt to reconnect to first Bootstrap service will be made in 5 seconds
What does this error message mean, and how do I solve this?
That message usually means the application cannot connect to the Kaa Sandbox. There might be several issues with that and you should try all of them until it start working.
Ensure you run the application from the same PC host the Kaa Sandbox is running. In this case, with the default Sandbox configuration the application should be able to normally access all the necessary Kaa services located on the Kaa Sandbox with no additional configuration.
If you need to run the application remotely (i.e. from another host PC and the Kaa Sandbox virtual machine is accessible through the local network), you need to change the Kaa host configuration on the Administration UI, Manage page to the real IP address of the PC host the Kaa Sandbox is running on. Then, you will need to re-generate Kaa SDK, download it and use during the application build.
If neither of this works for you, the network and (or) other configuration is incorrect and need investigation. Please describe your network topology, all the PC hosts involved, what steps did you go after downloading of the Kaa Sandbox and how did you build the application. We will analyse this data and try identify the issue root cause.

Kaa hostname resolve failed

I've installed Kaa platform on Ubuntu 16-04. not Sandbox but source 0.11
Default sample period: 1 seconds
2016/11/25 2:31:25 [ERROR] [kaa_tcp_channel.c:870] (-101) - Kaa TCP channel new access point [0x929A2016] hostname resolve failed
2016/11/25 2:31:25 [WARNING] [kaa_bootstrap_manager.c:612] (-7) - Could not find next Bootstrap access point (protocol: id=0x56C8FF92, version=1)
2016/11/25 2:31:25 [ERROR] [kaa_tcp_channel.c:307] (-7) - Kaa TCP channel [0x929A2016] error notifying bootstrap manager on access point failure
2016/11/25 2:31:25 [ERROR] [kaa_client.c:268] (-7) - Failed to connect channel [0x9E010CC0]
Sampled temperature: 29
Sampled temperature: 30
Sampled temperature: 30
Sampled temperature: 29
Sampled temperature: 25
What are my errors indicating?
There are 2 possible reasons for such output:
1. you are trying to run application without running/connected server.
2. wrong server ip set in the web UI.
Things to fix:
1. check connection beetween kaa client & server then regenerate SDK.
Perform these two steps may be this can solve your problem.
Just run this command on host machine
sudo /usr/lib/kaa-sandbox/bin/change_kaa_host.sh $new host name/ip$
Then change the IP address of using Admin UI, for that you need to sign in using username : kaa
and passwword : kaa123
then go to setting > general setting then change the IP address preceded by :8080, enter your machine's public IP address, that can be easily accessible from anywhere.
Tips :: if you are using AWS instance then use public IP address of your instance.
Further error persist then drop your previous instance and launch a new instance.
For more details go the official documentation page
Hope it will be helpful for you.
I have configured my kaa's host name to be my current connection's ip address because i am using bridged adapter as one of my methods of getting the new host name
I had the same problem with KAA installation on my virtual server. Instead of putting the IP address inside kaa-node.properties just put the full domain name or hostname.
transport_public_interface=<server name or full domain name>
and on your client host, update DNS or /etc/hosts accordingly.
The client app will not complain about a name resolution issue.

Error while calling VSO Rest API from BizTalk WCF-WebHttp Adapter

I have created a BizTalk application to connect to VSO Rest API to fetch or create work items.
I have configured a wcf-webhttp adapter for calling the rest API.
Before configuring the adapter, I have tested the API with console application and getting the results with same URL.
While running the application I am getting following error:
The adapter failed to transmit message going to send port "SendPort" with URL "the URL". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at https://xxx.visualstudio.com/defaultcollection/_apis/wit/workitems/2
connected host has failed to respond 23.98.150.230:443
But when I paste the URL in the browser I am able to see the result returned by API in the browser.
What could the issue be?

Resources