glusterfs icon indicating copy to clipboard operation
glusterfs copied to clipboard

rpc: Fix the client repeatedly failed to establish a connection with …

Open jifengzhou opened this issue 2 years ago • 9 comments

…glusterfsd

Because priv->sock >= 0, socket_connect cannot try to establish a connection with the server.

Fixes: #3614 Signed-off-by: Jifeng Zhou [email protected]

jifengzhou avatar Jun 27 '22 05:06 jifengzhou

Can one of the admins verify this patch?

gluster-ant avatar Jun 27 '22 05:06 gluster-ant

Can one of the admins verify this patch?

gluster-ant avatar Jun 27 '22 05:06 gluster-ant

Can one of the admins verify this patch?

gluster-ant avatar Jun 27 '22 05:06 gluster-ant

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index f38923cfc..e71248c47 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -56,7 +56,8 @@
 #if !defined(DEFAULT_VERIFY_DEPTH)
 #define DEFAULT_VERIFY_DEPTH 1
 #endif
-#define DEFAULT_CIPHER_LIST "AES128:EECDH:EDH:HIGH:!3DES:!RC4:!DES:!MD5:!aNULL:!eNULL"
+#define DEFAULT_CIPHER_LIST                                                    \
+    "AES128:EECDH:EDH:HIGH:!3DES:!RC4:!DES:!MD5:!aNULL:!eNULL"
 #define DEFAULT_DH_PARAM SSL_CERT_PATH "/dhparam.pem"
 #define DEFAULT_EC_CURVE "prime256v1"
 

gluster-ant avatar Jun 27 '22 05:06 gluster-ant

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index 886d31931..8e9965bcf 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -56,7 +56,8 @@
 #if !defined(DEFAULT_VERIFY_DEPTH)
 #define DEFAULT_VERIFY_DEPTH 1
 #endif
-#define DEFAULT_CIPHER_LIST "AES128:EECDH:EDH:HIGH:!3DES:!RC4:!DES:!MD5:!aNULL:!eNULL"
+#define DEFAULT_CIPHER_LIST                                                    \
+    "AES128:EECDH:EDH:HIGH:!3DES:!RC4:!DES:!MD5:!aNULL:!eNULL"
 #define DEFAULT_DH_PARAM SSL_CERT_PATH "/dhparam.pem"
 #define DEFAULT_EC_CURVE "prime256v1"
 

gluster-ant avatar Jun 27 '22 06:06 gluster-ant

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index 886d31931..8e9965bcf 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -56,7 +56,8 @@
 #if !defined(DEFAULT_VERIFY_DEPTH)
 #define DEFAULT_VERIFY_DEPTH 1
 #endif
-#define DEFAULT_CIPHER_LIST "AES128:EECDH:EDH:HIGH:!3DES:!RC4:!DES:!MD5:!aNULL:!eNULL"
+#define DEFAULT_CIPHER_LIST                                                    \
+    "AES128:EECDH:EDH:HIGH:!3DES:!RC4:!DES:!MD5:!aNULL:!eNULL"
 #define DEFAULT_DH_PARAM SSL_CERT_PATH "/dhparam.pem"
 #define DEFAULT_EC_CURVE "prime256v1"
 

gluster-ant avatar Jun 27 '22 06:06 gluster-ant

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index e03f20dd9..39eb5c3b8 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -56,7 +56,8 @@
 #if !defined(DEFAULT_VERIFY_DEPTH)
 #define DEFAULT_VERIFY_DEPTH 1
 #endif
-#define DEFAULT_CIPHER_LIST "AES128:EECDH:EDH:HIGH:!3DES:!RC4:!DES:!MD5:!aNULL:!eNULL"
+#define DEFAULT_CIPHER_LIST                                                    \
+    "AES128:EECDH:EDH:HIGH:!3DES:!RC4:!DES:!MD5:!aNULL:!eNULL"
 #define DEFAULT_DH_PARAM SSL_CERT_PATH "/dhparam.pem"
 #define DEFAULT_EC_CURVE "prime256v1"
 

gluster-ant avatar Sep 14 '22 06:09 gluster-ant

@mohit84 can you take a look at this patch ? I think it's and important issue.

xhernandez avatar Sep 14 '22 14:09 xhernandez

@mohit84 can you take a look at this patch ? I think it's and important issue.

As per gdb stacktrace it is showing connected and connect_failed both are equal to 0, It means the client has not received any epoll event from the kernel for socket connection failure otherwise epoll handler will handle it. We do set the connect_failed flag only in socket_connect function there is no other function we do handle it. I think we can go with the change to avoid it.

mohit84 avatar Sep 17 '22 13:09 mohit84

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index 64ab78749..fb16f0828 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -56,7 +56,8 @@
 #if !defined(DEFAULT_VERIFY_DEPTH)
 #define DEFAULT_VERIFY_DEPTH 1
 #endif
-#define DEFAULT_CIPHER_LIST "AES128:EECDH:EDH:HIGH:!3DES:!RC4:!DES:!MD5:!aNULL:!eNULL"
+#define DEFAULT_CIPHER_LIST                                                    \
+    "AES128:EECDH:EDH:HIGH:!3DES:!RC4:!DES:!MD5:!aNULL:!eNULL"
 #define DEFAULT_DH_PARAM SSL_CERT_PATH "/dhparam.pem"
 #define DEFAULT_EC_CURVE "prime256v1"
 
@@ -3223,7 +3224,8 @@ socket_connect(rpc_transport_t *this, int port)
                  */
                 shutdown(priv->sock, SHUT_RDWR);
                 gf_log(this->name, GF_LOG_INFO,
-                       "intentional client shutdown(%d, SHUT_RDWR)", priv->sock);
+                       "intentional client shutdown(%d, SHUT_RDWR)",
+                       priv->sock);
                 ret = 0;
                 goto unlock;
             } else {

gluster-ant avatar Sep 23 '22 08:09 gluster-ant

Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.

stale[bot] avatar May 20 '23 15:05 stale[bot]

Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it.

stale[bot] avatar Jun 10 '23 03:06 stale[bot]