cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2308
Views
0
Helpful
8
Replies

CUPI API Issue following Connection 9.1(2) upgrade

MARIO POIER
Enthusiast
Enthusiast

Since upgrading Unity Connection from 9.1.(1) to 9.1(2) SU1 I can no longer establish a connection using the CUPI API.

The result code reported by the API is simply:

"Login failed to Connection server:unitypub.nait.ca"

I'm using the .NET CUPI Fast Start API version 3.0.28.0. In order to rule out my own app as the problem I've also attempted to use the CUPIFastStart project and receive the same result.

I've enabled VMREST micro traces on the publisher and collected the following from the Tomcat logs:

23:08:57.577 |12710,,,VMREST,3,DEBUG [http-bio-443-exec-3] com.cisco.connection.rest.SecurityFilter  - IMS result code: 0

23:08:57.578 |12710,,,VMREST,3,DEBUG [http-bio-443-exec-3] com.cisco.connection.rest.RequestFilter  - REQUEST GET version

23:08:57.578 |12710,,,VMREST,3,DEBUG [http-bio-443-exec-3] com.cisco.connection.rest.helper.DataHelper  - executeQuery: query='SELECT FIRST 1 Product FROM tbl_SchemaInformation WHERE IsCurrent=1'

23:08:57.579 |12710,,,VMREST,3,DEBUG [http-bio-443-exec-3] com.cisco.connection.rest.helper.DataHelper  - getValuesFromQuery: product=9.1.1.2TT1

23:08:57.579 |12710,,,VMREST,3,DEBUG [http-bio-443-exec-3] com.cisco.connection.rest.ResponseFilter  - RESPONSE filter IN

I interpret the first line of the debug to be a successful login attempt based on the information provided from http://docwiki.cisco.com/wiki/Cisco_Unity_Connection_APIs_--_Troubleshooting

From what I can tell this all seems normal. Fiddler also seems to indicate that the JSON response is being sent back to the client application.

JSON

     name=vmrest

     version=9.1.1.2TT1

As a further confirmation, I've stood up a new 9.1(0.32) version of Unity Connection and tested both the CUPIFastStart and my own code and it works just fine. Something has definitely changed in 9.1(2).

I also did some further debugging of the ConnectionServerRest API code and found that the WebCallResult for the GetVersionInfo function returned the following:

{    WebCallResults contents:

    URL Sent: https://unitypub:8443/vmrest/version

    Method Sent: GET

    Body Sent:

    Success returned: False

    Status returned 200:Ok

    Error Text: No version version returned logging into Connection server: unitypub, return text={"name":"vmrest","version":"9.1.1.2TT1"}

    Raw Response Text: {"name":"vmrest","version":"9.1.1.2TT1"}

    Total object count: 0

    Status description: OK

}

    ErrorText: "No version version returned logging into Connection server: unitypub, return text={\"name\":\"vmrest\",\"version\":\"9.1.1.2TT1\"}"

    JsonDictionary: Count = 2

    Method: "GET"

    Misc: null

    RequestBody: ""

    ResponseText: "{\"name\":\"vmrest\",\"version\":\"9.1.1.2TT1\"}"

    ReturnedObjectId: null

    StatusCode: 200

    StatusDescription: "OK"

    Success: false

    TotalObjectCount: 0

    Url: "https://unitypub:8443/vmrest/version"

    XmlElement: null

It seems odd that the StatusCode is 200 yet the Success is false.

1 Accepted Solution

Accepted Solutions

The latest version is 3.0.30.0.

You can import latest code from Tortoise SVN. Please verify that version mentioned in AssemblyInfo.cs is AssemblyVersion("3.0.30.0")

I checked in lab and able to login successfully and got Success=True and 200 OK in response.

View solution in original post

8 Replies 8

amoherek
Cisco Employee
Cisco Employee

Can you provide the error in the logs? I see you pointed out "Login failed to Connection server:unitypub.nait.ca" but was there anything else before or after that line?

Thanks,

Adrienne

The login failure message was what the CUPI FastStart sample project returns. What actually is returned from the webservice call  GetVersionInfo is the following WebCallResult object:

{ WebCallResults contents:

URL Sent: https://unitypub:8443/vmrest/version

Method Sent: GET

Body Sent:

Success returned: False

Status returned 200:Ok

Error Text: No version version returned logging into Connection server: unitypub, return text={"name":"vmrest","version":"9.1.1.2TT1"}

Raw Response Text: {"name":"vmrest","version":"9.1.1.2TT1"}

Total object count: 0

Status description: OK

}

ErrorText: "No version version returned logging into Connection server: unitypub, return text={\"name\":\"vmrest\",\"version\":\"9.1.1.2TT1\"}"

JsonDictionary: Count = 2

Method: "GET"

Misc: null

RequestBody: ""

ResponseText: "{\"name\":\"vmrest\",\"version\":\"9.1.1.2TT1\"}"

ReturnedObjectId: null

StatusCode: 200

StatusDescription: "OK"

Success: false

TotalObjectCount: 0

Url: "https://unitypub:8443/vmrest/version"

XmlElement: null

of was what was being returned following an attempt to connect to the "after That message is from the CUPI FastStart project.

The Tomcat debug logs and Fiddler seem to indicate that the data is indeed being sent.