You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/07/31 10:08:50 UTC

[GitHub] [camel-k] pjcubero opened a new issue #1649: Caffeine with Knative doesn't work

pjcubero opened a new issue #1649:
URL: https://github.com/apache/camel-k/issues/1649


   I have two integrations, one with knative and other without. In the second one, if I add caffeine cache, it's working fine, but in the first one, if I add it, the integration is not deployed, and finish with error... Do you know if there is some issue if I want to use camel-caffeine with knative?
   
   Thanks.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] oscerd commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-667047267


   To be able to understand and eventually reproduce, please add a reproducer on github so we can try.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] lburgazzoli closed issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
lburgazzoli closed issue #1649:
URL: https://github.com/apache/camel-k/issues/1649


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] oscerd commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-667814957


   I think you need to explicitly pass the caffeine dependency. Why did you close this?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] oscerd commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-667913528


   Have a look at the camel-k example related to knative. I believe you're missing some bits.
   
   https://github.com/apache/camel-k-examples


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] pjcubero commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
pjcubero commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-669038980


   Ok, I have seen my problem, I had in a different namespace knative and camel, and now it's working.
   
   I have other question, if you can reply me... I want to create channels to communicate integrations itself, how can I create, because I create like Channel, and the status is unknown, must I to create like inMemoryChannel? Which is the right format?
   
   Thanks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] pjcubero closed issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
pjcubero closed issue #1649:
URL: https://github.com/apache/camel-k/issues/1649


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] pjcubero commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
pjcubero commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-667919274


   > > Have a look at the camel-k example related to knative. I believe you're missing some bits.
   > > https://github.com/apache/camel-k-examples
   > 
   > But the only thing that I have no installed is the kamel commands, the rest are ok. And if I execute this:
   > 
   > ./kubectl get integrationplatform
   > 
   > Tells me that camel-k is ready
   
   Other question, my laptop has 16 gb from RAM memory, it's one i5. Can be problem of memory?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] pjcubero commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
