Skip to content

OVH - 404 Not Found The resource could not be found #291

Description

@tuyenlaptrinh

Hello Everyone. I am new in Openstack and I am using OVH Object Storage. I got this error when I try connect to OVH

Fatal error: Uncaught GuzzleHttp\Exception\ClientException: 
Client error: `POST https://auth.cloud.ovh.net/auth/tokens` resulted in a `404 Not Found` response: {"error": {"message": "The resource could not be found.", "code": 404, "title": "Not Found"}} in D:\Xampp\htdocs\ovh\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php:113 Stack trace: #0 D:\Xampp\htdocs\ovh\vendor\guzzlehttp\guzzle\src\Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 D:\Xampp\htdocs\ovh\vendor\guzzlehttp\promises\src\Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response)) #2 D:\Xampp\htdocs\ovh\vendor\guzzlehttp\promises\src\Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) #3 D:\Xampp\htdocs\ovh\vendor\guzzlehttp\promises\src\TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() #4 D:\Xampp\htdocs\ovh\vendor\guzzlehttp\promises\src\Promi in D:\Xampp\htdocs\ovh\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php on line 113

I tried another auth URL like
https://auth.cloud.ovh.net/v2.0/ or https://auth.cloud.ovh.net/v3. I got the error too

This is my code

$openstack = new OpenStack\OpenStack([
    'authUrl' => 'https://auth.cloud.ovh.net/',
    'region'  => 'SGP1',
    'user'    => [
        'id'       => 'xxxxxxxx',
        'password' => 'xxxxxxxx'
    ],
    'scope'   => ['project' => ['id' => 'xxxxxxxxx']]
]);
$account = $openstack->objectStoreV1()
                     ->getAccount();

Please help me solve this problem.

Activity

  1. Kearsan commented on Sep 25, 2019

    @Kearsan

    Hi,

    I think the problem is the use of user id instead of user name. OVH provide the user name, not the id. So you have to replace 'id' by 'name'.

    When you provide name instead of id you have to provide the domain too, which is "Default'.

    Finally, auth url for OVH is https://auth.cloud.ovh.net/v3/

    So you should come with something like :

    $openstack = new OpenStack\OpenStack([
        'authUrl' => 'https://auth.cloud.ovh.net/v3/',
        'region'  => 'SGP1',
        'user'    => [
            'name'       => 'xxxxxxxx',
            'password' => 'xxxxxxxx',
            'domain'   => [
                      'name' => 'Default'
    		               ]
        ],
        'scope'   => ['project' => ['id' => 'xxxxxxxxx']]
    ]);
    
  2. tuyenlaptrinh commented on Sep 26, 2019

    @tuyenlaptrinh
    Author

    @Kearsan auth URL v3 is same. When I change id by name It is required ID error message

  3. Kearsan commented on Sep 27, 2019

    @Kearsan

    It's strange. I use OVH Object Storage too and this is the exact configuration I use and it works perfectly. Btw Openstack allows you to auth with id or name, so it shouldn't ask you for id if you set a name. And as I said OVH provides the name only (Horizon's name and password).

  4. haphan commented on Jan 7, 2020

    @haphan
    Collaborator

    Hi @tuyenlaptrinh and @Kearsan

    This could due to the fact that OVH use a wildcard * for their region see #288

    Can you pull master branch and try it out.

  5. Kearsan commented on Jan 17, 2020

    @Kearsan

    Hi @haphan

    I'm not using any wildcard for OVH and it works perfectly well. Actually OVH do use regions, we even get an email recently from OVH annoucing a recent change to regions in order to connect to Openstack (They are merging regions, so in our case we had to change GRA1 to GRA. Indeed both will still work during several months to prevent issues for live projects).

    Regards,

  6. mogyiman commented on Mar 2, 2020

    @mogyiman

    Hello,

    I've had similar problems, all kind of error messages using OVH object storage with Keystone v3.
    The actual config that helped follows:

    $client = new OpenStack\OpenStack([
        'authUrl' => 'https://auth.cloud.ovh.net/v3',
        'region'  => 'GRA',   //the new region names
        'user'    => [
            'domain'    => ['id' => 'default'],
            'name'     => $username,
    //      'id'       => $username,
            'password' => $password
        ],
        'scope'   => ['project' => [
                        'name' => $tenant,
                        'domain' => ['id' => 'default']]]
    ]);
    

    $tenant is the deprecated v2 name for "project name".

    Regards,

  7. chadyred commented on Mar 13, 2020

    @chadyred

    Ovh doc may help you and me too, I search but I will find a way to go!

    https://docs.ovh.com/gb/en/storage/pca/dev/

    One of here sample is :

    {
    "user" : {
              "domain" : {
                 "name" : "Default",
                 "id" : "default"
              },
              "name" : "ktZeF8Uqluqm",
              "id" : "200ba261af11471db447526575dcb9fb"
           },
           "audit_ids" : [
              "BN_StzM0SFmGB5uYiIhA7Q"
           ],
           "project" : {
              "id" : "e80c212388cd4d509abc959643993b9f",
              "domain" : {
                 "name" : "Default",
                 "id" : "default"
              },
              "name" : "3635872342124167"
           }
     }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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