Skip to content

Instantly share code, notes, and snippets.

@jlevon
Last active June 17, 2019 14:22
Show Gist options
  • Save jlevon/cca9df07c5cf3888d372a4638d78fc71 to your computer and use it in GitHub Desktop.
Save jlevon/cca9df07c5cf3888d372a4638d78fc71 to your computer and use it in GitHub Desktop.
testing java-manta-cli with restarted haproxy
$ java -jar java-manta-cli/target/java-manta-cli-3.4.1-SNAPSHOT-jar-with-dependencies.jar put-file --log-level=INFO /var/tmp/4g.file /poseidon/stor/4g.file.23
13:46:53.043 [main] INFO c.j.m.c.c.ExternalSecurityProviderLoader - Security provider chosen for CSE: BC version 1.61
13:46:53.144 [main] WARN c.j.m.h.MantaSSLConnectionSocketFactory - Configuration: tlsInsecure is true. ALL TLS VERIFICATION IS DISABLED!
13:47:04.634 [main] INFO c.j.m.o.a.h.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {s}->https://manta.emy-15.joyent.us:443: Broken pipe (Write failed)
13:47:04.635 [main] INFO c.j.m.o.a.h.impl.execchain.RetryExec - Retrying request to {s}->https://manta.emy-15.joyent.us:443
13:47:33.896 [main] INFO c.j.m.o.a.h.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {s}->https://manta.emy-15.joyent.us:443: Broken pipe (Write failed)
13:47:33.897 [main] INFO c.j.m.o.a.h.impl.execchain.RetryExec - Retrying request to {s}->https://manta.emy-15.joyent.us:443
The above is doing "svcadm restart haproxy"
A get will only retry if continuations are configured:
https://github.com/joyent/java-manta/blob/master/USAGE.md#download-continuation
export MANTA_DOWNLOAD_CONTINUATION=40
$ java -jar java-manta-cli/target/java-manta-cli-3.4.1-SNAPSHOT-jar-with-dependencies.jar get-file --log-level=INFO -o /var/tmp/4g.file.1 /poseidon/stor/4g.file
13:50:44.590 [main] INFO c.j.m.c.c.ExternalSecurityProviderLoader - Security provider chosen for CSE: BC version 1.61
13:50:44.686 [main] WARN c.j.m.h.MantaSSLConnectionSocketFactory - Configuration: tlsInsecure is true. ALL TLS VERIFICATION IS DISABLED!
otherwise:
Exception in thread "main" java.io.UncheckedIOException: com.joyent.manta.org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 4,294,967,296; received: 6,587,815)
at com.joyent.manta.cli.MantaCLI$GetFile.run(MantaCLI.java:314)
at com.joyent.manta.cli.MantaCLI.main(MantaCLI.java:120)
Caused by: com.joyent.manta.org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 4,294,967,296; received: 6,587,815)
at com.joyent.manta.org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
at com.joyent.manta.org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
at com.joyent.manta.org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:148)
at com.joyent.manta.client.MantaObjectInputStream.read(MantaObjectInputStream.java:177)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2314)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
at com.joyent.manta.cli.MantaCLI$GetFile.run(MantaCLI.java:306)
... 1 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment