-
Notifications
You must be signed in to change notification settings - Fork 187
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
Server aborts tus upload without error message when out of quota #4406
Comments
@individual-it add API tests for quota-validation responses? Should behave same as oC10? |
@michaelstingl oh man, we have no TUS API tests to check quota, added to our ToDo list |
@TheOneRing suspects more cases, where the connection is sometimes closed without proper HTTP status code (token expiration for example) |
@TheOneRing Hi I was trying to add some tests for this issue but it gives me correct HTTP status code create a project space as user1curl -u user1:123456 -vk -X POST "https://host.docker.internal:9200/graph/v1.0/drives/" -d '{"Name":"Project Jupiter","driveType":"project","quota":{"total":1000000000}}'
create a tus resourcecurl -vk -X POST -u user1:123456 'https://host.docker.internal:9200/remote.php/dav/spaces/<spaceid>' -H 'Tus-Resumable: 1.0.0' -H 'Upload-Length: 1584189756' -H 'Upload-Metadata: filename dGV4dEZpbGUudHh0' While trying to create a tus resource server replies with curl -vk -X POST -u user1:123456 'https://host.docker.internal:9200/remote.php/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157$57e3f44b-9d76-4d74-80d8-ab5f4bdf828f' -H 'Tus-Resumable: 1.0.0' -H 'Upload-Length: 1584189756' -H 'Upload-Metadata: filename dGV4dEZpbGUudHh0'
* Trying 127.0.0.1:9200...
* TCP_NODELAY set
* Connected to host.docker.internal (127.0.0.1) port 9200 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: O=Acme Corp; CN=OCIS
* start date: Aug 23 07:56:31 2022 GMT
* expire date: Aug 23 07:56:31 2023 GMT
* issuer: O=Acme Corp; CN=OCIS
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* Server auth using Basic with user 'user1'
> POST /remote.php/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157$57e3f44b-9d76-4d74-80d8-ab5f4bdf828f HTTP/1.1
> Host: host.docker.internal:9200
> Authorization: Basic dXNlcjE6MTIzNDU2
> User-Agent: curl/7.68.0
> Accept: */*
> Tus-Resumable: 1.0.0
> Upload-Length: 1584189756
> Upload-Metadata: filename dGV4dEZpbGUudHh0
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* Mark bundle as not supporting multiuse
< HTTP/1.1 507 Insufficient Storage
< Access-Control-Allow-Headers: Tus-Resumable, Upload-Length, Upload-Metadata, If-Match
< Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: Tus-Resumable, Location
< Content-Length: 0
< Content-Security-Policy: default-src 'none';
< Date: Tue, 23 Aug 2022 09:52:35 GMT
< Tus-Extension: creation,creation-with-upload,checksum,expiration
< Tus-Resumable: 1.0.0
< X-Content-Type-Options: nosniff
< X-Download-Options: noopen
< X-Frame-Options: SAMEORIGIN
< X-Permitted-Cross-Domain-Policies: none
< X-Robots-Tag: none
< X-Xss-Protection: 1; mode=block
I'll also make a PR adding tests coverage |
I could reproduce the issue locally and found that the only difference is the See the log from the desktop client:
Using curl with the |
This comment was marked as resolved.
This comment was marked as resolved.
Thanks, I missed the header. Behaves the same way for me as well with the |
I couldn't find any error in the backend and it only seems to happen when the Content-Length is smaller than the sent file size. So in my case the file was 1.3Gb but the Header was 1.0Gb
Edit: |
Then the error is, the backend just closes the connection, instead of responding with a meaningful status code and error message? What did oC10 respond in such cases? |
TUS is not implemented in oc10. Any thoughts here @individual-it @phil-davis? |
@corby When I set the content-length header and sent the data equal to the set content length then the request works as expected.
In this case it returns with Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 127.0.0.1:9200...
* TCP_NODELAY set
* Connected to host.docker.internal (127.0.0.1) port 9200 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: O=Acme Corp; CN=OCIS
* start date: Aug 25 05:48:55 2022 GMT
* expire date: Aug 25 05:48:55 2023 GMT
* issuer: O=Acme Corp; CN=OCIS
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* Server auth using Basic with user 'user1'
> POST /remote.php/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157$772cb6a0-33a1-447a-8e1c-73482f443476 HTTP/1.1
> Host: host.docker.internal:9200
> Authorization: Basic dXNlcjE6MTIzNDU2
> User-Agent: curl/7.68.0
> Accept: */*
> Tus-Resumable: 1.0.0
> Upload-Length: 15
> Upload-Metadata: filename dGV4dEZpbGUudHh0
> Content-length: 10
> Content-Type: application/offset+octet-stream
>
* upload completely sent off: 10 out of 10 bytes
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* Mark bundle as not supporting multiuse
< HTTP/1.1 507 Insufficient Storage
< Access-Control-Allow-Headers: Tus-Resumable, Upload-Length, Upload-Metadata, If-Match
< Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: Tus-Resumable, Location
< Content-Length: 0
< Content-Security-Policy: default-src 'none';
< Date: Thu, 25 Aug 2022 06:12:23 GMT
< Tus-Extension: creation,creation-with-upload,checksum,expiration
< Tus-Resumable: 1.0.0
< X-Content-Type-Options: nosniff
< X-Download-Options: noopen
< X-Frame-Options: SAMEORIGIN
< X-Permitted-Cross-Domain-Policies: none
< X-Robots-Tag: none
< X-Xss-Protection: 1; mode=block
<
* Connection #0 to host host.docker.internal left intact But if I send data lower that the set content length it hangs
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 127.0.0.1:9200...
* TCP_NODELAY set
* Connected to host.docker.internal (127.0.0.1) port 9200 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: O=Acme Corp; CN=OCIS
* start date: Aug 25 05:48:55 2022 GMT
* expire date: Aug 25 05:48:55 2023 GMT
* issuer: O=Acme Corp; CN=OCIS
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* Server auth using Basic with user 'user1'
> POST /remote.php/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157$772cb6a0-33a1-447a-8e1c-73482f443476 HTTP/1.1
> Host: host.docker.internal:9200
> Authorization: Basic dXNlcjE6MTIzNDU2
> User-Agent: curl/7.68.0
> Accept: */*
> Tus-Resumable: 1.0.0
> Upload-Length: 15
> Upload-Metadata: filename dGV4dEZpbGUudHh0
> Content-length: 10
> Content-Type: application/offset+octet-stream
>
* upload completely sent off: 9 out of 9 bytes
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): But if I send the data greater than the set content length it works again as expected, Also in the main issue it says that the connection closes but it just hangs for me? |
I mean quota violations in general, not TUS specific. |
Then |
Yeah true, in that case the server is probably waiting for the remaining data, which makes sense. |
@TheOneRing @C0rby Do we need a call to solve this? |
@TheOneRing @C0rby Is this fixed? Close? (my tests are always without quota) |
After a short discussion we found that the headers are actually correct. |
I can't really reproduce this issue. My guess is that the initial error was correlating with an expired token or something like that. That would explain the @michaelstingl, can we close this issue for now and work on the token refresh issue first? If afterwards this issue appears again we can re-open it. |
Describe the bug
A clear and concise description of what the bug is.
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
The server returns an http error code and an error message.
Actual behavior
The server closes the connection
Additional context
Add any other context about the problem here.
Client log:
Server log:
The text was updated successfully, but these errors were encountered: