Hi Folks,
Does anyone happen to know the magic incantation to get a socket of of FIN_WAIT_1 state? The socket is apparently created with REUSEADDR and REUSEPORT by the application. If the application goes down the client follows suit, leaving the socket in FIN_WAIT_1 state, where it persists for around 10 minutes.
Is there anything configurable we can do to reduce the timeout period or delete the socket?
The system is OpenVMS V8.4-2L1 and TCPIPV5.7 - ECO 5.
cheers
Brian
Socket stuck in FIN_WAIT_1
-
Topic author - Active Contributor
- Posts: 26
- Joined: Fri Jun 14, 2019 4:17 pm
- Reputation: 0
- Status: Offline
-
Topic author - Active Contributor
- Posts: 26
- Joined: Fri Jun 14, 2019 4:17 pm
- Reputation: 0
- Status: Offline
Re: Socket stuck in FIN_WAIT_1
Well I managed to get it working, after browsing through the WASD source code. It looks like the issues is with how the initial IO$_SETMODE is made. Initially the code was trying to everything in one QIOW call but it appears that it is order dependent. The first QIOW is performs the socket options only:
The second QIOW sets up all the other stuff such as the local socket parameters and the backlog value:
For reference the initial IO$_SETMODE call was:
So now after a restart the application is able to create its socket without having to delay for 15 minutes or so.
Is this documented anywhere? I’m happy its working but it does seem odd that is order dependent.
Code: Select all
return_status := $QIOW ( efn := EFN$C_ENF ,
chan := ip_channel ,
func := IO$_SETMODE ,
iosb := connect_iosb ,
p1 := %ref socket_param ,
p5 := %ref socket_options_desc ) ;
Code: Select all
return_status := $QIOW ( efn := EFN$C_ENF ,
chan := ip_channel ,
func := IO$_SETMODE ,
iosb := connect_iosb ,
p3 := %ref local_socket_desc ,
p4 := %IMMED backlog ) ;
Code: Select all
return_status := $QIOW ( efn := EFN$C_ENF ,
chan := ip_channel ,
func := IO$_SETMODE ,
iosb := connect_iosb ,
p1 := %ref socket_param ,
p3 := %ref local_socket_desc ,
p4 := %IMMED backlog ,
p5 := %ref socket_options_desc ) ;
Is this documented anywhere? I’m happy its working but it does seem odd that is order dependent.