Asciinema: Upload schlägt mit "Broken Pipe" fehl

Erstellt am 28. Jan. 2019  ·  7Kommentare  ·  Quelle: asciinema/asciinema

$ asciinema upload /var/folders/v2/g27ngtds20zg60cy_f2jb_l80000gn/T/tmpub1dsng9-ascii.cast
asciinema: upload failed: <urlopen error [Errno 32] Broken pipe>
asciinema: retry later by running: asciinema upload /var/folders/v2/g27ngtds20zg60cy_f2jb_l80000gn/T/tmpub1dsng9-ascii.cast

Hier ist die App im tmp-Ordner

$ exa -l  /var/folders/v2/g27ngtds20zg60cy_f2jb_l80000gn/T/tmpub1dsng9-ascii.cast
.rw------- 5.8M user 28 Jan 16:33 /var/folders/v2/g27ngtds20zg60cy_f2jb_l80000gn/T/tmpub1dsng9-ascii.cast

Alle 7 Kommentare

Ich bin mir nicht sicher, warum Sie keine richtige Fehlermeldung erhalten, aber das Hochladen von Dateien ist auf 5 Mio. begrenzt. Siehe #91

Ja, das ist das Problem mit der Größenbeschränkung.

asciinema hat einen Fehlerhandler für den Status 413 (der in diesem Fall vom Webserver zurückgegeben wird), aber es scheint, dass er aufgrund der Funktionsweise der Python-URL nie richtig behandelt wird. Weitere Informationen zu dem Problem finden Sie hier: https://github.com/kennethreitz/requests/issues/2422#issuecomment -184012765

Hatte heute das gleiche Problem. Was halten Sie von einer Notlösung zur Ausgabe einer Warnung auf der Clientseite, wenn die hochzuladende Datei mehr als 5 Millionen groß ist?

Ich laufe regelmäßig deutlich unter der 5-Millionen-Grenze hinein.

[schwarzgerat](2) $ ls -l /tmp/user/1000/tmpaxpadd2n-ascii.cast 
-rw------- 1 dank dank 592498 2020-01-05 08:57 /tmp/user/1000/tmpaxpadd2n-ascii.cast
[schwarzgerat](0) $ asciinema upload /tmp/user/1000/tmpaxpadd2n-ascii.cast 
asciinema: upload failed: <urlopen error [Errno 32] Broken pipe>
asciinema: retry later by running: asciinema upload /tmp/user/1000/tmpaxpadd2n-ascii.cast
[schwarzgerat](1) $ 

Das sind nur 600K. Spielt perfekt lokal.

Kann hier reproduzieren:

$ asciinema upload display_sweep.cast
asciinema: upload failed: <urlopen error [Errno 32] Broken pipe>
asciinema: retry later by running: asciinema upload display_sweep.cast

$ ll -h display_sweep.cast
-rw-r--r-- 1 nicoo nicoo 2.3M Jan 14 21:29 display_sweep.cast

Das gleiche passiert auch bei kleineren Dateien. Ich habe versucht, mit curl zu reproduzieren, aber das hat gut funktioniert:

$ curl --http1.1 -v -u $USER:$(cat ~/.config/asciinema/install-id) https://asciinema.org/api/asciicasts -F asciicast=@display_sweep.cast
*   Trying 109.107.38.78:443...
* TCP_NODELAY set
* Connected to asciinema.org (109.107.38.78) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: CN=asciinema.org
*  start date: Jan 16 08:09:20 2020 GMT
*  expire date: Apr 15 08:09:20 2020 GMT
*  subjectAltName: host "asciinema.org" matched cert's "asciinema.org"
*  issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
*  SSL certificate verify ok.
* Server auth using Basic with user 'nicoo'
> POST /api/asciicasts HTTP/1.1
> Host: asciinema.org
> Authorization: Basic XXXXSECRETVALUEHERE
> User-Agent: curl/7.67.0
> Accept: */*
> Content-Length: 2332762
> Content-Type: multipart/form-data; boundary=------------------------8506bb168e19a8c6
> Expect: 100-continue
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
< HTTP/1.1 201 Created
< Cache-Control: max-age=0, private, must-revalidate
< Content-Length: 78
< Content-Type: text/plain; charset=utf-8
< Date: Fri, 17 Jan 2020 16:47:43 GMT
< Location: https://asciinema.org/a/ucRJ70xKSlhN1QlmMW0BdSUBf
< Server: Caddy
< Server: nginx
< Strict-Transport-Security: max-age=15768000
< X-Request-Id: 2nlbkv35ad6doecmo07jcdm2
< 
View the recording at:

    https://asciinema.org/a/ucRJ70xKSlhN1QlmMW0BdSUBf
* Connection #0 to host asciinema.org left intact

Dies scheint ein spezifisches Problem für den HTTP-API-Client von asciinema ; Ich bin darauf gestoßen, selbst als ich asciinema pip in einem neuen venv installiert habe; die lokale Python-Version ist 3.7.5 (wie in Debian 11/Testing verpackt)

Nicht sicher , warum Sie nicht eine entsprechende Fehlermeldung zu erhalten , aber es gibt 5M Grenze beim Hochladen von Dateien. Siehe #91

Dies sollte ein FAQ-Element sein.

Als ich sah, dass sich das "gebrochene Rohr" zweimal wiederholte, vermutete ich, dass meine 6,3-Millionen-Besetzung das Upload-Limit überschritten hatte.

Aber das Finden dieses Threads dauerte ... ähm ... 24 Minuten. Ungefähr 15 davon habe ich mit der discobot Zertifizierung herumgespielt, in der Hoffnung, dass ich die Frage damit im FAQ-Diskursabschnitt posten kann (hat es nicht).

Ich bekomme diesen Fehler mit einem kleinen:

``` sontek@hulk :/mnt/c/Users/sontek/code/snowmachine$ exit
Asciinema: Aufnahme beendet
Asciinema: drückenzum Hochladen auf asciinema.org,lokal speichern
asciinema: Upload fehlgeschlagen:
asciinema: Versuchen Sie es später erneut, indem Sie Folgendes ausführen: asciinema upload /tmp/tmpe_sntawl-ascii.cast
sontek@hulk :/mnt/c/Users/sontek/code/snowmachine$ du -sh /tmp/tmpe_sntawl-ascii.cast
184K /tmp/tmpe_sntawl-ascii.cast
sontek@hulk :/mnt/c/Users/sontek/code/snowmachine$

Tried uploading it later too:

sontek@hulk :/mnt/c/Users/sontek/code/snowmachine$ asciinema hochladen /tmp/tmpe_sntawl-ascii.cast
asciinema: Upload fehlgeschlagen:
asciinema: Versuchen Sie es später erneut, indem Sie Folgendes ausführen: asciinema upload /tmp/tmpe_sntawl-ascii.cast
```

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen

Verwandte Themen

bashfulrobot picture bashfulrobot  ·  11Kommentare

Edo78 picture Edo78  ·  5Kommentare

SR-Lut3t1um picture SR-Lut3t1um  ·  3Kommentare

deeplook picture deeplook  ·  10Kommentare

Bux42 picture Bux42  ·  9Kommentare