I'm trying to push content from a staging to a production server, using the 7.x-2.0-alpha2 Deploy module. The servers have been set up according to the instructions, and the deployment plan and end point have been defined.

On the target server, I checked http://myhost/xxxx/services/rest/
The page displayed "Services Endpoint "xxxx" has been setup successfully." It also finds /xxx/services/rest/user/login

When I deploy new content, the operation fails. From the staging server log:

DeployAuthenticationException: Authentication error: 401 Unauthorized: Missing required argument name in DeployAuthenticatorSession->deploy() (line 54 of /var/www/html/yyyy/sites/all/modules/deploy/plugins/DeployAuthenticatorSession.inc).

This is the authentication request that is made:

Authentication request: http://myhost/xxxx/services/rest/user/login
Array
(
    [method] => POST
    [headers] => Array
        (
            [Content-Type] => application/json
        )

    [data] => {"username":"root","password":"(secret)"}
)

And here is the response:

Authentication response:
stdClass Object
(
    [request] => POST /xxxx/services/rest/user/login HTTP/1.0
Content-Type: application/json
User-Agent: Drupal (+http://drupal.org/)
Host: myhost
Content-Length: 41

{"username":"root","password":"(secret)"}
    [data] => 
    [protocol] => HTTP/1.0
    [status_message] => Unauthorized: Missing required argument name
    [headers] => Array
        (
            [date] => Tue, 13 Aug 2013 00:34:10 GMT
            [server] => Apache/2.2.3 (Red Hat)
            [x-powered-by] => PHP/5.3.27
            [expires] => Sun, 19 Nov 1978 05:00:00 GMT
            [last-modified] => Tue, 13 Aug 2013 00:34:10 +0000
            [cache-control] => no-cache, must-revalidate, post-check=0, pre-check=0
            [etag] => "1376354050"
            [content-length] => 0
            [connection] => close
            [content-type] => text/html; charset=UTF-8
        )

    [code] => 401
    [error] => Unauthorized: Missing required argument name
)

The log file on the production server isn't much help. I can see the request being made, but there are no error messages.

Any ideas? I can't believe the parameter names don't match, but it's a mystery as to what the receiving service is expecting.

Comments

dietric@gmail.com’s picture

I am having exactly the same issue, did you ever find out the cause?

schatzcoop’s picture

I gave myself this Unauthorized condition while debugging a different Deploy Authentication Exception.
The arguments for session authentication on the user resource for Services changed between API versions v1.0 and v1.1.

Looks like Deploy's request to session auth assumes v1.0, change this in your User resource config under Actions: login, logout