php-opencloud / openstack

PHP SDK for OpenStack clouds
Apache License 2.0
221 stars 149 forks source link

Getting error resulted in a `404 Not Found` #247

Open netshell opened 6 years ago

netshell commented 6 years ago

Hello, I am trying to get Object storage but get error. My Code is: require 'vendor/autoload.php'; $openstack = new OpenStack\OpenStack( [ 'authUrl' => 'https://authenticate.ain.net/v2.0/', 'region' => 'BHS1', 'username' => 'xx', 'password' => 'xxxx#jd?dja(JdVc84A', 'tenantId' => 'xxx', 'identityService' => OpenStack\Identity\v2\Service::factory( new GuzzleHttp\Client( [ 'base_uri' => OpenStack\Common\Transport\Utils::normalizeUrl( 'https://authenticate.ain.net/v2.0/' ), 'handler' => GuzzleHttp\HandlerStack::create(), ] ) ), ] );

$service = $openstack->objectStoreV1(); Error:

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

haphan commented 6 years ago

The endpoint is expected at https://authenticate.ain.net/v2.0/tokens

Please clarify with your provider since your API endpoint is not standard.

onokje commented 6 years ago

I have the same problem... 'authUrl' => "http://identity.stack.cloudvps.com/v2.0"