issue while integration jgroup kubernetes jar

571 views
Skip to first unread message

Roshni Gupta

unread,
Jul 30, 2021, 3:02:29 AM7/30/21
to jgroups-dev
Hi Bela,

I'm getting issues while integrating jgroups kubernetes jar :

1. Below is the file we are using for Jchannel configuration. This file is showing error because it's unable to find KUBE_PING in jgroups.xsd. Please provide xsd for jgroup kubernetes.

 

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns="urn:org:jgroups" xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">

<TCP_NIO2 bind_port="8800" diagnostics_port="10599"

port_range="950" recv_buf_size="${tcp.recv_buf_size:230k}"

send_buf_size="${tcp.send_buf_size:230k}" max_bundle_size="64K"

sock_conn_timeout="300" thread_pool.min_threads="0"

thread_pool.max_threads="980" thread_pool.keep_alive_time="70000" />

<org.jgroups.protocols.kubernetes.KUBE_PING

namespace="my_namespace" labels="my_labels" />

......

</config>

 

2. In our project , we have created a fat jar of jgroups-kubernetes-1.0.15.Final which is includes all package(jgroup standards and k8s) but still it's unable to find KUBE_PING, it's going to find out from org.jgroup.4.2.0.jar instead of jgroups-kubernetes-1.0.15.Final-E003.jar(which includeds jgroup standard and kubernetes jar)

 

Caused by: java.lang.Exception: JGRP000002: unable to load protocol org.jgroups.protocols.kubernetes.KUBE_PING (either with relative - org.jgroups.protocols.kubernetes.KUBE_PING - or absolute - org.jgroups.protocols.org.jgroups.protocols.kubernetes.KUBE_PING - class name)

at org.jgroups.util.Util.loadProtocolClass(Util.java:2904)

Please let know how can resolve this.


Thanks,

Roshni Gupta

Bela Ban

unread,
Jul 30, 2021, 3:17:41 AM7/30/21
to jgrou...@googlegroups.com
Hi Roshni

On 30.07.21 09:02, Roshni Gupta wrote:
> Hi Bela,
>
> I'm getting issues while integrating jgroups kubernetes jar :
>
> 1. Below is the file we are using for Jchannel configuration. This file
> is showing error because it's unable to find KUBE_PING in jgroups.xsd.
> Please provide xsd for jgroup kubernetes.


There is no XSD for KUBE_PING. However, you can generate the schema
yourself by including KUBE_PING in the classpath and running 'ant
make-schema' (or XmlSchemaGenerator)

Before you do that you have to change [1] to include the "kubernetes"
package in the src code. Recompile and run.
It seems your fat JAR is incorrect: does javap -cp fat.jar
org.jgroups.protocols.kubernetes.KUBE_PING find the class?

Also try <kubernetes.KUBE_PING/> instead of the full classname


> at org.jgroups.util.Util.loadProtocolClass(Util.java:2904)
>
> Please let know how can resolve this.

[1]
https://github.com/belaban/JGroups/blob/master/src/org/jgroups/util/XMLSchemaGenerator.java#L39


>
>
> Thanks,
>
> Roshni Gupta
>
> --
> You received this message because you are subscribed to the Google
> Groups "jgroups-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jgroups-dev...@googlegroups.com
> <mailto:jgroups-dev...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jgroups-dev/87fbbd30-425f-4da3-9e09-7ba15000dec6n%40googlegroups.com
> <https://groups.google.com/d/msgid/jgroups-dev/87fbbd30-425f-4da3-9e09-7ba15000dec6n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Bela Ban | http://www.jgroups.org

Roshni Gupta

unread,
Jul 30, 2021, 4:22:10 AM7/30/21
to jgroups-dev
Hi Bela,

1. does javap -cp fat.jar
org.jgroups.protocols.kubernetes.KUBE_PING find the class? - yes

2. below are dependency tree of fat jar :
[INFO] org.jgroups.kubernetes:jgroups-kubernetes:bundle:1.0.15.Final-E003

[INFO] +- org.jgroups:jgroups:jar:4.2.0.Final:compile

[INFO] +- junit:junit:jar:4.13:test

