<html><body><div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #000000"><div data-marker="__QUOTED_TEXT__"><div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #000000;" data-mce-style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #000000;"><div>Hi,</div><br><div>This bug is hitting me hard on two different clients.</div><div>In RHGS 3.3 and on glusterfs 3.10.2 on Centos 7.4</div><div>in once case I had 59 differences in a total of 203 bricks.</div><div><br data-mce-bogus="1"></div><div>I wrote a quick and dirty script to check all ports against the brick file and the running process.</div><div>#!/bin/bash<br><br>Host=`uname -n| awk -F"." '{print $1}'`<br>GlusterVol=`ps -eaf | grep /usr/sbin/glusterfsd| grep -v grep | awk '{print $NF}'| awk -F"-server" '{print $1}'|sort | uniq`<br>Port=`ps -eaf | grep /usr/sbin/glusterfsd| grep -v grep | awk '{print $NF}'| awk -F"." '{print $NF}'`<br><br>for Volumes in ${GlusterVol};<br>do<br> cd /var/lib/glusterd/vols/${Volumes}/bricks<br> Bricks=`ls ${Host}*`<br> for Brick in ${Bricks};<br> do<br> Onfile=`grep ^listen-port "${Brick}"`<br> BrickDir=`echo "${Brick}"| awk -F":" '{print $2}'| cut -c2-`<br> Daemon=`ps -eaf | grep "\${BrickDir}.pid" |grep -v grep | awk '{print $NF}' | awk -F"." '{print $2}'`<br> #echo Onfile: ${Onfile}<br> #echo Daemon: ${Daemon}<br> if [ "${Onfile}" = "${Daemon}" ]; then<br> echo "OK For ${Brick}"<br> else<br> echo "!!! NOT OK For ${Brick}"<br> fi<br> done<br>done</div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Met vriendelijke groet, <br><br>Mike Hulsman<br><br>Proxy Managed Services B.V. | www.proxy.nl | Enterprise IT-Infra, Open Source and Cloud Technology<br>Delftweg 128 3043 NB Rotterdam The Netherlands | +31 10 307 0965</div><br><hr id="zwchr"><div><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Jo Goossens" <jo.goossens@hosted-power.com><br><b>To: </b>"Atin Mukherjee" <amukherj@redhat.com><br><b>Cc: </b>gluster-users@gluster.org<br><b>Sent: </b>Friday, October 27, 2017 11:06:35 PM<br><b>Subject: </b>Re: [Gluster-users] BUG: After stop and start wrong port is advertised<br></blockquote></div><div><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;">RE: [Gluster-users] BUG: After stop and start wrong port is advertised<p>Hello Atin,</p><p> </p><p> </p><p>I just read it and very happy you found the issue. We really hope this will be fixed in the next 3.10.7 version!</p><p> </p><p> </p><p>PS: Wow nice all that c code and those "goto out" statements (not always considered clean but the best way often I think). Can remember the days I wrote kernel drivers myself in c :)</p><p> </p><p> </p><p>Regards</p><p>Jo Goossens</p><p> </p><p> </p><p><br> </p><blockquote style="border-left: 2px solid #325FBA; padding-left: 5px; margin-left: 5px;" data-mce-style="border-left: 2px solid #325FBA; padding-left: 5px; margin-left: 5px;">-----Original message-----<br><strong>From:</strong> Atin Mukherjee <amukherj@redhat.com><br><strong>Sent:</strong> Fri 27-10-2017 21:01<br><strong>Subject:</strong> Re: [Gluster-users] BUG: After stop and start wrong port is advertised<br><strong>To:</strong> Jo Goossens <jo.goossens@hosted-power.com>; <br><strong>CC:</strong> gluster-users@gluster.org; <br><div dir="ltr"><div>We (finally) figured out the root cause, Jo!<br> </div>Patch <a href="https://review.gluster.org/#/c/18579" target="_blank" title="This external link will open in a new window" data-mce-href="https://review.gluster.org/#/c/18579">https://review.gluster.org/#/c/18579</a> posted upstream for review.</div><div><br><div>On Thu, Sep 21, 2017 at 2:08 PM, Jo Goossens <span dir="ltr"><<a href="mailto:jo.goossens@hosted-power.com" target="_blank" title="This external link will open in a new window" data-mce-href="mailto:jo.goossens@hosted-power.com">jo.goossens@hosted-power.com</a>></span> wrote:<br><blockquote style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;"><div><p>Hi,</p><p> </p><p> </p><p>We use glusterfs 3.10.5 on Debian 9.</p><p> </p><p>When we stop or restart the service, e.g.: service glusterfs-server restart</p><p> </p><p>We see that the wrong port get's advertised afterwards. For example:</p><p> </p><p>Before restart:</p><p> </p><div>Status of volume: public</div><div>Gluster process TCP Port RDMA Port Online Pid</div><div>------------------------------------------------------------------------------</div><div>Brick 192.168.140.41:/gluster/public 49153 0 Y 6364</div><div>Brick 192.168.140.42:/gluster/public 49152 0 Y 1483</div><div>Brick 192.168.140.43:/gluster/public 49152 0 Y 5913</div><div>Self-heal Daemon on localhost N/A N/A Y 5932</div><div>Self-heal Daemon on 192.168.140.42 N/A N/A Y 13084</div><div>Self-heal Daemon on 192.168.140.41 N/A N/A Y 15499</div><div> </div><div>Task Status of Volume public</div><div>------------------------------------------------------------------------------</div><div>There are no active volume tasks</div><div> </div><div> </div><div>After restart of the service on one of the nodes (192.168.140.43) the port seems to have changed (but it didn't):</div><div> </div><div><div>root@app3:/var/log/glusterfs# gluster volume status</div><div>Status of volume: public</div><div>Gluster process TCP Port RDMA Port Online Pid</div><div>------------------------------------------------------------------------------</div><div>Brick 192.168.140.41:/gluster/public 49153 0 Y 6364</div><div>Brick 192.168.140.42:/gluster/public 49152 0 Y 1483</div><div>Brick 192.168.140.43:/gluster/public 49154 0 Y 5913</div><div>Self-heal Daemon on localhost N/A N/A Y 4628</div><div>Self-heal Daemon on 192.168.140.42 N/A N/A Y 3077</div><div>Self-heal Daemon on 192.168.140.41 N/A N/A Y 28777</div><div> </div><div>Task Status of Volume public</div><div>------------------------------------------------------------------------------</div><div>There are no active volume tasks</div><div> </div></div><div> </div><div>However the active process is STILL the same pid AND still listening on the old port</div><div> </div><div><div>root@192.168.140.43:/var/log/glusterfs# netstat -tapn | grep gluster</div><div>tcp 0 0 <a href="http://0.0.0.0:49152" target="_blank" title="This external link will open in a new window" data-mce-href="http://0.0.0.0:49152">0.0.0.0:49152</a> 0.0.0.0:* LISTEN 5913/glusterfsd</div><div> </div></div><div> </div><div>The other nodes logs fill up with errors because they can't reach the daemon anymore. They try to reach it on the "new" port instead of the old one:</div><div> </div><div><div>[2017-09-21 08:33:25.225006] E [socket.c:2327:socket_connect_finish] 0-public-client-2: connection to <a href="http://192.168.140.43:49154" target="_blank" title="This external link will open in a new window" data-mce-href="http://192.168.140.43:49154">192.168.140.43:49154</a> failed (Connection refused); disconnecting socket</div><div>[2017-09-21 08:33:29.226633] I [rpc-clnt.c:2000:rpc_clnt_reconfig] 0-public-client-2: changing port to 49154 (from 0)</div><div>[2017-09-21 08:33:29.227490] E [socket.c:2327:socket_connect_finish] 0-public-client-2: connection to <a href="http://192.168.140.43:49154" target="_blank" title="This external link will open in a new window" data-mce-href="http://192.168.140.43:49154">192.168.140.43:49154</a> failed (Connection refused); disconnecting socket</div><div>[2017-09-21 08:33:33.225849] I [rpc-clnt.c:2000:rpc_clnt_reconfig] 0-public-client-2: changing port to 49154 (from 0)</div><div>[2017-09-21 08:33:33.236395] E [socket.c:2327:socket_connect_finish] 0-public-client-2: connection to <a href="http://192.168.140.43:49154" target="_blank" title="This external link will open in a new window" data-mce-href="http://192.168.140.43:49154">192.168.140.43:49154</a> failed (Connection refused); disconnecting socket</div><div>[2017-09-21 08:33:37.225095] I [rpc-clnt.c:2000:rpc_clnt_reconfig] 0-public-client-2: changing port to 49154 (from 0)</div><div>[2017-09-21 08:33:37.225628] E [socket.c:2327:socket_connect_finish] 0-public-client-2: connection to <a href="http://192.168.140.43:49154" target="_blank" title="This external link will open in a new window" data-mce-href="http://192.168.140.43:49154">192.168.140.43:49154</a> failed (Connection refused); disconnecting socket</div><div>[2017-09-21 08:33:41.225805] I [rpc-clnt.c:2000:rpc_clnt_reconfig] 0-public-client-2: changing port to 49154 (from 0)</div><div>[2017-09-21 08:33:41.226440] E [socket.c:2327:socket_connect_finish] 0-public-client-2: connection to <a href="http://192.168.140.43:49154" target="_blank" title="This external link will open in a new window" data-mce-href="http://192.168.140.43:49154">192.168.140.43:49154</a> failed (Connection refused); disconnecting socket</div><div> </div></div><div>So they now try 49154 instead of the old 49152 </div><div> </div><div>Is this also by design? We had a lot of issues because of this recently. We don't understand why it starts advertising a completely wrong port after stop/start.</div><div> </div><div> </div><div> </div><div> </div><p> </p><p>Regards</p><p>Jo Goossens</p><p> </p></div><br>_______________________________________________<br> Gluster-users mailing list<br> <a href="mailto:Gluster-users@gluster.org" target="_blank" title="This external link will open in a new window" data-mce-href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br> <a href="http://lists.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank" title="This external link will open in a new window" data-mce-href="http://lists.gluster.org/mailman/listinfo/gluster-users">http://lists.gluster.org/mailman/listinfo/gluster-users</a><br></blockquote></div></div></blockquote><br>_______________________________________________<br>Gluster-users mailing list<br>Gluster-users@gluster.org<br>http://lists.gluster.org/mailman/listinfo/gluster-users</blockquote></div></div><br></div></div></body></html>