cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1827
Views
1
Helpful
10
Replies

CC - customer object register failed

mahudeswaranA
Enthusiast
Enthusiast

Hi,

We are trying with the context service APIs and facing some errors while registering the customer object. We are using our developer account for Acqueon.

  1. 1.Management and Client Connector state change event not received in our application, but the Management & Client connections are connected successfully.
  2. 2.While creating the Customer object getting the “No Http Response Exception” - contextServiceClient.create(customer);
  3. 3.In Tomcat log, we found the “OAuth related exception”.

  1. ContextService.log:

2016-08-09 18:38:00.034 [Thread-4] ERROR RegisterContextService:532 Exception occurred:org.apache.http.NoHttpResponseException: context-service.produs1.ciscoccservice.com:443 failed to respond: ApiError with errorType: unknownError, errorData: /context/context/v1, errorMessage: context-service.produs1.ciscoccservice.com:443 failed to respond, trackingId: xxxxxx

tomcat7-stdout.2016-08-09.log:

18:37:57.394 [Thread-6] INFO com.cisco.thunderhead.RESTClient - Error on CREATE: https://hercules-a.wbx2.com/v1/connectors

18:37:57.409 [Thread-6] INFO com.cisco.thunderhead.RESTClient - Error:  retry #0: RestApiException=RestApiError with errorType: connector.notRegistered, errorData:  OAuthClient in getAccessTokenResponse, errorMessage: failed to get access token because Connector desctruction is in progress, trackingId: abc123

18:37:57.409 [Thread-6] ERROR c.c.t.c.i.f.daemon.HeartBeatDaemon - [com.cisco.thunderhead.connector.impl.fusion.daemon.HeartBeatDaemon@64f3dd34] Exception while updating heartbeat status

  1. com.cisco.thunderhead.errors.ConnectorIsNotRegisteredExceptionRest: null: RestApiError with errorType: connector.notRegistered, errorData: OAuthClient in getAccessTokenResponse, errorMessage: failed to get access token because Connector desctruction is in progress, trackingId: abc123


1. The server has internet access and hosted in public IP.

2. We are using SDK 2.0.2. (context-service-sdk-2.0.2.jar). below are the details,

Connector.property file contents:

--At the time of deploying our app (by Default & as per the instruction)

path=plugin

original-jar-path=context-service-sdk-extension-2.0.2.jar

jar-name=context-service-sdk-downloads\\context-service-sdk-extension-2.0.2.jar

--At the time of running our app (file content get updated)

#Wed Aug 10 01:50:58 IST 2016

path=plugin

original-jar-path=context-service-sdk-extension-2.0.2.jar

jar-name=context-service-sdk-downloads\\context-service-sdk-extension-2.0.2-10236.jar

Files:

\\x.x.x.x\Tomcat 7.0\webapps\our-app\WEB-INF\lib\context-service-sdk-2.0.1.jar

\\x.x.x.x\Tomcat 7.0\plugin\context-service-sdk-extension-2.0.2.jar

\\x.x.x.x\Tomcat 7.0\plugin\context-service-sdk-downloads\context-service-sdk-extension-2.0.2-10231.jar

\\x.x.x.x\Tomcat 7.0\plugin\context-service-sdk-downloads\context-service-sdk-extension-2.0.2-10236.jar

Any help!


Thanks & Regards


10 Replies 10

ankparik
Cisco Employee
Cisco Employee

Hi,

Context Service team will be looking into the issue you reported.

Before we start looking, can I please get some more details:

1) I believe you are using Context Service SDK with your custom application. What platform is it running on? What is the JAVA version?

2) Can we please get full log files?

Thank you

Ankit Parikh

Hi Ankit,

Thank you for the reply

we are running Windows 2008 server R2,, Java version 1.7; tomcat 7

Attached file: tomcat7-stdout.2016-08-09.log

Note: At the first attempt while replying to this message unable to attach the file. The 'attach' in the bottom display after we click on Edit option.

Thank & Regards

ankparik
Cisco Employee
Cisco Employee

Hi,

Based on some of our internal testing, we are seeing similar issues when one of the directories in the path where SDK file is hosted contains space. Based on the information you have provided, one of the directory name is "Tomcat 7.0". Can you try to re-run the SDK after changing the directory name to "Tomcat7"? Remove space and also the dot from the name.

Please let us know if that resolves the issue.

As for "NoHttpResponseException", we have already deployed a fix for that and you should not run into that issue anymore.

Thank you

Ankit Parikh

Hi Ankit,

Thank you for the reply & Apologize for the delayed response, few points to check and confirm. The update is,

After renaming the folder name from "Tomcat 7.0" to "Tomcat7" & with the 'NoHtpResponseException' fix in place we are able to create customer object and able to proceed to next steps.

