f5-common-python icon indicating copy to clipboard operation
f5-common-python copied to clipboard

Close the connection after execution

Open selvam33 opened this issue 6 years ago • 3 comments

I have logged into the F5 and ran my script, but how to make sure the connection closed or not after script ran. I dont see anything like session.close . please advise, thanks !!!

selvam33 avatar Sep 27 '19 09:09 selvam33

Hi, I had the same concerns. After testing a script, I noticed that after opening a bigip session and making some calls (display VS) if nothing happens afterwards (user input), the websocket disconnect after 60s of inactivity. Here are the logs on the F5: [admin@f5:Active:Changes Pending] ~ # netstat -na | grep 192.168.1.1 tcp 0 0 ::ffff:10.10.10.10:443 ::ffff:192.168.1.1:59018 ESTABLISHED tcp 0 52 ::ffff:10.10.10.10:22 ::ffff:192.168.1.1:58727 ESTABLISHED [admin@f5:Active:Changes Pending] ~ # netstat -na | grep 192.168.1.1 tcp 0 0 ::ffff:10.10.10.10:443 ::ffff:192.168.1.1:59018 FIN_WAIT2 tcp 0 52 ::ffff:10.10.10.10:22 ::ffff:192.168.1.1:58727 ESTABLISHED [admin@f5:Active:Changes Pending] ~ # netstat -na | grep 192.168.1.1 tcp 0 52 ::ffff:10.10.10.10:22 ::ffff:192.168.1.1:58727 ESTABLISHED [admin@f5:Active:Changes Pending] ~ # /sbin/sysctl net.ipv4.tcp_fin_timeout net.ipv4.tcp_fin_timeout = 60

Hope it helps.

kisbam avatar Jan 07 '20 15:01 kisbam

bump It's kinda strange for security device not to have a way to explicitly close mgmt session

Len4i avatar Apr 08 '21 09:04 Len4i

I have the same problem. When i change the f5 devices on runtime, i see connections to the previous devices. Anyone knows how i can close the previous session?

Aitor13 avatar Jul 19 '23 07:07 Aitor13