[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test

[INFO] \- org.assertj:assertj-core:jar:3.15.0:test

Thanks ,

Roshni Gupta

Bela Ban

unread,
Jul 30, 2021, 4:51:17 AM7/30/21
to jgrou...@googlegroups.com
Hi Roshni

I suggest run the JVM with -verbose:class, to see what fails. This is
not really a JGroups problem, but a Java issue.
Cheers
> <https://groups.google.com/d/msgid/jgroups-dev/87fbbd30-425f-4da3-9e09-7ba15000dec6n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/jgroups-dev/87fbbd30-425f-4da3-9e09-7ba15000dec6n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Bela Ban | http://www.jgroups.org <http://www.jgroups.org>
>
> --
> You received this message because you are subscribed to the Google
> Groups "jgroups-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jgroups-dev...@googlegroups.com
> <mailto:jgroups-dev...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jgroups-dev/226a135f-2750-4a50-8081-8141890e2f4en%40googlegroups.com
> <https://groups.google.com/d/msgid/jgroups-dev/226a135f-2750-4a50-8081-8141890e2f4en%40googlegroups.com?utm_medium=email&utm_source=footer>.

Roshni Gupta

unread,
Aug 13, 2021, 1:02:03 AM8/13/21
to jgroups-dev
Hi Bela,

I'm getting below issue :

o.j.protocols.kubernetes.KUBE_PING - failed getting JSON response from Kubernetes Client[masterUrl=https://null:0/api/v1,; encountered [java.lang.Exception: 3 attempt(s) with a 1000ms sleep to execute [OpenStream] failed. Last failure was [java.net.UnknownHostException: null]]


Could you please tell me what's the reason behind it.

Thanks,

Roshni



Roshni Gupta

unread,
Aug 13, 2021, 3:52:49 AM8/13/21
to jgroups-dev
Hi Bela,
I'm stuck on this

Thanks,
Roshni

Roshni Gupta

unread,
Aug 16, 2021, 1:57:24 AM8/16/21
to jgroups-dev

Bela Ban

unread,
Aug 16, 2021, 9:38:50 AM8/16/21
to jgrou...@googlegroups.com
Obviously, attribute masterHost is not set in your environment, so
KUBE_PING doesn't know to which host to connect. This can be fixed by
either setting the Kubernetes host via masterHost, or setting system
prop KUBERNETES_SERVICE_HOST.

You could also enable dump_requests, to see what the JSON request looks
like, e.g.:
<KUBE_PING masterHost="192.168.1.1" dump_requests="true".../>
> <https://groups.google.com/d/msgid/jgroups-dev/226a135f-2750-4a50-8081-8141890e2f4en%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/jgroups-dev/226a135f-2750-4a50-8081-8141890e2f4en%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Bela Ban | http://www.jgroups.org <http://www.jgroups.org>
>
> --
> You received this message because you are subscribed to the Google
> Groups "jgroups-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jgroups-dev...@googlegroups.com
> <mailto:jgroups-dev...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jgroups-dev/353854dc-9c31-4406-9951-0c9a96f39baan%40googlegroups.com
> <https://groups.google.com/d/msgid/jgroups-dev/353854dc-9c31-4406-9951-0c9a96f39baan%40googlegroups.com?utm_medium=email&utm_source=footer>.
Message has been deleted

Roshni Gupta

unread,
Sep 2, 2021, 7:58:45 AM9/2/21
to jgroups-dev
Hi Bela,

I have included both jar org.jgroups.4.2.10 and jgroups-kubernetes-1.0.15.Final jar but Getting below error :

Caused by: java.lang.Exception: JGRP000002: unable to load protocol org.jgroups.protocols.kubernetes.KUBE_PING (either with relative - org.jgroups.protocols.kubernetes.KUBE_PING - or absolute - org.jgroups.protocols.org.jgroups.protocols.kubernetes.KUBE_PING - class name)

at org.jgroups.util.Util.loadProtocolClass(Util.java:2904)

Could you please help me on this.


Thanks,

Roshni


Bela Ban

unread,
Sep 2, 2021, 8:12:44 AM9/2/21
to jgrou...@googlegroups.com

Roshni Gupta

unread,
Sep 21, 2021, 5:46:15 AM9/21/21
to jgroups-dev
Hi Bela,

Can we include kubeping source code into org.jgroup jar ?

Thanks ,
Roshni 

Roshni Gupta

unread,
Sep 21, 2021, 5:52:36 AM9/21/21
to jgroups-dev
HI Bela ,
One more thing , how can we compile org.jgroup4.2.10 source code

Thanks ,
Roshni

Bela Ban

unread,
Sep 21, 2021, 6:05:59 AM9/21/21
to jgrou...@googlegroups.com

Bela Ban

unread,
Sep 21, 2021, 6:06:20 AM9/21/21
to jgrou...@googlegroups.com

Roshni Gupta

unread,
Sep 21, 2021, 6:43:36 AM9/21/21
to jgroups-dev
Hi Bela,

I want to combine kubeping into org.jgroup as a fat jar so that we don't need separate jar for kubeping.

One more thing , what was the reason to keep separate kube ping from org.jgroup ?

Bela Ban

unread,
Sep 21, 2021, 6:48:13 AM9/21/21
to jgrou...@googlegroups.com


On 21.09.21 12:43, Roshni Gupta wrote:
> Hi Bela,
>
> I want to combine kubeping into org.jgroup as a fat jar so that we don't
> need separate jar for kubeping.

Nobody keeps you from doing this


> One more thing , what was the reason to keep separate kube ping from
> org.jgroup ?


1. No dependencies in JGroups on Kubernetes JARs/API
2. Faster release cycles in KUBE_PING than in JGroups
> <https://groups.google.com/d/msgid/jgroups-dev/62378583-73ac-4634-bd75-2a661d8564b9n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/jgroups-dev/62378583-73ac-4634-bd75-2a661d8564b9n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Bela Ban | http://www.jgroups.org <http://www.jgroups.org>
>
> --
> You received this message because you are subscribed to the Google
> Groups "jgroups-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jgroups-dev...@googlegroups.com
> <mailto:jgroups-dev...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jgroups-dev/7ff73ac0-46e3-4bb3-93eb-1717175a8be1n%40googlegroups.com
> <https://groups.google.com/d/msgid/jgroups-dev/7ff73ac0-46e3-4bb3-93eb-1717175a8be1n%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages