Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download of files gives HTTP 500 #34

Closed
glpatcern opened this issue Aug 12, 2023 · 3 comments
Closed

Download of files gives HTTP 500 #34

glpatcern opened this issue Aug 12, 2023 · 3 comments

Comments

@glpatcern
Copy link
Member

When marie@ownCloud attempts to download a file from the remote site with reva in between, the download operation fails with HTTP 500.

The "local" ownCloud2 for marie logs the following:

{"reqId":"qtT7l4H10Uh7vp2yzFIp","level":4,"time":"2023-08-12T15:32:10+00:00","remoteAddr":"172.20.0.3","user":"marie","app":"webdav","method":"GET","url":"\/remote.php\/webdav\/SharedTomarie\/testfile?down
loadStartSecret=9qzpyg70txr","message":"Caused by: {\"Exception\":\"GuzzleHttp\\\\Exception\\\\ConnectException\",\"Message\":\"Connection refused for URI https:\\\/\\\/revaowncloud1.docker\\\/remote.php\\
\/dav\\\/ocm\\\/testfile\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Handler\\\/StreamHandler.php(241): GuzzleHttp\\\\Handler\\\\StreamHandler->G
uzzleHttp\\\\Handler\\\\{closure}(*** sensitive parameters replaced ***)\\n#1 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Handler\\\/StreamHandler.php(339): GuzzleHttp\\\\Ha
ndler\\\\StreamHandler->createResource()\\n#2 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Handler\\\/StreamHandler.php(58): GuzzleHttp\\\\Handler\\\\StreamHandler->createStr
eam()\\n#3 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Handler\\\/Proxy.php(48): GuzzleHttp\\\\Handler\\\\StreamHandler->__invoke()\\n#4 \\\/var\\\/www\\\/html\\\/lib\\\/com
poser\\\/guzzlehttp\\\/guzzle\\\/src\\\/PrepareBodyMiddleware.php(35): GuzzleHttp\\\\Handler\\\\Proxy::GuzzleHttp\\\\Handler\\\\{closure}(*** sensitive parameters replaced ***)\\n#5 \\\/var\\\/www\\\/html\
\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Middleware.php(31): GuzzleHttp\\\\PrepareBodyMiddleware->__invoke()\\n#6 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Red
irectMiddleware.php(71): GuzzleHttp\\\\Middleware::GuzzleHttp\\\\{closure}(*** sensitive parameters replaced ***)\\n#7 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Middleware
.php(63): GuzzleHttp\\\\RedirectMiddleware->__invoke()\\n#8 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/HandlerStack.php(75): GuzzleHttp\\\\Middleware::GuzzleHttp\\\\{closur
e}(*** sensitive parameters replaced ***)\\n#9 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(331): GuzzleHttp\\\\HandlerStack->__invoke()\\n#10 \\\/var\\\/www\\\/ht
ml\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(168): GuzzleHttp\\\\Client->transfer()\\n#11 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(187):
GuzzleHttp\\\\Client->requestAsync()\\n#12 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/ClientTrait.php(44): GuzzleHttp\\\\Client->request()\\n#13 \\\/var\\\/www\\\/html\\\/l
ib\\\/private\\\/Http\\\/Client\\\/Client.php(184): GuzzleHttp\\\\Client->get()\\n#14 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/Files\\\/Storage\\\/DAV.php(359): OC\\\\Http\\\\Client\\\\Client->get()\\n#
15 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(302): OC\\\\Files\\\\Storage\\\\DAV->fopen()\\n#16 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/Files\\\/Storage\\\/
Wrapper\\\/Availability.php(317): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen()\\n#17 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Checksum.php(58): OC\\\\Files\\\\Sto
rage\\\\Wrapper\\\\Availability->fopen()\\n#18 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(302): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Checksum->fopen()\\n#19 \\\/
var\\\/www\\\/html\\\/lib\\\/private\\\/Files\\\/View.php(1223): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen()\\n#20 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/Files\\\/View.php(1070): OC\\\\Files
\\\\View->basicOperation()\\n#21 \\\/var\\\/www\\\/html\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(431): OC\\\\Files\\\\View->fopen()\\n#22 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/sabre\\
\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(85): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->get()\\n#23 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(89): Sabre\\\
\DAV\\\\CorePlugin->httpGet()\\n#24 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(472): Sabre\\\\DAV\\\\Server->emit()\\n#25 \\\/var\\\/www\\\/html\\\/lib\\\/compose
r\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(253): Sabre\\\\DAV\\\\Server->invokeMethod()\\n#26 \\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(321): Sabre\\\\DAV\\\\
Server->start()\\n#27 \\\/var\\\/www\\\/html\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(67): Sabre\\\\DAV\\\\Server->exec()\\n#28 \\\/var\\\/www\\\/html\\\/remote.php(165): require_once('\\\/var\\\/www\
\\/html\\\/a...')\\n#29 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Handler\\\/StreamHandler.php\",\"Line\":328}"}

The remote server is reva, and it got a PROPFIND equivalent to:

curl -X PROPFIND 'https://5FHHoEGbQ7wKpM1rHM1R0paZRKxDiKcv:@revaowncloud1.docker/remote.php/dav/ocm/testfile'

(the secret being the correct OCM sharedSecret)

to which it correctly answered:

<?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/remote.php/dav/ocm/testfile</d:href><d:propstat><d:prop><oc:id>nextcloud!fileid-/home/SharedTomarie/testfile</oc:id><oc:fileid>nextcloud!fileid-/home/SharedTomarie/testfile</oc:fileid><d:getetag>&#34;deadbeef&#34;</d:getetag><d:resourcetype></d:resourcetype><d:getcontentlength>33</d:getcontentlength><d:getcontenttype>application/octet-stream</d:getcontenttype><d:getlastmodified>Mon, 07 Aug 2023 10:09:44 GMT</d:getlastmodified><oc:checksums><oc:checksum>INVALID:</oc:checksum></oc:checksums><oc:favorite>0</oc:favorite></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/ocm</d:href><d:propstat><d:prop><oc:id>nextcloud!fileid-/home/SharedTomarie/testfile</oc:id><oc:fileid>nextcloud!fileid-/home/SharedTomarie/testfile</oc:fileid><d:getetag>&#34;deadbeef&#34;</d:getetag><d:resourcetype></d:resourcetype><d:getcontentlength>33</d:getcontentlength><d:getcontenttype>application/octet-stream</d:getcontenttype><d:getlastmodified>Mon, 07 Aug 2023 10:09:44 GMT</d:getlastmodified><oc:checksums><oc:checksum>INVALID:</oc:checksum></oc:checksums><oc:favorite>0</oc:favorite></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>

It's not clear why after the PROPFIND, ownCloud2 got the Connection refused for URI https:\\\/\\\/revaowncloud1.docker\\\/remote.php\\\/dav\\\/ocm\\\/testfile.

@MahdiBaghbani
Copy link
Member

MahdiBaghbani commented Aug 14, 2023

Related to:
owncloud/core#40594
pondersource#277
SURFnet/rd-sram-integration#169
SURFnet/rd-sram-integration#189

This is probably caused by self-signed certificates in our setup and ownCloud doesn't like self-signed certificates 😄

@MahdiBaghbani
Copy link
Member

MahdiBaghbani commented Aug 14, 2023

@yasharpm has already solved the mystery, it's not related to PHP code, but it is related self-signed certificates and the fact that ownCloud root certificate need a bit of tinkering to work.

see this comment.

I'll open a PR for sciencemesh example on Reva.

@MahdiBaghbani
Copy link
Member

fixed.

Marie can see(download) the shared objects without errors.

Screenshot 2023-08-14 235147

glpatcern pushed a commit to cs3org/reva that referenced this issue Aug 15, 2023
* fix: downloading remote files gives HTTP 500

related to sciencemesh/nc-sciencemesh#34

* add: changelog for the pull request

* remove punctuation from title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants