kubemq-io/kubemq-Java

Error in running example

cogmeta opened this issue · 2 comments

21:07:40.923 [main] DEBUG i.k.s.e.commonexample.BaseExample - Start Creating Event
21:07:41.029 [main] INFO i.k.sdk.basic.ConfigurationLoader - KubeMQ Server address found in Environment: 127.0.0.1:30681
21:07:41.029 [main] INFO io.kubemq.sdk.basic.GrpcClient - constructing channel to KubeMQ on 127.0.0.1:30681
Exception in thread "main" java.lang.IllegalArgumentException: File does not contain valid certificates:
at io.grpc.netty.shaded.io.netty.handler.ssl.SslContextBuilder.trustManager(SslContextBuilder.java:182)
at io.kubemq.sdk.basic.GrpcClient.constructChannel(GrpcClient.java:119)
at io.kubemq.sdk.basic.GrpcClient.GetKubeMQClient(GrpcClient.java:68)
at io.kubemq.sdk.event.lowlevel.Sender.SendEvent(Sender.java:70)
at io.kubemq.sdk.examples.eventsender.EventSender.SendLowLevelMessages(EventSender.java:43)
at io.kubemq.sdk.examples.eventsender.EventSender.(EventSender.java:37)
at io.kubemq.sdk.examples.eventsender.Program.main(Program.java:41)
Caused by: java.security.cert.CertificateException: could not find certificate file:
at io.grpc.netty.shaded.io.netty.handler.ssl.PemReader.readCertificates(PemReader.java:69)
at io.grpc.netty.shaded.io.netty.handler.ssl.SslContext.toX509Certificates(SslContext.java:1071)
at io.grpc.netty.shaded.io.netty.handler.ssl.SslContextBuilder.trustManager(SslContextBuilder.java:180)
... 6 more

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':examples:eventSender'.

Process 'command '/usr/lib/jvm/java-8-openjdk-amd64/bin/java'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s
9 actionable tasks: 1 executed, 8 up-to-date

created insecure channel...works.

phyze commented

how can i set insecure channel ?