UNSOLVED

matsberger

updated

20 years ago

0

1856

July 13th, 2006 02:00

NetWorker 7.3.1 on Linux x64 uses huge amount of ports locally

Hi!

Have recently working on a case where a customer has 100 clients starting at the same time in one group. This is resulting in over 30000 ports beeing opened locally, and eventually backup fails with "cannot bind to port in configured port range".

I have managed to reproduce this in our lab, and this is what I get when starting a group of 10 clients:

Before starting savegrp:
# more proc/net/sockstat
sockets: used 202
TCP: inuse 48 orphan 0 tw 0 alloc 58 mem 6
UDP: inuse 19
RAW: inuse 1
FRAG: inuse 0 memory 0

<1 second after starting savegrp:
sockets: used 214
TCP: inuse 60 orphan 0 tw 612 alloc 70 mem 8
UDP: inuse 19
RAW: inuse 1
FRAG: inuse 0 memory 0

2 seconds after:
sockets: used 213
TCP: inuse 59 orphan 0 tw 1251 alloc 69 mem 6
UDP: inuse 19
RAW: inuse 1
FRAG: inuse 0 memory 0

From netstat output:

tcp 0 0 localhost:45011 localhost:9260 TIME_WAIT
tcp 0 0 localhost:45010 localhost:9260 TIME_WAIT
tcp 0 0 localhost:45023 localhost:9260 TIME_WAIT
tcp 0 0 localhost:45020 localhost:9260 TIME_WAIT
tcp 0 0 localhost:44837 localhost:9260 TIME_WAIT
tcp 0 0 localhost:44833 localhost:9260 TIME_WAIT
tcp 0 0 localhost:44860 localhost:9260 TIME_WAIT
tcp 0 0 localhost:44741 localhost:7938 TIME_WAIT
tcp 0 0 localhost:44745 localhost:7938 TIME_WAIT
tcp 0 0 localhost:44750 localhost:7938 TIME_WAIT
tcp 0 0 localhost:44748 localhost:7938 TIME_WAIT
tcp 0 0 localhost:44596 localhost:7938 TIME_WAIT
tcp 0 0 localhost:44584 localhost:7938 TIME_WAIT
tcp 0 0 localhost:44590 localhost:7938 TIME_WAIT
tcp 0 0 localhost:44563 localhost:7938 TIME_WAIT
tcp 0 0 localhost:44561 localhost:7938 TIME_WAIT
tcp 0 0 localhost:44567 localhost:7938 TIME_WAIT
tcp 0 0 localhost:44565 localhost:7938 TIME_WAIT
tcp 0 0 localhost:44571 localhost:7938 TIME_WAIT

etc....

As you can se from sockstat, the amount of ports in state TIME_WAIT is huge.

The connections are usually related to ports: 7937 and 7938. Also to port 9260, which from rpcinfo seems to be these processes:
390103 2 tcp 9260 nsrd
390109 2 tcp 9260 nsrstat
390110 1 tcp 9260 nsrjbd


This was not a problem before upgrading to 7.3.x. Has anyone else seen the same problems, or know why all these local connections are beeing opened ? The workaround for the customer was to create nine groups, dividing all the clients in those, and starting the groups with 5 minutes interval.

Thanks!

Mats Berger
LCNS - Exello Norway
  • 927

    0

    Posted July 13th, 2006 02:00

    It can be platform related. I'll try to set up the exact config on a different OS.

    I have a case that has been open for one month and two weeks, and still no solution given.
    So I thought I'd give the forums a try (for the first time) :)

    -
    Mats
  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    927

    0

    Posted July 13th, 2006 02:00

    It could x64 thing (NetWorker related)... I have seen several issues under x64 only (not present in x86) and this could be one of those too.
  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    927

    0

    Posted July 13th, 2006 02:00

    I did see something like that before, but it was unrelated to number of groups and slightly different, but the same outcome. If this is 7.3.1 thing and you can reproduce it the best thing it to open a ticket with support and let them know that to get it fixed as soon as possible.

    Under 7.3.1 I didn't see this before making me wonder if this is platform specific thing?
  • 927

    0

    Posted July 13th, 2006 04:00

    I have just tried the same environment both on a Linux 2.4 32bit version, and also on Windows2003 32bit.

    They have exactly the same symptom as the Linux 2.6 x64 version.

    Have anyone looked at netstat after starting a group with a bunch of clients, to see if you also have a lot of TIME_WAIT's ? The problem only arise when you are starting a lot on the same time (with the connection port range getting full), but you can also se that starting just 10 clients are making a lot of connections locally.

    I've tried watching the connections with tcpdump but I can't find out why it's making so many connections.

    -
    Mats
  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    927

    0

    Posted July 13th, 2006 05:00

    What is the process behind those 445xx ports? Given that you can see it on 2 (or 3) different platforms I would escalate it to EMC. There are couple of people on forum who claimed to have migrated to 7.3.1 so it would be interesting to hear them say a word or two.
  • blochner1

    19 Posts

    927

    1

    Posted July 14th, 2006 12:00

    Try adding a firewall into the mix and watch the fun really begin. Actually, the 7.3 admin guide gives somewhat of an explanation about port usage in Appendix B: Firewall Support. What I still don't understand is the relationship between what NetWorker terms service and connection ports and TCP's source and target ports , if there is any relationship. Anyways, the reason for all of the connections is that the pre-process, media checks, and the actual saves all communicate on seperate ports. The server makes the inital call to the client on 7937 & 7938 and supposedly tells the client which "connection port" (the 4#### port numbers) to use when talking back to the various daemons (which will run on different ports each time networker is started) on the server.

    rpcinfo -p
    390103 2 tcp 9372 nsrd
    390104 105 tcp 8645 nsrmmd
    390105 5 tcp 8775 nsrindexd
    390107 5 tcp 8171 nsrmmdbd
    390109 2 tcp 9372 nsrstat
    390109 2 udp 9008 nsrstat
    390110 1 tcp 9372 nsrjbd
    390113 1 tcp 7937 nsrexecd
    390115 1 tcp 8637 lgtolmd
    390120 1 udp 9008
    390120 1 tcp 9372
    390429 101 tcp 8502 nsrlcpd
    390429 201 tcp 8440 nsrlcpd
    390430 1 tcp 8236 nsrmmgd
    390433 1 tcp 8619 nsrjobd


    Sorry, if I just added more confusion. I'm still trying to better understand myself.
  • 927

    0

    Posted July 19th, 2006 04:00

    I think I have figured a way out...

    We have tried to turn on these tcp attributes in Linux:
    /proc/sys/net/ipv4/tcp_tw_recycle
    /proc/sys/net/ipv4/tcp_tw_reuse

    Which are often being used in tuning webservers.
    They basically do that the TIME_WAIT ports can be re-used, and because of this we reduced the amount of ports beeing used from 30000 to ~200.

    All the test backups have run OK, so maybe this is a "work-around" for NetWorkers heavy connection rates locally.

    -
    Mats
  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    927

    0

    Posted July 19th, 2006 05:00

    Given that you have reproduced that under Windows I wonder how you fix it there. If this is something generic EMC should check it out and give fix. Did they gave you LGTpa yet?
  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    226

    0

    Posted August 2nd, 2006 12:00

    Same thing with time wait was my issue with Oracle restores when disk device having ssid is busy - however in that case I did get patch for NMO and it was not related to NW. I guess things did change in that respect somewhere in 7.3.x. 7.3.x is connection port hungry beast as it seems due to nsrjob design and this is why default setting for 7.3.x connection ports is unlimited (otherwise recommended to be range of 40000 ports).