<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 31/03/16 09:25, Sarp Kaya wrote:<br>
</div>
<blockquote cite="mid:D3230D87.3745%25akaya@expedia.com" type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div>Please ignore my previous e-mail. Turns out I was simply not
putting the private after address in interface name.</div>
<div><br>
</div>
<div>Anyway I got it working this is how I get the logs now:</div>
<div><br>
</div>
<div>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:04:58,648
INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051:
Admin console listening on <a class="moz-txt-link-freetext" href="http://127.0.0.1:9990">http://127.0.0.1:9990</a></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:04:58,649
INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025:
Keycloak 1.9.1.Final (WildFly Core 2.0.10.Final) started in
60797ms - Started 478 of 841 services (584 services are lazy,
passive or on-demand)</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:24,574
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(Incoming-2,ee,0abe138a46e3) ISPN000094: Received new cluster
view for channel server: [0abe138a46e3|1] (2) [0abe138a46e3,
69ef835de644]</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:24,578
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(Incoming-2,ee,0abe138a46e3) ISPN000094: Received new cluster
view for channel keycloak: [0abe138a46e3|1] (2) [0abe138a46e3,
69ef835de644]</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:24,589
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(Incoming-2,ee,0abe138a46e3) ISPN000094: Received new cluster
view for channel web: [0abe138a46e3|1] (2) [0abe138a46e3,
69ef835de644]</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:24,607
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(Incoming-2,ee,0abe138a46e3) ISPN000094: Received new cluster
view for channel hibernate: [0abe138a46e3|1] (2)
[0abe138a46e3, 69ef835de644]</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:24,614
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(Incoming-2,ee,0abe138a46e3) ISPN000094: Received new cluster
view for channel ejb: [0abe138a46e3|1] (2) [0abe138a46e3,
69ef835de644]</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:25,873
INFO [org.infinispan.CLUSTER] (remote-thread--p10-t1)
ISPN000310: Starting cluster-wide rebalance for cache realms,
topology CacheTopology{id=1, rebalanceId=1,
currentCH=ReplicatedConsistentHash{ns = 60, owners =
(1)[0abe138a46e3: 60]}, pendingCH=ReplicatedConsistentHash{ns
= 60, owners = (2)[0abe138a46e3: 30, 69ef835de644: 30]},
unionCH=null, actualMembers=[0abe138a46e3, 69ef835de644]}</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:25,942
INFO [org.infinispan.CLUSTER] (remote-thread--p10-t2)
ISPN000310: Starting cluster-wide rebalance for cache
loginFailures, topology CacheTopology{id=1, rebalanceId=1,
currentCH=DefaultConsistentHash{ns=80, owners =
(1)[0abe138a46e3: 80+0]},
pendingCH=DefaultConsistentHash{ns=80, owners =
(2)[0abe138a46e3: 40+0, 69ef835de644: 40+0]}, unionCH=null,
actualMembers=[0abe138a46e3, 69ef835de644]}</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:25,945
INFO [org.infinispan.CLUSTER] (remote-thread--p10-t5)
ISPN000310: Starting cluster-wide rebalance for cache
offlineSessions, topology CacheTopology{id=1, rebalanceId=1,
currentCH=DefaultConsistentHash{ns=80, owners =
(1)[0abe138a46e3: 80+0]},
pendingCH=DefaultConsistentHash{ns=80, owners =
(2)[0abe138a46e3: 40+0, 69ef835de644: 40+0]}, unionCH=null,
actualMembers=[0abe138a46e3, 69ef835de644]}</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:25,944
INFO [org.infinispan.CLUSTER] (remote-thread--p10-t6)
ISPN000310: Starting cluster-wide rebalance for cache
sessions, topology CacheTopology{id=1, rebalanceId=1,
currentCH=DefaultConsistentHash{ns=80, owners =
(1)[0abe138a46e3: 80+0]},
pendingCH=DefaultConsistentHash{ns=80, owners =
(2)[0abe138a46e3: 40+0, 69ef835de644: 40+0]}, unionCH=null,
actualMembers=[0abe138a46e3, 69ef835de644]}</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:25,968
INFO [org.infinispan.CLUSTER] (remote-thread--p10-t4)
ISPN000310: Starting cluster-wide rebalance for cache work,
topology CacheTopology{id=1, rebalanceId=1,
currentCH=ReplicatedConsistentHash{ns = 60, owners =
(1)[0abe138a46e3: 60]}, pendingCH=ReplicatedConsistentHash{ns
= 60, owners = (2)[0abe138a46e3: 30, 69ef835de644: 30]},
unionCH=null, actualMembers=[0abe138a46e3, 69ef835de644]}</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:25,971
INFO [org.infinispan.CLUSTER] (remote-thread--p10-t3)
ISPN000310: Starting cluster-wide rebalance for cache users,
topology CacheTopology{id=1, rebalanceId=1,
currentCH=ReplicatedConsistentHash{ns = 60, owners =
(1)[0abe138a46e3: 60]}, pendingCH=ReplicatedConsistentHash{ns
= 60, owners = (2)[0abe138a46e3: 30, 69ef835de644: 30]},
unionCH=null, actualMembers=[0abe138a46e3, 69ef835de644]}</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:26,086
INFO [org.infinispan.CLUSTER] (remote-thread--p10-t6)
ISPN000336: Finished cluster-wide rebalance for cache users,
topology id = 1</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:26,120
INFO [org.infinispan.CLUSTER] (remote-thread--p10-t6)
ISPN000336: Finished cluster-wide rebalance for cache realms,
topology id = 1</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:26,301
INFO [org.infinispan.CLUSTER] (remote-thread--p10-t5)
ISPN000336: Finished cluster-wide rebalance for cache
offlineSessions, topology id = 1</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:26,310
INFO [org.infinispan.CLUSTER] (remote-thread--p10-t5)
ISPN000336: Finished cluster-wide rebalance for cache work,
topology id = 1</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:26,325
INFO [org.infinispan.CLUSTER] (remote-thread--p10-t5)
ISPN000336: Finished cluster-wide rebalance for cache
sessions, topology id = 1</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">07:05:26,332
INFO [org.infinispan.CLUSTER] (remote-thread--p10-t6)
ISPN000336: Finished cluster-wide rebalance for cache
loginFailures, topology id = 1</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;
min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;
min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;
min-height: 13px;">However now I’m back to the initial
scenario where:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;
min-height: 13px;"><br>
</p>
<blockquote type="cite">
<div class="h5">
<div>I log into kc1 instance, and subsequent requests are
authenticated.</div>
<div>Then I try viewing</div>
<div>host:8080/auth/realms/master/account</div>
<div>Which is also authenticated.</div>
<div><br>
</div>
<div>Then I try to view this on kc1 by changing port like:</div>
<div>host:8081/auth/realms/master/account</div>
<div><br>
</div>
<div>At this point I expect to see same page. However I get
prompted for login for both kc1 and kc2. I see no logs at
this point.</div>
</div>
</blockquote>
</div>
<div>So what could be wrong now?</div>
</blockquote>
If you want to check if clustering works, you can go to admin
console and see it here. Try scenario like this:<br>
- Login to admin console on kc1<br>
- See the "sessions" tab of user and doublecheck that your current
userSession (the one related to login to admin console) is here<br>
- Login to admin console on kc2<br>
- See the "sessions" tab of user again and doublecheck that you are
seeing both userSessions there. Doublecheck that you are seeing same
userSessions on both kc1 or kc2. If yes, clustering works.<br>
<br>
The scenario you pointed probably doesn't work as you expected
because when you access host:8081 (but you were previously logged on
host:8080) the SSO cookie is not shared between host:8080 and
host:8081, so you need to reauthenticate. In real scenario, you will
need loadbalancer, which will be always accessed under some address
like lb:8080 and it will re-send the request automatically either to
host:8080 or host:8081. With loadbalancer cookie will be shared, so
you should be always able to see the account page and being
authenticated.<br>
<br>
Marek<br>
<blockquote cite="mid:D3230D87.3745%25akaya@expedia.com" type="cite">
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt;
text-align:left; color:black; BORDER-BOTTOM: medium none;
BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT:
0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid;
BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Abdullah Sarp
Kaya <<a moz-do-not-send="true"
href="mailto:akaya@expedia.com">akaya@expedia.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, March
31, 2016 at 2:37 PM<br>
<span style="font-weight:bold">To: </span>John Bartko <<a
moz-do-not-send="true"
href="mailto:john.bartko@drillinginfo.com"><a class="moz-txt-link-abbreviated" href="mailto:john.bartko@drillinginfo.com">john.bartko@drillinginfo.com</a></a>><br>
<span style="font-weight:bold">Cc: </span>Marek Posolda <<a
moz-do-not-send="true" href="mailto:mposolda@redhat.com"><a class="moz-txt-link-abbreviated" href="mailto:mposolda@redhat.com">mposolda@redhat.com</a></a>>,
"<a moz-do-not-send="true"
href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>"
<<a moz-do-not-send="true"
href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re:
[keycloak-user] Keycloak Clustering, other instance logs me
out<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space; color: rgb(0, 0, 0);
font-size: 14px; font-family: Calibri, sans-serif;">
<div>Okay, so I gave up using that way and now using S3
instead, that way I can see what they send to each other.</div>
<div><br>
</div>
<div>First thing I noticed is the file that they modify
looks like this:</div>
<div>74594d4ef42f <span class="Apple-tab-span" style="white-space:pre"></span>e0172d5d-8392-5ee7-bba3-03d997c2ef6e
<span class="Apple-tab-span" style="white-space:pre"></span>127.0.0.1:55200
<span class="Apple-tab-span" style="white-space:pre">
</span>T</div>
<div><br>
</div>
<div>When another instance connects, it tries to connect to
127.0.0.1:55200 which obviously doesn’t work, and that
logs out like this:</div>
<div><br>
</div>
<div>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(175, 173, 36);">
04:26:15,908 WARN [org.jgroups.protocols.pbcast.GMS]
(MSC service thread 1-2) 74594d4ef42f:
JOIN(74594d4ef42f) sent to e8a65867f61d timed out (after
3000 ms), on try 1</p>
</div>
<div><br>
</div>
<div>Again I looked reverse and found out that jgroups-udp
uses this port number. So I found that docker uses
172.17.0.x and assigned 2 IP addresses. Like this:</div>
<div><br>
</div>
<div>
<pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'Menlo';font-size:9.0pt;"> <span style="color:#e8bf6a;"><interface </span><span style="color:#bababa;">name</span><span style="color:#6a8759;">="dockerIp"</span><span style="color:#e8bf6a;">>
</span><span style="color:#e8bf6a;"> <inet-address </span><span style="color:#bababa;">value</span><span style="color:#6a8759;">="${jboss.bind.address:172.17.0.3}"</span><span style="color:#e8bf6a;">/></span><span style="color:#e8bf6a;"> </interface></span>
</pre>
<pre style="color: rgb(169, 183, 198); font-family: Menlo; font-size: 9pt;"><span style="background-color: rgb(43, 43, 43); color: rgb(232, 191, 106);"> <socket-binding </span><span style="background-color: rgb(43, 43, 43); color: rgb(186, 186, 186);">name</span><span style="background-color: rgb(43, 43, 43); color: rgb(106, 135, 89);">="jgroups-udp" </span><span style="background-color: rgb(43, 43, 43); color: rgb(186, 186, 186);">interface</span><span style="background-color: rgb(43, 43, 43); color: rgb(106, 135, 89);">="dockerIp" </span><span style="background-color: rgb(43, 43, 43); color: rgb(186, 186, 186);">port</span><span style="background-color: rgb(43, 43, 43); color: rgb(106, 135, 89);">="55200" </span><span style="background-color: rgb(43, 43, 43); color: rgb(186, 186, 186);">multicast-address</span><span style="background-color: rgb(43, 43, 43); color: rgb(106, 135, 89);">="${jboss.default.multicast.address:230.0.0.4}" </span><span style="ba!
ckground-c
olor: rgb(43, 43, 43); color: rgb(186, 186, 186);">multicast-port</span><span style="background-color: rgb(43, 43, 43); color: rgb(106, 135, 89);">="45688"</span><span style="background-color: rgb(43, 43, 43); color: rgb(232, 191, 106);">/></span></pre>
</div>
<div>However right now I still get the previous problem:</div>
<div><br>
</div>
<div>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(195, 55, 32);">
04:28:31,418 ERROR [org.jboss.msc.service.fail] (MSC
service thread 1-2) MSC000001: Failed to start service
jboss.jgroups.channel.ee:
org.jboss.msc.service.StartException in service
jboss.jgroups.channel.ee:
java.security.PrivilegedActionException:
java.net.BindException: [UDP] /0.0.0.0 is not a valid
address on any local network interface</p>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(195, 55, 32);">
at
org.wildfly.clustering.jgroups.spi.service.ChannelBuilder.start(ChannelBuilder.java:80)</p>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(195, 55, 32);">
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)</p>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(195, 55, 32);">
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)</p>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(195, 55, 32);">
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)</p>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(195, 55, 32);">
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)</p>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(195, 55, 32);">
at java.lang.Thread.run(Thread.java:745)</p>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(195, 55, 32);">
Caused by: java.security.PrivilegedActionException:
java.net.BindException: [UDP] /0.0.0.0 is not a valid
address on any local network interface</p>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(195, 55, 32);">
at
org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)</p>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(195, 55, 32);">
at
org.jboss.as.clustering.jgroups.JChannelFactory.createChannel(JChannelFactory.java:98)</p>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(195, 55, 32);">
at
org.wildfly.clustering.jgroups.spi.service.ChannelBuilder.start(ChannelBuilder.java:78)</p>
<p style="margin: 0px; font-size: 11px; font-family:
Menlo; color: rgb(195, 55, 32);">
... 5 more</p>
</div>
<div>Why does it keep showing that my IP address is 0.0.0.0?
Despite I specifically put the right IP address?</div>
<div><br>
</div>
<div>PS: I’m well aware this is a bad hack to put IP
addresses specifically, but at this point I’m trying to
get it working.</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt;
text-align:left; color:black; BORDER-BOTTOM: medium
none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in;
PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP:
#b5c4df 1pt solid; BORDER-RIGHT: medium none;
PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>John Bartko
<<a moz-do-not-send="true"
href="mailto:john.bartko@drillinginfo.com">john.bartko@drillinginfo.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday,
March 31, 2016 at 12:53 PM<br>
<span style="font-weight:bold">To: </span>Abdullah Sarp
Kaya <<a moz-do-not-send="true"
href="mailto:akaya@expedia.com">akaya@expedia.com</a>><br>
<span style="font-weight:bold">Cc: </span>Marek Posolda
<<a moz-do-not-send="true"
href="mailto:mposolda@redhat.com">mposolda@redhat.com</a>>,
"<a moz-do-not-send="true"
href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>"
<<a moz-do-not-send="true"
href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re:
[keycloak-user] Keycloak Clustering, other instance logs
me out<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div>You're on the right track. Taking a look at my
notes, the following may be required:</div>
<div>
<ul>
<li>docker container with host mode networking
and NET_ADMIN capabilities if clustering
across container hosts</li>
<li>entrypoint parameters:<br>
-Djgroups.bind_addr=HOST_IP -b HOST_IP
--server-config standalone-ha.xml<br>
note the host default interface IP must be
used and not a wildcard of 0.0.0.0</li>
<li>the socket-binding changed</li>
</ul>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Mar 30, 2016 at
7:49 PM, Sarp Kaya <span dir="ltr">
<<a moz-do-not-send="true"
href="mailto:akaya@expedia.com"
target="_blank">akaya@expedia.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0
0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div
style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>Sorry to send an e-mail again what I did
is changed this:</div>
<div>
<pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'Menlo';font-size:9.0pt"><span style="color:#e8bf6a"><socket-binding </span><span style="color:#bababa">name</span><span style="color:#6a8759">="jgroups-udp" </span><span style="color:#bababa">interface</span><span style="color:#6a8759">="public" </span><span style="color:#bababa">port</span><span style="color:#6a8759">="55200" </span><span style="color:#bababa;background-color:#344134">multicast-address</span><span style="color:#6a8759">="${jboss.default.multicast.address:230.0.0.4}" </span><span style="color:#bababa">multicast-port</span><span style="color:#6a8759">="45688"</span><span style="color:#e8bf6a">/></span></pre>
</div>
<div>Also set the public interface as:</div>
<div>
<pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'Menlo';font-size:9.0pt"><span style="color:#e8bf6a"><interface </span><span style="color:#bababa">name</span><span style="color:#6a8759">="public"</span><span style="color:#e8bf6a">>
</span><span style="color:#e8bf6a"> <inet-address </span><span style="color:#bababa">value</span><span style="color:#6a8759">="${jboss.bind.address:0.0.0.0}"</span><span style="color:#e8bf6a">/>
</span><span style="color:#e8bf6a"></interface></span></pre>
</div>
<div>But now I’m getting this error:</div>
<div><br>
</div>
<div>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">00:45:40,146
ERROR [org.jboss.msc.service.fail] (MSC
service thread 1-2) MSC000001: Failed to
start service
<a moz-do-not-send="true"
href="http://jboss.jgroups.channel.ee"
target="_blank">jboss.jgroups.channel.ee</a>:
org.jboss.msc.service.StartException in
service
<a moz-do-not-send="true"
href="http://jboss.jgroups.channel.ee"
target="_blank">jboss.jgroups.channel.ee</a>:
java.security.PrivilegedActionException:
java.net.BindException: [UDP] /<a
moz-do-not-send="true"
href="http://0.0.0.0" target="_blank">0.0.0.0</a>
is not a valid address on any local
network interface</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.wildfly.clustering.jgroups.spi.service.ChannelBuilder.start(ChannelBuilder.java:80)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
java.lang.Thread.run(Thread.java:745)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">Caused
by:
java.security.PrivilegedActionException:
java.net.BindException: [UDP] /<a
moz-do-not-send="true"
href="http://0.0.0.0" target="_blank">0.0.0.0</a>
is not a valid address on any local
network interface</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.jboss.as.clustering.jgroups.JChannelFactory.createChannel(JChannelFactory.java:98)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.wildfly.clustering.jgroups.spi.service.ChannelBuilder.start(ChannelBuilder.java:78)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
... 5 more</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">Caused
by: java.net.BindException: [UDP] /<a
moz-do-not-send="true"
href="http://0.0.0.0" target="_blank">0.0.0.0</a>
is not a valid address on any local
network interface</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.jgroups.util.Util.checkIfValidAddress(Util.java:3522)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.jgroups.stack.Configurator.ensureValidBindAddresses(Configurator.java:903)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:118)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:57)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:477)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.jgroups.JChannel.init(JChannel.java:853)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.jgroups.JChannel.<init>(JChannel.java:159)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.jboss.as.clustering.jgroups.JChannelFactory$1.run(JChannelFactory.java:95)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.jboss.as.clustering.jgroups.JChannelFactory$1.run(JChannelFactory.java:92)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
at
org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">
... 7 more</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)"><br>
</p>
</div>
<div>If I put a different IP address (say the
docker machine IP address) I get the same
error as well.</div>
<div><br>
</div>
<span><span class="">
<div
style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium
none;BORDER-LEFT:medium
none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df
1pt solid;BORDER-RIGHT:medium
none;PADDING-TOP:3pt">
<span style="font-weight:bold">From: </span>John
Bartko <<a moz-do-not-send="true"
href="mailto:john.bartko@drillinginfo.com"
target="_blank">john.bartko@drillinginfo.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday,
March 31, 2016 at 1:23 AM<br>
<span style="font-weight:bold">To: </span>Marek
Posolda <<a moz-do-not-send="true"
href="mailto:mposolda@redhat.com"
target="_blank">mposolda@redhat.com</a>><br>
<span style="font-weight:bold">Cc: </span>Abdullah
Sarp Kaya <<a moz-do-not-send="true"
href="mailto:akaya@expedia.com"
target="_blank">akaya@expedia.com</a>>,
"<a moz-do-not-send="true"
href="mailto:keycloak-user@lists.jboss.org"
target="_blank">keycloak-user@lists.jboss.org</a>"
<<a moz-do-not-send="true"
href="mailto:keycloak-user@lists.jboss.org"
target="_blank">keycloak-user@lists.jboss.org</a>><br>
<span style="font-weight:bold">Subject:
</span>Re: [keycloak-user] Keycloak
Clustering, other instance logs me out<br>
</div>
<div><br>
</div>
</span>
<div>
<div>
<div>
<div class="h5">
<div dir="ltr">When clustering
across separate hosts, I had to
change the jgroups-udp socket
binding to listen on the public
interface (binds to loopback by
default).</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">
<div>
<div class="h5">On Wed, Mar 30,
2016 at 5:52 AM, Marek Posolda <span
dir="ltr"><<a
moz-do-not-send="true"
href="mailto:mposolda@redhat.com"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:mposolda@redhat.com">mposolda@redhat.com</a></a>></span>
wrote:<br>
</div>
</div>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div bgcolor="#FFFFFF"
text="#000000">
<div>
<div class="h5">
<div><br>
When you start the second
instance, are you seeing
something like this in log
of both servers?<br>
<br>
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(Incoming-10,shared=udp)<br>
ISPN000094: Received new
cluster view:
[node1/keycloak|1] (2)
[node1/keycloak,
node2/keycloak]<br>
<br>
If not, then clustering
doesn't work properly and
the servers doesn't form a
cluster with each other.
From the log you sent,
there is just startup of
one server, which
indicates that clustering
may not work.<br>
<br>
Maybe multicast doesn't
work in your network.
Either disable
firewall/selinux/whatever
to have multicast working
or switch to TCP JGroups
channel instead of UDP.
See the Wildfly and
JGroups documentation for
more details.<br>
<br>
Also I personally use the
virtual hosts to test
clustering of 2 servers on
same machine (Ie. have
virtual servers like
kc1:8080 and kc2:8080) .
Using same host but differ
just in port number (
host:8080 and host:8081 )
may causing mess with
cookies, so
<br>
I am personally not using
the setup like this.<br>
<br>
Marek
<div>
<div><br>
<br>
On 30/03/16 08:38,
Sarp Kaya wrote:<br>
</div>
</div>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div>
<div>
<div>I have tried
using
standalone-ha.xml
with shared
database. I thought
that would be enough
but it seems like
it’s not. The
problem is</div>
<div><br>
</div>
<div>I log into kc1
instance, and
subsequent requests
are authenticated.</div>
<div>Then I try
viewing</div>
<div>host:8080/auth/realms/master/account</div>
<div>Which is also
authenticated.</div>
<div><br>
</div>
<div>Then I try to
view this on kc1 by
changing port like:</div>
<div>host:8081/auth/realms/master/account</div>
<div><br>
</div>
<div>At this point I
expect to see same
page. However I get
prompted for login
for both kc1 and
kc2. I see no logs
at this point.</div>
<div><br>
</div>
<div>So now I have
switched to using
keycloak-ha-postgres
because it seemed to
me that it comes
clustering enabled
out of box. So I
nearly did exactly
what this page:</div>
<div><a
moz-do-not-send="true"
href="https://hub.docker.com/r/jboss/keycloak-ha-postgres/builds/benk6w5cgdmrqonrxvu3bfu/"
target="_blank"><a class="moz-txt-link-freetext" href="https://hub.docker.com/r/jboss/keycloak-ha-postgres/builds/benk6w5cgdmrqonrxvu3bfu/">https://hub.docker.com/r/jboss/keycloak-ha-postgres/builds/benk6w5cgdmrqonrxvu3bfu/</a></a></div>
<div> told me to so.
The only difference
that I have done is
adding ports (with
–p 8080:8080 to one
instance and –p
8081:8080 to the
another one) and
adding a new user.</div>
<div><br>
</div>
<div>Once I start the
I get this log:</div>
<div><br>
</div>
<div>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,888
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-1)
ISPN000078:
Starting JGroups
channel keycloak</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,893
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-2)
ISPN000078:
Starting JGroups
channel server</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,902
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-1)
ISPN000094:
Received new
cluster view for
channel keycloak:
[a05014a5dc24|0]
(1) [a05014a5dc24]</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,907
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-1)
ISPN000079:
Channel keycloak
local address is
a05014a5dc24,
physical addresses
are [<a
moz-do-not-send="true"
href="http://127.0.0.1:55200" target="_blank">127.0.0.1:55200</a>]</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,902
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-2)
ISPN000094:
Received new
cluster view for
channel server:
[a05014a5dc24|0]
(1) [a05014a5dc24]</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,914
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-2)
ISPN000079:
Channel server
local address is
a05014a5dc24,
physical addresses
are [<a
moz-do-not-send="true"
href="http://127.0.0.1:55200" target="_blank">127.0.0.1:55200</a>]</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,925
INFO
[org.infinispan.factories.GlobalComponentRegistry]
(MSC service
thread 1-2)
ISPN000128:
Infinispan
version:
Infinispan 'Mahou'
8.1.0.Final</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,926
INFO
[org.infinispan.factories.GlobalComponentRegistry]
(MSC service
thread 1-1)
ISPN000128:
Infinispan
version:
Infinispan 'Mahou'
8.1.0.Final</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,978
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-2)
ISPN000078:
Starting JGroups
channel web</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,982
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-2)
ISPN000094:
Received new
cluster view for
channel web:
[a05014a5dc24|0]
(1) [a05014a5dc24]</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,984
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-2)
ISPN000079:
Channel web local
address is
a05014a5dc24,
physical addresses
are [<a
moz-do-not-send="true"
href="http://127.0.0.1:55200" target="_blank">127.0.0.1:55200</a>]</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,985
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-1)
ISPN000078:
Starting JGroups
channel hibernate</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,986
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-1)
ISPN000094:
Received new
cluster view for
channel hibernate:
[a05014a5dc24|0]
(1) [a05014a5dc24]</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:49,987
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-1)
ISPN000079:
Channel hibernate
local address is
a05014a5dc24,
physical addresses
are [<a
moz-do-not-send="true"
href="http://127.0.0.1:55200" target="_blank">127.0.0.1:55200</a>]</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:50,028
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-1)
ISPN000078:
Starting JGroups
channel ejb</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:50,030
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-1)
ISPN000094:
Received new
cluster view for
channel ejb:
[a05014a5dc24|0]
(1) [a05014a5dc24]</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:50,031
INFO
[org.infinispan.remoting.transport.jgroups.JGroupsTransport]
(MSC service
thread 1-1)
ISPN000079:
Channel ejb local
address is
a05014a5dc24,
physical addresses
are [<a
moz-do-not-send="true"
href="http://127.0.0.1:55200" target="_blank">127.0.0.1:55200</a>]</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:50,357
INFO
[org.jboss.as.clustering.infinispan]
(ServerService
Thread Pool -- 56)
WFLYCLINF0002:
Started
realmVersions
cache from
keycloak container</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:50,391
INFO
[org.jboss.as.clustering.infinispan]
(ServerService
Thread Pool -- 54)
WFLYCLINF0002:
Started
offlineSessions
cache from
keycloak container</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:50,397
INFO
[org.jboss.as.clustering.infinispan]
(ServerService
Thread Pool -- 55)
WFLYCLINF0002:
Started
loginFailures
cache from
keycloak container</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:50,396
INFO
[org.jboss.as.clustering.infinispan]
(ServerService
Thread Pool -- 52)
WFLYCLINF0002:
Started sessions
cache from
keycloak container</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:50,392
INFO
[org.jboss.as.clustering.infinispan]
(ServerService
Thread Pool -- 53)
WFLYCLINF0002:
Started realms
cache from
keycloak container</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:50,399
INFO
[org.jboss.as.clustering.infinispan]
(ServerService
Thread Pool -- 51)
WFLYCLINF0002:
Started users
cache from
keycloak container</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo">05:28:50,402
INFO
[org.jboss.as.clustering.infinispan]
(ServerService
Thread Pool -- 50)
WFLYCLINF0002:
Started work cache
from keycloak
container</p>
</div>
<div><br>
</div>
<div><br>
</div>
<div>However I still
have the same issue
as above (I get
logged out). Also I
don’t get any new
logs for the entire
log-in, log-out
processes.</div>
<div><br>
</div>
<div>Am I doing
something wrong?</div>
<div>Thanks,</div>
<div>Sarp</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
</div>
</div>
<pre>_______________________________________________
keycloak-user mailing list
<a moz-do-not-send="true" href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<br>
</div>
<span class=""><br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a moz-do-not-send="true"
href="mailto:keycloak-user@lists.jboss.org"
target="_blank">keycloak-user@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/keycloak-user"
rel="noreferrer"
target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</span></blockquote>
</div>
<br>
</div>
</div>
</div>
</span></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</span></div>
</div>
</span>
</blockquote>
<br>
</body>
</html>