Owncloud Openstack Swift

help

#1

Hi Everyone,

Im trying to connect Owncloud server 9.1 with openstack swift. The thing is that when i enable External Storage (Im using owncloud community edition) And put the parameters, the connection failed. The log /var/www/html/owncloud/data/owncloud.log does not show anything, only show connection refused when i pass a wrong parameter.

Im not sure if this configuration could work because the documentations says that External Storage connections are only available in the Enterprise Edition, however, I can enable this option from the admin panel.

Any suggestions

Thanks in advance


#2

Here is my config.

'objectstore' => array(
'class' => 'OC\Files\ObjectStore\Swift',
'arguments' => array(
'username' => '****',
'password' => '****',
'container' => 'MyCloud',
'autocreate' => true,
'region' => 'RegionOne',
'url' => 'http://x.x.x.x:5000/v2.0',
'tenantName' => 'swift',
'serviceName' => 'swift',
'urlType' => 'internal'
),
),

An here is what the log shows

{"reqId":"WFfgHwudIIURxHf9IpqQkQAAAAQ","remoteAddr":"x.x.x.x","app":"objectstore","message":"Could not create object: Client error response\n[status code] 401\n[reason phrase] Unauthorized\n[url] http:\/\/x.x.x.x:5000\/v2.0\/tokens","level":3,"time":"2016-12-19T13:26:56+00:00","method":"GET","url":"\/owncloud\/index.php\/settings\/ajax\/checksetup","user":"admin"}
{"reqId":"WFfgHwudIIURxHf9IpqQkQAAAAQ","remoteAddr":"x.x.x.x","app":"objectstore","message":"Could not create object: Client error response\n[status code] 401\n[reason phrase] Unauthorized\n[url] http:\/\/x.x.x.x:5000\/v2.0\/tokens","level":3,"time":"2016-12-19T13:26:56+00:00","method":"GET","url":"\/owncloud\/index.php\/settings\/ajax\/checksetup","user":"admin"}
{"reqId":"WFfgHwudIIURxHf9IpqQkQAAAAQ","remoteAddr":"x.x.x.x","app":"index","message":"Exception: {\"Exception\":\"Guzzle\\Http\\Exception\\ClientErrorResponseException\",\"Message\":\"Client error response\n[status code] 401\n[reason phrase] Unauthorized\n[url] http:\\/\\/200.89.90.1:5000\\/v2.0\\/tokens\",\"Code\":0,\"Trace\":\"#0 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Message\\/Request.php(145): Guzzle\\Http\\Exception\\BadResponseException::factory(Object(Guzzle\\Http\\Message\\EntityEnclosingRequest), Object(Guzzle\\Http\\Message\\Response))\n#1 internal function: Guzzle\\Http\\Message\\Request::onRequestError(Object(Guzzle\\Common\\Event), 'request.error', Object(Symfony\\Component\\EventDispatcher\\EventDispatcher))\n#2 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/symfony\\/event-dispatcher\\/EventDispatcher.php(181): call_user_func(Array, Object(Guzzle\\Common\\Event), 'request.error', Object(Symfony\\Component\\EventDispatcher\\EventDispatcher))\n#3 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/symfony\\/event-dispatcher\\/EventDispatcher.php(46): Symfony\\Component\\EventDispatcher\\EventDispatcher->doDispatch(Array, 'request.error', Object(Guzzle\\Common\\Event))\n#4 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Message\\/Request.php(589): Symfony\\Component\\EventDispatcher\\EventDispatcher->dispatch('request.error', Object(Guzzle\\Common\\Event))\n#5 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Message\\/Request.php(378): Guzzle\\Http\\Message\\Request->processResponse(Array)\n#6 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Message\\/EntityEnclosingRequest.php(49): Guzzle\\Http\\Message\\Request->setState('complete', Array)\n#7 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Curl\\/CurlMulti.php(286): Guzzle\\Http\\Message\\EntityEnclosingRequest->setState('complete', Array)\n#8 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Curl\\/CurlMulti.php(244): Guzzle\\Http\\Curl\\CurlMulti->processResponse(Object(Guzzle\\Http\\Message\\EntityEnclosingRequest), Object(Guzzle\\Http\\Curl\\CurlHandle), Array)\n#9 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Curl\\/CurlMulti.php(227): Guzzle\\Http\\Curl\\CurlMulti->processMessages()\n#10 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Curl\\/CurlMulti.php(211): Guzzle\\Http\\Curl\\CurlMulti->executeHandles()\n#11 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Curl\\/CurlMulti.php(105): Guzzle\\Http\\Curl\\CurlMulti->perform()\n#12 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Curl\\/CurlMultiProxy.php(91): Guzzle\\Http\\Curl\\CurlMulti->send()\n#13 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Client.php(282): Guzzle\\Http\\Curl\\CurlMultiProxy->send()\n#14 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Message\\/Request.php(198): Guzzle\\Http\\Client->send(Object(Guzzle\\Http\\Message\\EntityEnclosingRequest))\n#15 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/rackspace\\/php-opencloud\\/lib\\/OpenCloud\\/Identity\\/Service.php(167): Guzzle\\Http\\Message\\Request->send()\n#16 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/rackspace\\/php-opencloud\\/lib\\/OpenCloud\\/OpenStack.php(370): OpenCloud\\Identity\\Service->generateToken(*** sensitive parameters replaced ***)\n#17 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/rackspace\\/php-opencloud\\/lib\\/OpenCloud\\/Common\\/Service\\/CatalogService.php(184): OpenCloud\\OpenStack->authenticate()\n#18 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/rackspace\\/php-opencloud\\/lib\\/OpenCloud\\/Common\\/Service\\/CatalogService.php(72): OpenCloud\\Common\\Service\\CatalogService->findEndpoint()\n#19 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/rackspace\\/php-opencloud\\/lib\\/OpenCloud\\/ObjectStore\\/Service.php(43): OpenCloud\\Common\\Service\\CatalogService->construct(Object(OpenCloud\\OpenStack), NULL, 'swift', 'RegionOne', 'internal')\n#20 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/rackspace\\/php-opencloud\\/lib\\/OpenCloud\\/Common\\/Service\\/ServiceBuilder.php(43): OpenCloud\\ObjectStore\\Service->construct(Object(OpenCloud\\OpenStack), NULL, 'swift', 'RegionOne', 'internal')\n#21 \\/var\\/www\\/html\\/owncloud\\/3rdparty\\/rackspace\\/php-opencloud\\/lib\\/OpenCloud\\/OpenStack.php(459): OpenCloud\\Common\\Service\\ServiceBuilder::factory(Object(OpenCloud\\OpenStack), 'OpenCloud\\Objec...', Array)\n#22 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/Files\\/ObjectStore\\/Swift.php(85): OpenCloud\\OpenStack->objectStoreService('swift', 'RegionOne', 'internal')\n#23 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/Files\\/ObjectStore\\/Swift.php(112): OC\\Files\\ObjectStore\\Swift->init()\n#24 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/Files\\/ObjectStore\\/ObjectStoreStorage.php(389): OC\\Files\\ObjectStore\\Swift->writeObject('urn:oid:23', Resource id #633)\n#25 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/Files\\/Stream\\/Close.php(103): call_user_func(Array, '\\/tmp\\/oc_tmp_rXT...')\n#27 internal function: OC\\Files\\Stream\\Close->stream_close()\n#28 \\/var\\/www\\/html\\/owncloud\\/apps\\/files_external\\/3rdparty\\/icewind\\/streams\\/src\\/Wrapper.php(124): fclose(Resource id #626)\n#29 \\/var\\/www\\/html\\/owncloud\\/apps\\/files_external\\/3rdparty\\/icewind\\/streams\\/src\\/CallbackWrapper.php(107): Icewind\\Streams\\Wrapper->stream_close()\n#30 internal function: Icewind\\Streams\\CallbackWrapper->stream_close()\n#31 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/Security\\/CertificateManager.php(128): fclose(Resource id #629)\n#32 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/Security\\/CertificateManager.php(205): OC\\Security\\CertificateManager->createCertificateBundle()\n#33 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/Http\\/Client\\/Client.php(73): OC\\Security\\CertificateManager->getAbsoluteBundlePath(NULL)\n#34 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/Http\\/Client\\/Client.php(135): OC\\Http\\Client\\Client->setDefaultOptions()\n#35 \\/var\\/www\\/html\\/owncloud\\/settings\\/Controller\\/CheckSetupController.php(194): OC\\Http\\Client\\Client->get('https:\\/\\/www.own...')\n#36 \\/var\\/www\\/html\\/owncloud\\/settings\\/Controller\\/CheckSetupController.php(335): OC\\Settings\\Controller\\CheckSetupController->isUsedTlsLibOutdated()\n#37 internal function: OC\\Settings\\Controller\\CheckSetupController->check()\n#38 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php(159): call_user_func_array(Array, Array)\n#39 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php(89): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OC\\Settings\\Controller\\CheckSetupController), 'check')\n#40 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/AppFramework\\/App.php(99): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OC\\Settings\\Controller\\CheckSetupController), 'check')\n#41 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/AppFramework\\/Routing\\/RouteActionHandler.php(46): OC\\AppFramework\\App::main('CheckSetupContr...', 'check', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#42 internal function: OC\\AppFramework\\Routing\\RouteActionHandler->_invoke(Array)\n#43 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/Route\\/Router.php(280): calluser_func(Object(OC\\AppFramework\\Routing\\RouteActionHandler), Array)\n#44 \\/var\\/www\\/html\\/owncloud\\/lib\\/base.php(891): OC\\Route\\Router->match('\\/settings\\/ajax\\/...')\n#45 \\/var\\/www\\/html\\/owncloud\\/index.php(54): OC::handleRequest()\n#46 {main}\",\"File\":\"\\/var\\/www\\/html\\/owncloud\\/3rdparty\\/guzzle\\/http\\/Guzzle\\/Http\\/Exception\\/BadResponseException.php\",\"Line\":43}","level":3,"time":"2016-12-19T13:26:56+00:00","method":"GET","url":"\/owncloud\/index.php\/settings\/ajax\/checksetup","user":"admin"}


