Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JVM issue on Minikube while running Sample.java integration using 0.2.0 release of Kamel binary #424

Closed
anik120 opened this issue Feb 12, 2019 · 3 comments

Comments

@anik120
Copy link

anik120 commented Feb 12, 2019

I started by getting a minikube environment up and running by using minikube start. I then enabled the registry addon by using minikube addons enable registry.

I then installed the operator into a namespace called operators by using kamel install -n operators which showed be the output "Camel K installed in namespace operators".

Doing an kubectl get pods -n operators shows me that the operator is running :

NAME                                           READY     STATUS    RESTARTS   AGE
camel-k-operator-55445dc59c-6mhgq               1/1     Running       0       1h

I then tried to run an integration using kamel run examples/Sample.java which was noticed by the operator:

$ kubectl logs camel-k-operator-55445dc59c-6mhgq  

time="2019-02-12T02:30:00Z" level=info msg="Inform integrations about context ctx-bhh2va7ltpam33v5096g state change"
{"level":"info","ts":1549938600.9991944,"logger":"controller_integration","msg":"Reconciling Integration","Request.Namespace":"operators","Request.Name":"sample"}
time="2019-02-12T02:30:01Z" level=info msg="Apply trait: deployment"
time="2019-02-12T02:30:01Z" level=info msg="Apply trait: owner"
time="2019-02-12T02:30:01Z" level=info msg="Integration sample transitioning to state Deploying"
{"level":"info","ts":1549938601.1018343,"logger":"controller_integration","msg":"Reconciling Integration","Request.Namespace":"operators","Request.Name":"sample"}

I could also see that the integration pod was created but with an error:

$ kubectl get pods
NAME                               READY     STATUS        RESTARTS   AGE
camel-k-operator-55445dc59c-6mhgq   1/1       Running       0          1h
sample-6c777c5bcd-2q7k5          0/1       CrashLoopBackOff   5          1h

When I log the sample pod I see the following error:

 $ kubectl logs sample-6c777c5bcd-2q7k5
 
Starting the Java application using /opt/run-java/run-java.sh ...
exec java -javaagent:/opt/prometheus/jmx_prometheus_javaagent.jar=9779:/opt/prometheus/prometheus-config.yml -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:+ExitOnOutOfMemoryError -cp /etc/camel/resources:./resources org.apache.camel.k.jvm.Application
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Error: Could not find or load main class org.apache.camel.k.jvm.Application
@astefanutti
Copy link
Member

I've successfully executed kamel run examples/Sample.java with Minikube 0.34.1, Kubernetes 1.13.3 and latest Camel K version:

$ kubectl logs sample-7fd4b9bcd4-p5bhk
Starting the Java application using /opt/run-java/run-java.sh ...
exec java -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:+ExitOnOutOfMemoryError -cp /etc/camel/resources:./resources:dependencies/org.apache.camel.k.camel-k-runtime-jvm-0.3.0-SNAPSHOT.jar:dependencies/org.apache.camel.k.camel-k-runtime-core-0.3.0-SNAPSHOT.jar:dependencies/org.apache.logging.log4j.log4j-core-2.11.1.jar:dependencies/org.apache.logging.log4j.log4j-api-2.11.1.jar:dependencies/org.apache.logging.log4j.log4j-slf4j-impl-2.11.1.jar:dependencies/org.jooq.joor-java-8-0.9.10.jar:dependencies/commons-io.commons-io-2.6.jar:dependencies/org.apache.commons.commons-lang3-3.8.1.jar:dependencies/org.apache.camel.camel-core-2.23.1.jar:dependencies/org.slf4j.slf4j-api-1.7.25.jar:dependencies/com.sun.xml.bind.jaxb-core-2.3.0.jar:dependencies/com.sun.xml.bind.jaxb-impl-2.3.0.jar org.apache.camel.k.jvm.Application
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
2019-02-20 16:25:52.408 INFO  [main] RoutesConfigurer - Loading routes from: file:/etc/camel/sources/Sample.java?language=java
2019-02-20 16:25:55.254 INFO  [main] DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-k) is starting
2019-02-20 16:25:55.262 INFO  [main] ManagedManagementStrategy - JMX is enabled
2019-02-20 16:25:55.968 INFO  [main] DefaultTypeConverter - Type converters loaded (core: 195, classpath: 0)
2019-02-20 16:25:56.448 INFO  [main] DefaultCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
2019-02-20 16:25:56.628 INFO  [main] DefaultCamelContext - Route: route1 started and consuming from: timer://tick
2019-02-20 16:25:56.638 INFO  [main] DefaultCamelContext - Total 1 routes, of which 1 are started
2019-02-20 16:25:56.642 INFO  [main] DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-k) started in 1.385 seconds

Could you please give it another try with the latest Camel K 0.2.1 release?

@anik120
Copy link
Author

anik120 commented Feb 20, 2019

Hey @astefanutti looks like this is fixed in the Camel K 0.2.1 release. Thanks for the update!

@astefanutti
Copy link
Member

@anik120 thanks for the quick feedback. I think this issue can be closed then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants