Bug 971276

Summary: Client logs are filled with gf_ports_reserved warnings for port 54321
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Rahul Hinduja <rhinduja>
Component: glusterfsAssignee: Nagaprasad Sathyanarayana <nsathyan>
Status: CLOSED EOL QA Contact: storage-qa-internal <storage-qa-internal>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: amukherj, cbuissar, nsathyan, rhs-bugs, rwheeler, smohan, vagarwal, vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1083089 (view as bug list) Environment:
Last Closed: 2015-12-03 17:12:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1050219, 1083089    

Description Rahul Hinduja 2013-06-06 07:39:20 UTC
Description of problem:
=======================

Client logs are filled with following messages

[2013-06-06 06:25:49.595443] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier


neither bricks nor glusterd has the port number 54321 so why the logs reports the port number 54321 as not a valid port identifier.

none of the config files in /var/lib/glusterd contains the port number 54321

local port ranges from
[root@rhevrhs02 ~]# cat /proc/sys/net/ipv4/ip_local_port_range 
32768	61000
[root@rhevrhs02 ~]# 



Version-Release number of selected component (if applicable):
=============================================================
# rpm -qa | grep gluster | grep 3.4.0
glusterfs-fuse-3.4.0.8rhs-1.el6rhs.x86_64
glusterfs-geo-replication-3.4.0.8rhs-1.el6rhs.x86_64
glusterfs-rdma-3.4.0.8rhs-1.el6rhs.x86_64
glusterfs-3.4.0.8rhs-1.el6rhs.x86_64
glusterfs-server-3.4.0.8rhs-1.el6rhs.x86_64
# 

Actual Result:
==============

[2013-06-06 07:37:47.238208] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:24007 failed (No data available)
[2013-06-06 07:37:47.241734] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:37:47.242168] E [socket.c:2158:socket_connect_finish] 0-bb-rep-client-1: connection to 10.70.36.111:49152 failed (Connection refused)
[2013-06-06 07:37:47.242205] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:49152 failed (No data available)
[2013-06-06 07:37:51.240290] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:37:51.242247] I [rpc-clnt.c:1648:rpc_clnt_reconfig] 0-bb-rep-client-1: changing port to 49152 (from 0)
[2013-06-06 07:37:51.242316] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:24007 failed (No data available)
[2013-06-06 07:37:51.245841] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:37:51.246319] E [socket.c:2158:socket_connect_finish] 0-bb-rep-client-1: connection to 10.70.36.111:49152 failed (Connection refused)
[2013-06-06 07:37:51.246355] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:49152 failed (No data available)
[2013-06-06 07:37:55.244333] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:37:55.246161] I [rpc-clnt.c:1648:rpc_clnt_reconfig] 0-bb-rep-client-1: changing port to 49152 (from 0)
[2013-06-06 07:37:55.246237] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:24007 failed (No data available)
[2013-06-06 07:37:55.249768] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:37:55.250332] E [socket.c:2158:socket_connect_finish] 0-bb-rep-client-1: connection to 10.70.36.111:49152 failed (Connection refused)
[2013-06-06 07:37:55.250367] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:49152 failed (No data available)
[2013-06-06 07:37:59.248485] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:37:59.250128] I [rpc-clnt.c:1648:rpc_clnt_reconfig] 0-bb-rep-client-1: changing port to 49152 (from 0)
[2013-06-06 07:37:59.250185] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:24007 failed (No data available)
[2013-06-06 07:37:59.253694] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:37:59.254087] E [socket.c:2158:socket_connect_finish] 0-bb-rep-client-1: connection to 10.70.36.111:49152 failed (Connection refused)
[2013-06-06 07:37:59.254116] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:49152 failed (No data available)
[2013-06-06 07:38:03.252549] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:38:03.254203] I [rpc-clnt.c:1648:rpc_clnt_reconfig] 0-bb-rep-client-1: changing port to 49152 (from 0)
[2013-06-06 07:38:03.254266] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:24007 failed (No data available)
[2013-06-06 07:38:03.257780] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:38:03.258153] E [socket.c:2158:socket_connect_finish] 0-bb-rep-client-1: connection to 10.70.36.111:49152 failed (Connection refused)
[2013-06-06 07:38:03.258181] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:49152 failed (No data available)
[2013-06-06 07:38:07.256660] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:38:07.258620] I [rpc-clnt.c:1648:rpc_clnt_reconfig] 0-bb-rep-client-1: changing port to 49152 (from 0)
[2013-06-06 07:38:07.258686] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:24007 failed (No data available)
[2013-06-06 07:38:07.262185] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:38:07.262600] E [socket.c:2158:socket_connect_finish] 0-bb-rep-client-1: connection to 10.70.36.111:49152 failed (Connection refused)
[2013-06-06 07:38:07.262630] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:49152 failed (No data available)
[2013-06-06 07:38:11.260734] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:38:11.262632] I [rpc-clnt.c:1648:rpc_clnt_reconfig] 0-bb-rep-client-1: changing port to 49152 (from 0)
[2013-06-06 07:38:11.262691] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:24007 failed (No data available)
[2013-06-06 07:38:11.266189] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:38:11.266637] E [socket.c:2158:socket_connect_finish] 0-bb-rep-client-1: connection to 10.70.36.111:49152 failed (Connection refused)
[2013-06-06 07:38:11.266696] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:49152 failed (No data available)
[2013-06-06 07:38:15.264754] W [common-utils.c:2405:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier
[2013-06-06 07:38:15.266450] I [rpc-clnt.c:1648:rpc_clnt_reconfig] 0-bb-rep-client-1: changing port to 49152 (from 0)
[2013-06-06 07:38:15.266511] W [socket.c:515:__socket_rwv] 0-bb-rep-client-1: readv on 10.70.36.111:24007 failed (No data available)

Comment 3 Nagaprasad Sathyanarayana 2014-05-06 11:43:41 UTC
Dev ack to 3.0 RHS BZs

Comment 6 Cedric Buissart 2014-08-22 12:13:44 UTC
I have seen seen incident on some unrelated incident.

What is the current status ?

My understanding of this message is the following :

Glusterfs checks for reserved ports in /proc/sys/net/ipv4/ip_local_reserved_ports.
However, when it translates the string to integers, it makes use of gf_string2int16 function, which is checking for a signed 16 bits integers (between INT16_MIN and INT16_MAX [32767]).
This means that inserting any port in the reserved list above INT16_MAX will lead to a warning.

==> Steps to Reproduce:
1. echo 54321 > /proc/sys/net/ipv4/ip_local_reserved_ports
2. use gluster (stopping volume was sufficient for me)
3. Look for the following warning in the logs :
W [common-utils.c:2513:gf_ports_reserved] 0-glusterfs-socket: 54321 is not a valid port identifier

Actual results:
Port will not be taken into account

Expected results:
Port should not be used accidentally by gluster.


Additional info:

I have not tried the patch yet, but in ./libglusterfs/src/common-utils.c , gf_ports_reserved (char *blocked_port, gf_boolean_t *ports), the function used to make string to integer translation is gf_string2int16. However, using gf_string2uint16 (from 0 to UINT16_MAX/65535) is probably more suitable here.

Comment 8 Vivek Agarwal 2015-12-03 17:12:13 UTC
Thank you for submitting this issue for consideration in Red Hat Gluster Storage. The release for which you requested us to review, is now End of Life. Please See https://access.redhat.com/support/policy/updates/rhs/

If you can reproduce this bug against a currently maintained version of Red Hat Gluster Storage, please feel free to file a new report against the current release.