jifa icon indicating copy to clipboard operation
jifa copied to clipboard

Upload from s3 failing with bad request 400

Open mmpetarpeshev opened this issue 2 years ago • 1 comments

I'm trying to upload file from s3 as all fields are correctly filled. Same parameters works find with aws cli. I tried and different regions, bellow is the jifa log:

starting bundle: org.apache.felix.scr_2.1.24.v20200924-1939 [6] starting bundle: org.eclipse.equinox.event_1.5.500.v20200616-0800 [120] starting bundle: org.eclipse.jifa.hda.implementation_1.0.0 [172] 2022-09-07 20:33:20.081 [vert.x-eventloop-thread-1] [INFO] Jifa-Worker startup successfully in 5150 ms, verticle count = 6, http server = 0.0.0.0:8102 2022-09-07 20:33:20.081 [vert.x-eventloop-thread-6] [INFO] Jifa-Worker startup successfully in 5152 ms, verticle count = 6, http server = 0.0.0.0:8102 2022-09-07 20:33:20.082 [vert.x-eventloop-thread-3] [INFO] Jifa-Worker startup successfully in 5144 ms, verticle count = 6, http server = 0.0.0.0:8102 2022-09-07 20:33:20.082 [vert.x-eventloop-thread-5] [INFO] Jifa-Worker startup successfully in 5149 ms, verticle count = 6, http server = 0.0.0.0:8102 2022-09-07 20:33:20.082 [vert.x-eventloop-thread-2] [INFO] Jifa-Worker startup successfully in 5152 ms, verticle count = 6, http server = 0.0.0.0:8102 2022-09-07 20:33:20.082 [vert.x-eventloop-thread-4] [INFO] Jifa-Worker startup successfully in 5145 ms, verticle count = 6, http server = 0.0.0.0:8102 2022-09-07 20:34:52.824 [vert.x-worker-thread-7] [ERROR] S3 transfer failed 2022-09-07 20:34:52.828 [vert.x-worker-thread-7] [ERROR] Handle http request failed org.eclipse.jifa.common.JifaException: com.amazonaws.services.s3.model.AmazonS3Exception: Bad Request (Service: Amazon S3; Status Code: 400; Error Code: 400 Bad Request; Request ID: 5FABTKTE4WJY35SX; S3 Extended Request ID: 8R66ZW4Caon2DHqgACSVZawo7bS+FOAamcCZtB1fhSnipg59KX5MjhvBNCLi0U5WEHn44dLBbyE=; Proxy: null), S3 Extended Request ID: 8R66ZW4Caon2DHqgACSVZawo7bS+FOAamcCZtB1fhSnipg59KX5MjhvBNCLi0U5WEHn44dLBbyE= at org.eclipse.jifa.worker.support.FileSupport.handleTransferError(FileSupport.java:527) ~[worker-1.0.jar:?] at org.eclipse.jifa.worker.support.FileSupport.transferByS3(FileSupport.java:506) ~[worker-1.0.jar:?] at org.eclipse.jifa.worker.route.FileRoute.transferByS3(FileRoute.java:132) ~[worker-1.0.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.eclipse.jifa.worker.route.RouteFiller.lambda$registerMethodRoute$0(RouteFiller.java:138) ~[worker-1.0.jar:?] at io.vertx.ext.web.impl.BlockingHandlerDecorator.lambda$handle$0(BlockingHandlerDecorator.java:48) ~[vertx-web-4.1.2.jar:4.1.2] at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:160) ~[vertx-core-4.1.2.jar:4.1.2] at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:96) ~[vertx-core-4.1.2.jar:4.1.2] at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:158) ~[vertx-core-4.1.2.jar:4.1.2] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.65.Final.jar:4.1.65.Final] at java.lang.Thread.run(Thread.java:829) [?:?]

mmpetarpeshev avatar Sep 07 '22 20:09 mmpetarpeshev

I'm not sure of the root cause, maybe there is a problem in our use way of the AWS s3 client. Could you make a test code from the following code to verify whether it works normally?

D-D-H avatar Sep 09 '22 06:09 D-D-H

I am facing the same problem. Can you specify the grammar of endpoint?

vivekko avatar Nov 21 '22 06:11 vivekko

Fixed it! Had to change few lines inside the code

vivekko avatar Nov 21 '22 20:11 vivekko

Fixed it! Had to change few lines inside the code

Appreciate it if you could create a PR.

D-D-H avatar Nov 22 '22 02:11 D-D-H

Sure! Link to PR

vivekko avatar Nov 24 '22 12:11 vivekko

Fixed in https://github.com/eclipse/jifa/pull/204

D-D-H avatar Nov 25 '22 08:11 D-D-H