But still we see some exception in the tomcat logs, though the objects are creating there are some exceptions occured in the background.

16:38:32.356 [Thread-5] WARN  c.c.t.c.impl.clientoauth.OAuthClient - Connector desctruction is in progress. Cannot get the token at this time

16:38:32.371 [Thread-5] INFO  com.cisco.thunderhead.RESTClient - Error on CREATE: https://hercules-a.wbx2.com/v1/connectors

16:38:32.371 [Thread-5] INFO  com.cisco.thunderhead.RESTClient - Error:  retry #0: RestApiException=RestApiError with errorType: connector.notRegistered, errorData:  OAuthClient in getAccessTokenResponse, errorMessage: failed to get access token because Connector desctruction is in progress, trackingId: 33a57f58-4668-4125-aff2-5b26758e66df

16:38:32.387 [Thread-5] ERROR c.c.t.c.i.f.daemon.HeartBeatDaemon - [com.cisco.thunderhead.connector.impl.fusion.daemon.HeartBeatDaemon@58d6e737] Exception while updating heartbeat status

com.cisco.thunderhead.errors.ConnectorIsNotRegisteredExceptionRest: null: RestApiError with errorType: connector.notRegistered, errorData:  OAuthClient in getAccessTokenResponse, errorMessage: failed to get access token because Connector desctruction is in progress, trackingId: 33a57f58-4668-4125-aff2-5b26758e66df

In our app we are following the below steps

1.create customer obj

2.create request obj

3.create POD obj

4.Update POD

5.search POD

2016-08-12 16:38:36.746 [Thread-4] INFO  RegisterContextService:923 Customer ID Created:25d42f20-607d-11e6-819e-a1efaa6f1c1f

2016-08-12 16:38:37.371 [Thread-4] INFO  RegisterContextService:928 Request ID Created:26336620-607d-11e6-819e-a1efaa6f1c1f

2016-08-12 16:38:37.965 [Thread-4] INFO  RegisterContextService:932 PoD ID Created:268de230-607d-11e6-8bf2-11c321601d7e

2016-08-12 16:38:38.278 [Thread-4] INFO  RegisterContextService:439 updateCustomer method is called

Logs attached.

Will these exceptions have any impact on the code.?

Thanks & Regards

Hi Mahu,

Thank you for providing more information. Team will look into this and will get back to you.

Thank you

Ankit Parikh

Hi Mahu,

Based on the log files that you have provided, it seems like that you are calling destroy on Management Connector. When you call destroy on Management Connector, you stop receiving password update.

We recommend that you try running you program again without calling destroy on Management Connector. Let us know if see the same issue after that.

Thank you

Ankit Parikh

Hi Ankit,

1.We checked in the code, and found the steps to destroy on Management Connector is not called (commented). The destroy to Client Connector is also not called(commented).

2. The exception occured after an insertion happens to the customer object.

3.Would like to know your recommendation/suggestion to run this custom application as

  console based or an web application which runs in tomcat.

log analysis: (logs attached)

15:20:33.056 [Thread-7] INFO  com.cisco.thunderhead.RESTClient - Error on CREATE: https://hercules-a.wbx2.com/v1/connectors

15:20:33.056 [Thread-7] INFO  com.cisco.thunderhead.RESTClient - Error:  retry #0: RestApiException=RestApiError with errorType: connector.notRegistered, errorData:  OAuthClient in getAccessTokenResponse, errorMessage: failed to get access token because Connector desctruction is in progress

15:20:33.056 [Thread-7] ERROR c.c.t.c.i.f.daemon.HeartBeatDaemon - [com.cisco.thunderhead.connector.impl.fusion.daemon.HeartBeatDaemon@2f74fe09] Exception while updating heartbeat status

  1. com.cisco.thunderhead.errors.ConnectorIsNotRegisteredExceptionRest: null: RestApiError with errorType: connector.notRegistered, errorData: OAuthClient in getAccessTokenResponse, errorMessage: failed to get access token because Connector desctruction is in progress

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_72]


Thanks & Regards

3.Would like to know your recommendation/suggestion to run this custom application as

  console based or an web application which runs in tomcat.

It really depends on your use case. Its a Java SDK that would work in any Java environment and we have provided certain parameters to tune it for your environment. Cisco apps like Finesse, etc. use it within their web app.

Hi,

Thank you for the reply.Sorry for making this thread long.Will take the java related topic in separate thread.

Would you like to share any update on other points 1 & 2.

Thanks & Regards

Hi Mahu,

Team is working on implementing a fix for this. Once changes are deployed in production, you should not see this issue.

Thank you

Ankit Parikh

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers