Skip to content

The remote server returned a "401 UNAUTHORIZED" error for the following transaction: Request  #329

@jjj117

Description

@jjj117

OpenStack\Common\Error\BadResponseError
HTTP Error ~~~~~~~~~~ The remote server returned a "401 UNAUTHORIZED" error for the following transaction: Request ~~~~~~~ POST /v3/auth/tokens HTTP/1.1 User-Agent: GuzzleHttp/7 Content-Type: application/json Host: 192.168.2.11:5000 Response ~~~~~~~~ HTTP/1.1 401 UNAUTHORIZED Date: Fri, 26 Mar 2021 07:31:11 GMT Server: Apache/2.4.41 (Ubuntu) WWW-Authenticate: Keystone uri="http://192.168.2.11:5000/v3" Content-Length: 109 Vary: X-Auth-Token x-openstack-request-id: req-f7192d5b-eebf-452a-b1ac-ae9abd20bbe5 Content-Type: application/json {"error":{"code":401,"message":"The request you have made requires authentication.","title":"Unauthorized"}} Further information ~~~~~~~~~~~~~~~~~~~ Please ensure that your authentication credentials are valid. Visit http://docs.php-opencloud.com/en/latest/http-codes for more information about debugging HTTP status codes, or file a support issue on https://github.com/php-opencloud/openstack/issues.

$openstack = new OpenStack([
            'authUrl' => 'http://192.168.2.11:5000/v3',
            'region' => 'default',
            'user' => [
                'id' => 'admin',
                'password' => 'ADMIN_PASS',
                'domain' => ['id' => 'default']
            ]
        ]);

        $service = $openstack->imagesV2();

        $service->getImage('aa80fd65-1350-4b77-80d5-7d1e8b7d597d');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions