• Home
  • About
  • Contact
skip to main | skip to sidebar

sQew notepad ++ Unix | Storage | Backup

SSH: TIME_WAIT problem

Posted by Syed .Z on Tuesday, October 03, 2006
Labels: Unix OS Storage and Backup

The TIME_WAIT problem


Sometimes a forwarded port mysteriously hangs around after the forwarding SSH session has gone away. You try a command you've used successfully several times in a row and suddenly get an error message:
$ ssh1 -L2001:localhost:21 server.example.com
Local: bind: Address already in use
(This happens commonly if you're experimenting with port forwarding, trying to get something to work.) You know that you have no active SSH command listening on port 2001, so what's going on? If you use the netstat command to look for other listeners on that port, you may see a connection hanging around in the TIME_WAIT state:
$ netstat -an | grep 2001
tcp 0 0 127.0.0.1:2001 127.0.0.1:1472 TIME_WAIT
The TIME_WAIT state is an artifact of the TCP protocol. In certain situations, the teardown of a TCP connection can leave one of its socket endpoints unusable for a short period of time, usually only a few minutes. As a result, you cannot reuse the port for TCP forwarding (or anything else) until the teardown completes. If you're impatient, choose another port for the time being (say, 2002 instead of 2001) and get on with your work, or wait a short time for the port to become usable again.


source: http://www.unix.org.ua/orelly/networking_2ndEd/ssh/ch09_02.htm

p/s: This is why sometimes we faced this issue "
Local: bind: Address already in use"

0 comments:

Post a Comment

Newer Post Older Post Home

About Me

SUN | HP-UX | LINUX | WINDOWS | EMC | NETWORKER | AVAMAR | VERITAS VM | NETBACKUP | VCS | BAKBONE | SYMANTEC | STORAGETEK | QUANTUM | HP-ESL | VTL

Categories

Announcement (5) Apple (2) Articles and Fact (15) Automotive (9) Avamar (7) BASH (2) Blogger (2) blogs (1) Books (1) Brocade (1) BRS (3) Cluster (1) Contact (1) DELL (1) E-Book (1) E-Commerce (1) economics (1) EMC (3) Encyclopedia (1) Events (1) Food (1) Google (1) Hyper-V (1) iPhone (1) Islam (10) ITIL (3) Job Tips (12) Jokes (29) Management Lessons (18) Movie (1) Music and Lyrics (7) MySQL (1) Netbackup (16) networking (1) Open Source (2) Personal (5) PhotoBlog (6) Politics (24) Press Relase (1) Quote of the day (24) SAN Zoning (1) Security (8) Solaris (3) Sports (3) Storage (2) SUN (4) Symantec (1) Technology (7) Terengganu (3) TIPS (1) Unix (2) Unix OS Storage and Backup (58) Video (11) Virtualization (1) Windows (3)

GTalk

Blog Archive

  • ► 2013 (6)
    • ► October (1)
    • ► July (5)
  • ► 2012 (9)
    • ► October (1)
    • ► March (2)
    • ► February (4)
    • ► January (2)
  • ► 2011 (42)
    • ► December (2)
    • ► October (2)
    • ► September (7)
    • ► May (4)
    • ► April (12)
    • ► March (10)
    • ► February (2)
    • ► January (3)
  • ► 2010 (3)
    • ► August (3)
  • ► 2009 (28)
    • ► June (1)
    • ► May (3)
    • ► April (8)
    • ► March (4)
    • ► February (1)
    • ► January (11)
  • ► 2008 (96)
    • ► December (6)
    • ► November (8)
    • ► October (5)
    • ► September (4)
    • ► August (2)
    • ► July (13)
    • ► June (24)
    • ► May (7)
    • ► April (11)
    • ► March (7)
    • ► February (4)
    • ► January (5)
  • ► 2007 (42)
    • ► December (4)
    • ► October (4)
    • ► September (9)
    • ► August (4)
    • ► July (3)
    • ► May (2)
    • ► April (7)
    • ► March (5)
    • ► February (1)
    • ► January (3)
  • ▼ 2006 (65)
    • ► December (2)
    • ► November (8)
    • ▼ October (8)
      • SGUIL - The Analyst Console for Network Security M...
      • The book: Hacker's Challenge 3
      • Azam Baru
      • 4 Golden Lessons From The Apprentice by A.Williams
      • Solaris: Recovering From Soft Partition Problems
      • SSH: TIME_WAIT problem
      • SKIP - Simple Key management for Internet Protocols
      • INFO: Kaitan Tidur Dan Keletihan
    • ► September (2)
    • ► August (7)
    • ► July (1)
    • ► June (5)
    • ► May (3)
    • ► April (18)
    • ► March (3)
    • ► February (6)
    • ► January (2)
  • ► 2005 (25)
    • ► December (1)
    • ► October (3)
    • ► September (2)
    • ► August (3)
    • ► July (3)
    • ► June (4)
    • ► April (3)
    • ► March (2)
    • ► February (2)
    • ► January (2)
  • ► 2004 (23)
    • ► December (5)
    • ► October (2)
    • ► September (1)
    • ► August (2)
    • ► July (2)
    • ► June (10)
    • ► March (1)
  • ► 2003 (24)
    • ► December (1)
    • ► November (2)
    • ► October (2)
    • ► September (5)
    • ► August (9)
    • ► July (5)

Total Pageviews

rss
 

Copyright © 2009 sQew notepad ++ Unix | Storage | Backup . Blog Designed by Dante Araujo & Klodian.