pjcubero commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-667911419


   > Do you have knative running on minikube?
   
   I installed minikube, and I executed this related with knative:
   
   ./kubectl apply --filename https://github.com/knative/serving/releases/download/v0.14.2/serving-crds.yaml 
   ./kubectl apply --filename https://github.com/knative/serving/releases/download/v0.14.2/serving-core.yaml 
   ./kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.14.2/eventing-crds.yaml
   ./kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.14.2/eventing-core.yaml
   
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] pjcubero commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
pjcubero commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-667053642


   Ok, this example is not working for me:
   
   public class getTokenextends RouteBuilder {
   
     @BindToRegistry
     public static Cache<String, String> cache() {
       return Caffeine.newBuilder()
       .expireAfterWrite(10, TimeUnit.SECONDS)
       .maximumSize(100)
       .build();
     }	
     
     @Override
     public void configure() throws Exception {
   
       from("knative:endpoint/get-token")
   		.to("caffeine-cache://ejemplo?cache=#cache&action=GET&key=token")
   		.log("Result of Action ${header.CamelCaffeineAction} with key ${header.CamelCaffeineKey} is: ${body}")
   
   
   But this is working fine for me:
   
   public class EjemploCache extends RouteBuilder {
   	@Override
   	public void configure() throws Exception {
   		from("timer:tick")
   			.setBody(constant("Hello"))
   			.setHeader("CamelCaffeineAction", constant("PUT"))
   			.setHeader("CamelCaffeineKey", constant("1"))
   			.toF("caffeine-cache://%s", "test")
   			.log("Result of Action ${header.CamelCaffeineAction} with key ${header.CamelCaffeineKey} is: ${body}")


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] oscerd commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-667924835


   In your example I don't see a files like this for example:
   https://github.com/apache/camel-k-examples/blob/master/07-aws-sqs-source-basic/aws-sqs-source.yaml
   https://github.com/apache/camel-k-examples/blob/master/07-aws-sqs-source-basic/aws-sqs-channel.yaml
   https://github.com/apache/camel-k-examples/blob/master/07-aws-sqs-source-basic/aws-sqs-consumer.groovy
   
   If you don't add the channel and source, knative won't work. Also I believe you're missing this file too.
   
   kubectl apply --filename https://github.com/knative/eventing-contrib/releases/download/v0.14.2/camel.yaml
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] pjcubero edited a comment on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
pjcubero edited a comment on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-669038980


   Ok, I have seen my problem, I had in a different namespace knative and camel, and now it's working.
   
   I have other question, if you can reply me... I want to create channels to communicate integrations itself, how can I create, because I create like Channel, and the status is unknown, must I to create like inMemoryChannel? Which is the right format?
   
   If I execute this:
   
   apiVersion: messaging.knative.dev/v1alpha1
   kind: InMemoryChannel
   metadata:
     name: creacionpac
     namespace: default
   
   I have this error:
   
   error: unable to recognize "integraciones/creacionpac.yaml": no matches for kind "InMemoryChannel" in version "messaging.knative.dev/v1alpha1"
   
   I'm using knative version 0.14.2
   
   Thanks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] pjcubero edited a comment on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
pjcubero edited a comment on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-667660569


   For example, If I run this integration:
   
   import org.apache.camel.builder.RouteBuilder;
   
   public class EjemploCache extends RouteBuilder {
   	@Override
   	public void configure() throws Exception {
   		from("timer:tick")
   			.setBody(constant("Hello"))
   			.setHeader("CamelCaffeineAction", constant("PUT"))
   			.setHeader("CamelCaffeineKey", constant("1"))
   			.toF("caffeine-cache://%s", "test")
   			.log("Result of Action ${header.CamelCaffeineAction} with key ${header.CamelCaffeineKey} is: ${body}")
   			.setBody(constant(null))
   			.setHeader("CamelCaffeineAction", constant("GET"))
   			.setHeader("CamelCaffeineKey", constant("1"))
   			.toF("caffeine-cache://%s", "test")
   			.log("Result of Action ${header.CamelCaffeineAction} with key ${header.CamelCaffeineKey} is: ${body}")
   			.setBody(constant(null))
   			.setHeader("CamelCaffeineAction", constant("INVALIDATE"))
   			.setHeader("CamelCaffeineKey", constant("1"))
   			.log("Invalidating entry with key ${header.CamelCaffeineKey}")
   			.toF("caffeine-cache://%s", "test")
   			.setHeader("CamelCaffeineAction", constant("GET"))
   			.setHeader("CamelCaffeineKey", constant("1"))
   			.toF("caffeine-cache://%s", "test")
   			.log("The Action ${header.CamelCaffeineAction} with key ${header.CamelCaffeineKey} has result? ${header.CamelCaffeineActionHasResult}");
     }
   }
   
   **it's working fine. But If I try to run this:**
   
   import org.apache.camel.builder.RouteBuilder;
   import org.apache.camel.BindToRegistry;
   
   import com.github.benmanes.caffeine.cache.Cache;
   import com.github.benmanes.caffeine.cache.Caffeine;
   
   import java.util.concurrent.TimeUnit;
   
   public class ConsumidorCambios extends RouteBuilder {
   
     @Override
     public void configure() throws Exception {    
   
         // Write your routes here, for example:
         from("knative:endpoint/consumidor-cambios")
           .to("caffeine-cache://ejemplo?cache=#cache&action=PUT&key=token")
           .setBody().simple("Hola Mundo")
           .log("Before Read Cache! ${body}")
           .to("caffeine-cache://ejemplo?cache=#cache&action=GET&key=token") // Puedes añadir o no el parámetro cache pero claro primero debe estar vinculado, es decir haber echo una acción previamente
           .log("Test! ${body}")
           .setBody()
             .simple("Respuesta desde el endpoint de cambios ${date:now}")
           .to("log:info");
   
     }
   }
   
   this is not deployed properly, and at the end I see the error: 
   
   **integration deployment failed**


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] pjcubero commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
pjcubero commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-667660569


   For example, If I run this integration:
   
   import org.apache.camel.builder.RouteBuilder;
   
   public class EjemploCache extends RouteBuilder {
   	@Override
   	public void configure() throws Exception {
   		from("timer:tick")
   			.setBody(constant("Hello"))
   			.setHeader("CamelCaffeineAction", constant("PUT"))
   			.setHeader("CamelCaffeineKey", constant("1"))
   			.toF("caffeine-cache://%s", "test")
   			.log("Result of Action ${header.CamelCaffeineAction} with key ${header.CamelCaffeineKey} is: ${body}")
   			.setBody(constant(null))
   			.setHeader("CamelCaffeineAction", constant("GET"))
   			.setHeader("CamelCaffeineKey", constant("1"))
   			.toF("caffeine-cache://%s", "test")
   			.log("Result of Action ${header.CamelCaffeineAction} with key ${header.CamelCaffeineKey} is: ${body}")
   			.setBody(constant(null))
   			.setHeader("CamelCaffeineAction", constant("INVALIDATE"))
   			.setHeader("CamelCaffeineKey", constant("1"))
   			.log("Invalidating entry with key ${header.CamelCaffeineKey}")
   			.toF("caffeine-cache://%s", "test")
   			.setHeader("CamelCaffeineAction", constant("GET"))
   			.setHeader("CamelCaffeineKey", constant("1"))
   			.toF("caffeine-cache://%s", "test")
   			.log("The Action ${header.CamelCaffeineAction} with key ${header.CamelCaffeineKey} has result? ${header.CamelCaffeineActionHasResult}");
     }
   }
   
   it's working fine. But If I try to run this:
   
   import org.apache.camel.builder.RouteBuilder;
   import org.apache.camel.BindToRegistry;
   
   import com.github.benmanes.caffeine.cache.Cache;
   import com.github.benmanes.caffeine.cache.Caffeine;
   
   import java.util.concurrent.TimeUnit;
   
   public class ConsumidorCambios extends RouteBuilder {
   
     @Override
     public void configure() throws Exception {    
   
         // Write your routes here, for example:
         from("knative:endpoint/consumidor-cambios")
           .to("caffeine-cache://ejemplo?cache=#cache&action=PUT&key=token")
           .setBody().simple("Hola Mundo")
           .log("Before Read Cache! ${body}")
           .to("caffeine-cache://ejemplo?cache=#cache&action=GET&key=token") // Puedes añadir o no el parámetro cache pero claro primero debe estar vinculado, es decir haber echo una acción previamente
           .log("Test! ${body}")
           .setBody()
             .simple("Respuesta desde el endpoint de cambios ${date:now}")
           .to("log:info");
   
     }
   }
   
   this is not deployed properly, and at the end I see the error: 
   
   **integration deployment failed**


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] pjcubero commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
pjcubero commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-667906631


   I don't know why I closed this. I have this two examples, attached.
   
   [examples.zip](https://github.com/apache/camel-k/files/5014954/examples.zip)
   
   ConsumidorCambios.java is a integration with cache and knative, and when I try to deploy with my local minikube, it's not working fine. But, the second, EjemploCache.java, it's one integration with cache and timer, and it's deployed fine and works fine. 
   
   Is there any way to know why the first it's not working fine? where can I see the error?
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] pjcubero commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
pjcubero commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-667918652


   > Have a look at the camel-k example related to knative. I believe you're missing some bits.
   > 
   > https://github.com/apache/camel-k-examples
   
   But the only thing that I have no installed is the kamel commands, the rest are ok. And if I execute this:
   
   ./kubectl get integrationplatform
   
   Tells me that camel-k is ready
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] lburgazzoli commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-676249224


   @pjcubero please open a new issue for the channel stuff (if it is still an issue)


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] oscerd commented on issue #1649: Caffeine with Knative doesn't work

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #1649:
URL: https://github.com/apache/camel-k/issues/1649#issuecomment-667925115


   Without logs or information we cannot answer questions about memory.


----------------------------------------------------------------
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:
users@infra.apache.org