nicolaferraro opened a new issue #634:
URL: https://github.com/apache/camel-k-runtime/issues/634


   I've just added a webhook-source Kamelet in 
https://github.com/apache/camel-kamelets/pull/14.
   
   When bound with the following binding:
   
   ```yaml
   apiVersion: camel.apache.org/v1alpha1
   kind: KameletBinding
   metadata:
     name: webhook-source-binding
   spec:
     source:
       ref:
         kind: Kamelet
         apiVersion: camel.apache.org/v1alpha1
         name: webhook-source
     sink:
       uri: log:info
   ```
   
   I've noticed that if I call it with:
   
   ```
   curl -X POST -d Ciao -H "Content-Type: text/plain" 
http://my-route-dns/webhook/
   ```
   
   ... then everything goes fine. But without the content-type:
   
   ```
   curl -X POST -d Ciao http://my-route-dns/webhook/
   ```
   
   Then it fails because it probably tries to store some temp data in an 
illegal location.
   
   Maybe the content is interpreted as a binary file and there's some caching 
mechanism in place. Maybe we should use a writable dir for that.
   
   ```
   webhook-source-binding-55dbdddd6d-jfv8j integration 2021-02-19 14:31:50,135 
ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (vert.x-eventloop-thread-0) HTTP 
Request to /webhook/ failed, error id: 046ee4d5-2e80-481e-ace5-cc3d542fa723-1: 
io.vertx.core.file.FileSystemException: java.nio.file.AccessDeniedException: 
/deployments/file-uploads
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.file.impl.FileSystemImpl$12.perform(FileSystemImpl.java:747)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.file.impl.FileSystemImpl$12.perform(FileSystemImpl.java:729)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.file.impl.FileSystemImpl.mkdirsBlocking(FileSystemImpl.java:249)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.ext.web.handler.impl.BodyHandlerImpl$BHandler.makeUploadDir(BodyHandlerImpl.java:236)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.ext.web.handler.impl.BodyHandlerImpl$BHandler.<init>(BodyHandlerImpl.java:181)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.ext.web.handler.impl.BodyHandlerImpl.handle(BodyHandlerImpl.java:85)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.ext.web.handler.impl.BodyHandlerImpl.handle(BodyHandlerImpl.java:42)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.quarkus.vertx.http.runtime.VertxHttpRecorder$16.handle(VertxHttpRecorder.java:1094)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.quarkus.vertx.http.runtime.VertxHttpRecorder$16.handle(VertxHttpRecorder.java:1067)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1036)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:131)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:132)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.quarkus.vertx.http.runtime.VertxHttpRecorder$4.handle(VertxHttpRecorder.java:322)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.quarkus.vertx.http.runtime.VertxHttpRecorder$4.handle(VertxHttpRecorder.java:300)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1036)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:131)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:132)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:54)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:36)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.quarkus.vertx.http.runtime.VertxHttpRecorder$9.handle(VertxHttpRecorder.java:412)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.quarkus.vertx.http.runtime.VertxHttpRecorder$9.handle(VertxHttpRecorder.java:409)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.quarkus.vertx.http.runtime.VertxHttpRecorder$1.handle(VertxHttpRecorder.java:141)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.quarkus.vertx.http.runtime.VertxHttpRecorder$1.handle(VertxHttpRecorder.java:126)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.http.impl.WebSocketRequestHandler.handle(WebSocketRequestHandler.java:50)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.http.impl.WebSocketRequestHandler.handle(WebSocketRequestHandler.java:32)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.http.impl.Http1xServerConnection.handleMessage(Http1xServerConnection.java:136)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:366)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:43)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:229)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:163)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.handler.codec.http.websocketx.extensions.WebSocketServerExtensionHandler.channelRead(WebSocketServerExtensionHandler.java:101)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.http.impl.Http1xUpgradeToH2CHandler.channelRead(Http1xUpgradeToH2CHandler.java:109)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:311)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:425)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.http.impl.Http1xOrH2CHandler.end(Http1xOrH2CHandler.java:61)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.http.impl.Http1xOrH2CHandler.channelRead(Http1xOrH2CHandler.java:38)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
java.base/java.lang.Thread.run(Thread.java:834)
   webhook-source-binding-55dbdddd6d-jfv8j integration Caused by: 
java.nio.file.AccessDeniedException: /deployments/file-uploads
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
java.base/java.nio.file.Files.createDirectory(Files.java:690)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:797)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
java.base/java.nio.file.Files.createDirectories(Files.java:783)
   webhook-source-binding-55dbdddd6d-jfv8j integration     at 
io.vertx.core.file.impl.FileSystemImpl$12.perform(FileSystemImpl.java:737)
   webhook-source-binding-55dbdddd6d-jfv8j integration     ... 74 more
   webhook-source-binding-55dbdddd6d-jfv8j integration 
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to