#3

Did you check this yet?https://doc.owncloud.org/server/9.1/admin_manual/configuration_files/external_storage/openstack.html


#4

Yes i did, actually, i made some changes in the config. Looks like this now

'objectstore' => array(
'class' => 'OC\Files\ObjectStore\Swift',
'arguments' => array(
'username' => 'swift',
'password' => 'xxx',
'container' => 'MyCloud',
'autocreate' => true,
'region' => 'RegionOne',
'url' => 'http://X.X.X.X:5000/v3/auth',
'tenantName' => 'swift',
'serviceName' => 'swift',
'urlType' => 'internal'
),
),

And here the error in OC server

{"reqId":"WFf4oIt19AfpDT6qiosYpwAAAAo","remoteAddr":"200.89.90.253","app":"objectstore","message":"Could not create object: Client error response\n[status code] 400\n[reason phrase] Bad Request\n[url] http:\/\/200.89.90.1:5000\/v3\/auth\/tokens","level":3,"time":"2016-12-19T15:11:28+00:00","method":"POST","url":"\/owncloud\/index.php\/apps\/files\/ajax\/upload.php","user":"admin"}

Also, i got this error too in Openstack swift.

2016-12-19 11:25:37.084 26381 INFO keystone.common.wsgi [req-53f9098e-2f00-4c21-97c3-4c67e4612824 - - - - -] POST http://X.X.X.X:5000/v3/auth/tokens
2016-12-19 11:25:37.085 26381 WARNING keystone.common.wsgi [req-53f9098e-2f00-4c21-97c3-4c67e4612824 - - - - -] Expecting to find identity in auth - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error.

Any sugestions ?


#5

I am sorry but my knowledge on this topic is not really much into depth. Would you mind filing a detailed bug report on github?


#6

Thanks for you response,

Im going to make another tests before submit this topic into GitHub.

Regards