atom feed4 messages in com.perforce.perforce-userRe: [p4] WSAEADDRINUSE error
FromSent OnAttachments
b kumarOct 7, 2008 9:37 am 
Frank CompagnerOct 7, 2008 2:03 pm 
b kumarOct 7, 2008 3:39 pm 
McKenna, RobertOct 7, 2008 3:58 pm 
Subject:Re: [p4] WSAEADDRINUSE error
From:McKenna, Robert (robe@bioware.com)
Date:Oct 7, 2008 3:58:02 pm
List:com.perforce.perforce-user

One of our users had this problem which was resolved with supports help. Here is an excerpt from supports suggestion.

In any event, depending on the Windows version the user is running, he can try the method described in the following Microsoft KB article:

WASEADDRINUSE Problems http://support.microsoft.com/kb/319502

. Start Registry Editor (Regedt32.exe). . Locate the MaxUserPort key in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

. On the Edit menu, click Add Value, and then add the following registry value:

Value Name: MaxUserPort Data Type: REG_DWORD Value: 65534 (for example) Valid Range: 5000-65534 (decimal) Default: 0x1388 (5000 decimal)

. Locate the TcpTimedWaitDelay key in the registry:

HKEY_LOCAL_MACHINE\System\CurrectControlSet\services\Tcpip\Parameters

. Change it to some much smaller number (like 20 or 50):

TcpTimedWaitDelay

Key: Tcpip\Parameters Value Type: REG_DWORD-time in seconds Valid Range: 30-300 (decimal) Default: 0xF0 (240 decimal)

I'm assuming that you are running the script on windows.

Rob McKenna

-----Original Message----- From: perf@perforce.com [mailto:perf@perforce.com] On Behalf Of b kumar Sent: Tuesday, October 07, 2008 4:40 PM To: Frank Compagner Cc: perf@perforce.com Subject: Re: [p4] WSAEADDRINUSE error

Yes the script uses p4 command line to connect to the server, i will try out your suggestion and convert it to use p4 api

Date: Tue, 7 Oct 2008 23:03:56 +0200 From: fran@guerrilla-games.com To: kba@hotmail.com CC: perf@perforce.com Subject: Re: [p4] WSAEADDRINUSE error

Could it be that it is your script itself that is causing the error? Is the script using the p4 commandline to connect to the server? How many p4 commands do you run? If you use the p4 commandline a new connection to the server is established for every command you run, and, if I recall correctly, these are kept alive on the server side for some time after the client is finished. So if you run a lot of commands in quick succession you can run out of ports on the server.

If you're using Perl, Ruby or Python, you could build your script on the scripting api's. They will allow you to use a single connection for any number of commands. For details, see: http://www.perforce.com/perforce/doc.081/manuals/p4script/p4script.pdf

---------------------------------------------------------------- Frank Compagner Guerrilla Games

bk> Hi bk> i have a script that gets run at the end of the day to bk> recursively check through all the changes that was submitted bk> during the day, to see if the files that are part of the bk> changelist follow a certain format. Whenever the changelist has a bk> lot of files say 50,000 + i get WSAEADDRINUSE error. bk> Connect to server failed; check $P4PORT. bk> TCP connect to perforceserver:1666 failed. bk> connect: perforceserver:1666: WSAEADDRINUSE bk> At the time of the error, only the script is trying to access bk> perforce, I was wondering if there is way to find out the bk> offending program or operation that is trying the use that port bk> that perforce script is trying to use.

bk> Thanks bk> Bala

bk> _________________________________________________________________ bk> See how Windows Mobile brings your life together-at home, work, or on the go. bk> http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/ bk> _______________________________________________ bk> perforce-user mailing list - perf@perforce.com bk> http://maillist.perforce.com/mailman/listinfo/perforce-user

_________________________________________________________________ Stay up to date on your PC, the Web, and your mobile phone with Windows Live. http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/