You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Endpoint URL could not be found in the catalog for this service #91
Return to me that errror : When authenticating with a username, you must also provide either the domain name or domain ID to which the user belongs to. Alternatively, if you provide a user ID instead, you do not need to provide domain information.
So i changed to that one code adding domain information at the user array :
But i got that error now : Endpoint URL could not be found in the catalog for this service. Name: swift Type: object-store Region: GRA1 URL type: public
The old API worked well with username password and tenantID. What can i do ?
Thanks in advance.
I wasn't able to resolve this bug without using CURL directly to send request to the OpenStack API. I wonder if this problem comes from this library or from the hosting provider. What's your hosting provider ?
It's definitely the library, because I've tried out deis v1 auto provision on openstack from the same laptop to the same server and it worked without any problems.
You can use php Curl to exchange with the Object Storage. That's what i'm using for GooPics (hosting images website). This could also help you to directly ask OVH why it's not working with these SDK.
@haphan I couldn't get the logging working passing the laravel monolog instance.
I can provide only the laravel log but I'm not sure if that will be of any help...
[2017-02-07 18:03:49] local.ERROR: RuntimeException: Endpoint URL could not be found in the catalog for this service.
Name: swift
Type: object-store
Region: SBG1
URL type: public in /home/vagrant/Code/masterani-2/vendor/php-opencloud/openstack/src/Identity/v3/Models/Catalog.php:46
Stack trace:
#0 /home/vagrant/Code/masterani-2/vendor/php-opencloud/openstack/src/Identity/v3/Service.php(41): OpenStack\Identity\v3\Models\Catalog->getServiceUrl('swift', 'object-store', 'SBG1', 'public')
#1 /home/vagrant/Code/masterani-2/vendor/php-opencloud/openstack/src/Common/Service/Builder.php(96): OpenStack\Identity\v3\Service->authenticate(Array)
#2 /home/vagrant/Code/masterani-2/vendor/php-opencloud/openstack/src/Common/Service/Builder.php(82): OpenStack\Common\Service\Builder->stockHttpClient(Array, 'ObjectStore\\v1')
#3 /home/vagrant/Code/masterani-2/vendor/php-opencloud/openstack/src/OpenStack.php(157): OpenStack\Common\Service\Builder->createService('ObjectStore\\v1', Array)
#4 /home/vagrant/Code/masterani-2/app/Ovh/StorageClient.php(27): OpenStack\OpenStack->objectStoreV1()
#5 /home/vagrant/Code/masterani-2/app/Providers/OVHServiceProvider.php(31): App\OVH\StorageClient->__construct(Array, 'SBG1', 'official')
EDIT: It seems to work perfectly fine if I authenticate using Identity v2
@NexPBare I am unable to re-produce your issue locally. Perhaps you can double check if the region is indeed SBG1. Please note that SDK consider case-sensitivity so that SBG1 does not match sbg1.
I experienced the same issue as @NexPB, and I could reproduce the bug using the api directly with curl: the catalog is empty when you retrieve a token without tenant information.
Using those params solve the problem :
$params = [
'username' => $username,
'password' => $password,
'authUrl' => $auth_url,
'region' => $region,
// the tenant id is required here for a valid catalog'tenantId' => $tenant_id,
// this result in an empty service catalog/* 'scope' => [ 'project' => [ 'id' => $tenant_id, ] ], */'identityService' => \OpenStack\Identity\v2\Service::factory(
new \GuzzleHttp\Client( [
'base_uri' => \OpenStack\Common\Transport\Utils::normalizeUrl( $auth_url ),
'handler' => \GuzzleHttp\HandlerStack::create(),
] ) ),
]
;
I have the same problem. After debugging, in vendor/php-opencloud/openstack/src/Identity/v3/Models/Service.php; in method getUrl (it is previous to throw the 'EndPoint Url not found...', the values are:
this.name: EMPTY
this.type: object-store
name: swift
type: object-store
so, this.name !== name, getUrl returns false and never find endpoint so throws the exception.
Then, ¿why $this->name is empty? anyone knows how to solve this? (if it wash 'swift' the endpoint would be found.
the code:
public function getUrl(string $name, string $type, string $region, string $interface)
{
//this is my poor man debug method:
echo 'this.name '.$this->name.' this.type '.$this->type.' name '.$name.' type '.$type.' ';
if (!$this->nameMatches($name) || !$this->typeMatches($type)) {
return false;
}
I pulled my hair upon this one today and finally figured it out after a few hours.
In my case I needed to pass the catalogName option when creating the object store object, so that it will match the provider's one instead of the default swift.
Hi guys, just needed to solve the very same error.
I personally use OVH services on multiple projects and price for their products is unbeatable. Huge problem with OVH is in the complete lack of documentation and support with anything behind scope of basic usage.
Which is probably cause of many issues posted in this thread. All OVH cloud services are connected with datacenter (SBG3, GRA1 etc.), just object storage is connected with region (SBG, GRA) and not the specific datacenter.
You need to go to the Openstack Horizon management interface and check API access. If you choose datacenter SBG3 or GRA3, then you'll see just a dash in the EndPoint column. You have to switch to SBG/GRA/whatever and there you have object storage endpoint (and all other endpoints are missing).
So the issue doesn't seem to be connected with PHP OpenStack SDK, EndPoint really isn't defined with datacenters specified in former posts.
This code based on former solutions is OVH compatible:
Activity
haroldiedema commentedon Sep 30, 2016
The v3 API requires you to also specify a domain_id. By default the value for this is "default".
You can see this in detail on the API reference page at http://developer.openstack.org/api-ref/identity/v3/?expanded=password-authentication-with-unscoped-authorization-detail
kristiandrucker commentedon Dec 13, 2016
Hi, when using this code to connect to openstack I get the same error
please may you fix the issue?
tflament commentedon Dec 13, 2016
I wasn't able to resolve this bug without using CURL directly to send request to the OpenStack API. I wonder if this problem comes from this library or from the hosting provider. What's your hosting provider ?
kristiandrucker commentedon Dec 14, 2016
I'm using openstack kolla on my own server.
kristiandrucker commentedon Dec 14, 2016
It's definitely the library, because I've tried out deis v1 auto provision on openstack from the same laptop to the same server and it worked without any problems.
NexPB commentedon Feb 6, 2017
I'm having the same issue using OVHs cloud storage.
Can anyone help me out?
tflament commentedon Feb 6, 2017
You can use php Curl to exchange with the Object Storage. That's what i'm using for GooPics (hosting images website). This could also help you to directly ask OVH why it's not working with these SDK.
NexPB commentedon Feb 6, 2017
@adraqi it worked fine with https://github.com/rackspace/php-opencloud but wanted to upgrade to this one.
haphan commentedon Feb 7, 2017
Hi @nextpb, Thanks for reporting this issue. What is the openstack version in use and can you provide the response from the api?
I will take a look sometime today.
NexPB commentedon Feb 7, 2017
@haphan https://www.openstack.org/marketplace/public-clouds/ovh-group/ovh-public-cloud
What API response would you like? Authenticating using Identity v3 was working fine, but I encoutered this error trying to use object storage.
haphan commentedon Feb 7, 2017
@NexPB I've not tested the SDK with OVH flavor openstack but my take is it should work.
You can enable debug by setting
debugLogtotrueand also injectingloggerandmessageFormatter.This will basically log all the guzzle request and response to console. Please submit the log here so I can take a look.
NexPB commentedon Feb 7, 2017
@haphan I couldn't get the logging working passing the laravel monolog instance.
I can provide only the laravel log but I'm not sure if that will be of any help...
EDIT: It seems to work perfectly fine if I authenticate using Identity v2
haphan commentedon Feb 20, 2017
@NexPBare I am unable to re-produce your issue locally. Perhaps you can double check if the region is indeed
SBG1. Please note that SDK consider case-sensitivity so thatSBG1does not matchsbg1.Alternatively, I have just created this bug report template which hopefully benefit everyone in reporting issue: https://github.com/haphan/openstack-issue-report
Please follow instruction and post the result here. Thank you.
haphan commentedon Feb 20, 2017
@adraqi @kristiandrucker Can you also follow following issue report template https://github.com/haphan/openstack-issue-report and post result here? Thank you.
julienfastre commentedon Jul 25, 2017
Hi,
I experienced the same issue as @NexPB, and I could reproduce the bug using the api directly with curl: the catalog is empty when you retrieve a token without tenant information.
Using those params solve the problem :
HTH
thiagodamas commentedon Sep 18, 2017
Hi,
after investigating, I solved the problem with the following code:
phansys commentedon Feb 2, 2018
Fix proposed at #154. BTW, this issue seems to be vendor specific (Telefónica Open Cloud).
cocosistemas commentedon Feb 9, 2018
I have the same problem. After debugging, in vendor/php-opencloud/openstack/src/Identity/v3/Models/Service.php; in method getUrl (it is previous to throw the 'EndPoint Url not found...', the values are:
this.name: EMPTY
this.type: object-store
name: swift
type: object-store
so, this.name !== name, getUrl returns false and never find endpoint so throws the exception.
Then, ¿why $this->name is empty? anyone knows how to solve this? (if it wash 'swift' the endpoint would be found.
the code:
public function getUrl(string $name, string $type, string $region, string $interface)
{
//this is my poor man debug method:
echo 'this.name '.$this->name.' this.type '.$this->type.' name '.$name.' type '.$type.'
';
if (!$this->nameMatches($name) || !$this->typeMatches($type)) {
return false;
}
Thansk!
Frzk commentedon Jun 24, 2019
I pulled my hair upon this one today and finally figured it out after a few hours.
In my case I needed to pass the
catalogNameoption when creating the object store object, so that it will match the provider's one instead of the defaultswift.Another available option is
catalogType, which defaults toobject-store.I've been able to figure out the value by reading the token value.
Hope it can help :-)
tomasruprich commentedon Apr 15, 2020
Hi guys, just needed to solve the very same error.
I personally use OVH services on multiple projects and price for their products is unbeatable. Huge problem with OVH is in the complete lack of documentation and support with anything behind scope of basic usage.
Which is probably cause of many issues posted in this thread. All OVH cloud services are connected with datacenter (SBG3, GRA1 etc.), just object storage is connected with region (SBG, GRA) and not the specific datacenter.
You need to go to the Openstack Horizon management interface and check API access. If you choose datacenter SBG3 or GRA3, then you'll see just a dash in the EndPoint column. You have to switch to SBG/GRA/whatever and there you have object storage endpoint (and all other endpoints are missing).
So the issue doesn't seem to be connected with PHP OpenStack SDK, EndPoint really isn't defined with datacenters specified in former posts.
This code based on former solutions is OVH compatible: