I am unable to log in to CCRM, a Rapattoni feed, from librets. I have checked the credentials by successfully logging in with PHRETS version 1. In the code below, I have set the user agent and rets version after the session is created, prior to calling the Login method, as described in the FAQ and other documentation. A log file has been attached as well, that may point out the problem.
What I noticed in the difference between the successful login for PHRETS and the unsuccessful login is the connection number. In the successful login, the second login attempt (needed for hand-shaking with digest authentication), the connection is made to connection 0, that was created on the first login attempt.
In the librets.log attached below, the second, third, and fourth attempts all use an incremental connection number (connection 1, 2, 3) until the Login method gives up. It seems that it can't complete the authentication because it isn't trying to connect back to connection #0 with the correct authorization and session cookie. To clarify, it sends the authorization header, but not the cookie and it makes a new connection.
Has anyone run into this problem? I've searched the issues here and on the librets forum, but can't figure out how to solve this problem.
* Hostname was NOT found in DNS cache
* Trying 72.26.113.170...
* Connected to rets172lax.raprets.com (72.26.113.170) port 6103 (#0)
>>> Sent
GET /CentralCoast/CCRM/login.aspx HTTP/1.1
Host: rets172lax.raprets.com:6103
Accept: */*
RETS-Version: RETS/1.7.2
User-Agent: Aumnia/1.0
X-Librets-Version: 1.6.2, libCURL - libcurl/7.35.0 OpenSSL/1.0.0a
<<< Received
HTTP/1.1 401 Unauthorized. Not Authenticated..
* Server Microsoft-IIS/8.5 is not blacklisted
<<< Received
Server: Microsoft-IIS/8.5
X-AspNet-Version: 2.0.50727
WWW-Authenticate: Digest realm="CCRM", nonce="783c6fdfa68fcc076a8674b553bc19d1", opaque="c43c55b565d8e2ef3274c8b81ecd1236", qop="auth"
Vary: Accept-Encoding
Cache-Control: private
Content-Type: text/xml
Date: Fri, 02 Sep 2016 16:50:54 GMT
RETS-Version: RETS/1.7.2
Transfer-Encoding: chunked
Connection: Keep-Alive
X-Powered-By: ASP.NET (203)
* Ignoring the response-body
<<< Received
0
* Connection #0 to host rets172lax.raprets.com left intact
* Issue another request to this URL: 'http://rets172lax.raprets.com:6103/CentralCoast/CCRM/login.aspx'
* Found bundle for host rets172lax.raprets.com: 0x6546b28
* Hostname was found in DNS cache
* Trying 72.26.113.170...
* Connected to rets172lax.raprets.com (72.26.113.170) port 6103 (#1)
* Server auth using Digest with user 'XXXX'
>>> Sent
GET /CentralCoast/CCRM/login.aspx HTTP/1.1
Authorization: Digest username="XXXX", realm="CCRM", nonce="783c6fdfa68fcc076a8674b553bc19d1", uri="/CentralCoast/CCRM/login.aspx", cnonce="ODRkYWRiOGY2ZWY0Njg0MzAwMDhlOTA2MDAwMDAwMDA=", nc=00000001, qop=auth, response="0c69958b31411b71b9c5688135a7e9da", opaque="c43c55b565d8e2ef3274c8b81ecd1236"
Host: rets172lax.raprets.com:6103
Accept: */*
RETS-Version: RETS/1.7.2
User-Agent: Aumnia/1.0
X-Librets-Version: 1.6.2, libCURL - libcurl/7.35.0 OpenSSL/1.0.0a
<<< Received
HTTP/1.1 401 Bad Request. Response did not match. /CentralCoast/CCRM/login.aspx :client
* Server Microsoft-IIS/8.5 is not blacklisted
<<< Received
Server: Microsoft-IIS/8.5
X-AspNet-Version: 2.0.50727
* Authentication problem. Ignoring this.
<<< Received
WWW-Authenticate: Digest realm="CCRM", nonce="783c6fdfa68fcc076a8674b553bc19d1", opaque="c43c55b565d8e2ef3274c8b81ecd1236", qop="auth"
Vary: Accept-Encoding
Cache-Control: private
Content-Type: text/xml
Date: Fri, 02 Sep 2016 16:50:55 GMT
RETS-Version: RETS/1.7.2
Transfer-Encoding: chunked
Connection: Keep-Alive
X-Powered-By: ASP.NET (204)
0
* Connection #1 to host rets172lax.raprets.com left intact
* Found bundle for host rets172lax.raprets.com: 0x6546b28
* Hostname was found in DNS cache
* Trying 72.26.113.170...
* Connected to rets172lax.raprets.com (72.26.113.170) port 6103 (#2)
* Server auth using Digest with user 'XXXX'
>>> Sent GET /CentralCoast/CCRM/login.aspx HTTP/1.1
Authorization: Digest username="XXXX", realm="CCRM", nonce="783c6fdfa68fcc076a8674b553bc19d1", uri="/CentralCoast/CCRM/login.aspx", cnonce="YzI3Mjc5NGZkMTQwYjFlNDAwMDhlOTA3MDAwMWE5Yzg=", nc=00000001, qop=auth, response="83121c3edbd93c38a014cc24bc0d0d84", opaque="c43c55b565d8e2ef3274c8b81ecd1236"
Host: rets172lax.raprets.com:6103
Accept: */*
RETS-Version: RETS/1.7.2
User-Agent: Aumnia/1.0
X-Librets-Version: 1.6.2, libCURL - libcurl/7.35.0 OpenSSL/1.0.0a
<<< Received
HTTP/1.1 401 Bad Request. Response did not match. /CentralCoast/CCRM/login.aspx :client
* Server Microsoft-IIS/8.5 is not blacklisted
<<< Received
Server: Microsoft-IIS/8.5
X-AspNet-Version: 2.0.50727
* Ignoring duplicate digest auth header.
<<< Received
WWW-Authenticate: Digest realm="CCRM", nonce="783c6fdfa68fcc076a8674b553bc19d1", opaque="c43c55b565d8e2ef3274c8b81ecd1236", qop="auth"
Vary: Accept-Encoding
Cache-Control: private
Content-Type: text/xml
Date: Fri, 02 Sep 2016 16:50:54 GMT
RETS-Version: RETS/1.7.2
Transfer-Encoding: chunked
Connection: Keep-Alive
X-Powered-By: ASP.NET (201)
* Ignoring the response-body
<<< Received
0
* Connection #2 to host rets172lax.raprets.com left intact
* Issue another request to this URL: 'http://rets172lax.raprets.com:6103/CentralCoast/CCRM/login.aspx'
* Found bundle for host rets172lax.raprets.com: 0x6546b28
* Hostname was found in DNS cache
* Trying 72.26.113.170...
* Connected to rets172lax.raprets.com (72.26.113.170) port 6103 (#3)
* Server auth using Digest with user 'XXXX'
>>> Sent
GET /CentralCoast/CCRM/login.aspx HTTP/1.1
Authorization: Digest username="XXXX", realm="CCRM", nonce="783c6fdfa68fcc076a8674b553bc19d1", uri="/CentralCoast/CCRM/login.aspx", cnonce="YzI3Mjc5NGZkMTQwYjFlNDAwMDhlOTA3MDAwMWE5Yzg=", nc=00000002, qop=auth, response="d428ecfce14ab4da038534bbd935b796", opaque="c43c55b565d8e2ef3274c8b81ecd1236"
Host: rets172lax.raprets.com:6103
Accept: */*
RETS-Version: RETS/1.7.2
User-Agent: Aumnia/1.0
X-Librets-Version: 1.6.2, libCURL - libcurl/7.35.0 OpenSSL/1.0.0a
<<< Received
HTTP/1.1 401 Bad Request. Response did not match. /CentralCoast/CCRM/login.aspx :client
* Server Microsoft-IIS/8.5 is not blacklisted
<<< Received
Server: Microsoft-IIS/8.5
X-AspNet-Version: 2.0.50727
* Authentication problem. Ignoring this.
<<< Received
WWW-Authenticate: Digest realm="CCRM", nonce="783c6fdfa68fcc076a8674b553bc19d1", opaque="c43c55b565d8e2ef3274c8b81ecd1236", qop="auth"
Vary: Accept-Encoding
Cache-Control: private
Content-Type: text/xml
Date: Fri, 02 Sep 2016 16:50:55 GMT
RETS-Version: RETS/1.7.2
Transfer-Encoding: chunked
Connection: Keep-Alive
X-Powered-By: ASP.NET (204)
0
* Connection #3 to host rets172lax.raprets.com left intact