Wednesday, November 6, 2013

Resolution For: Java.net.SocketException: No buffer space avaliable ( maximum connection reached)

The solution is to increase the connection in windows 2008 server.

1) Open the windows command line and check how many ports are opened.
C:\>netsh int ipv4 show dynamicport tcp
Protocol tcp Dynamic Port Range
---------------------------------
Start Port      : 49152
Number of Ports : 16384

2) Increase the number of ports with the command
C:\>netsh int ipv4 set dynamicportrange protocol=tcp startport=5000 numberofports=60536

3) confirm again
C:\>netsh int ipv4 show dynamicport tcp
Protocol tcp Dynamic Port Range
---------------------------------
Start Port      : 5000
Number of Ports : 60536

Thursday, October 24, 2013

Windows could not start service on Win Server 2008 R2 SP1 (Error 1053)

Error 1053: The service did not respond to the start or control request in a timely fashion


Applicable for:

This exercise is tried in Window XP, Windows Server 2008 R2 Entp. SP1

Cause:-

I have come across two reasons this issue.
1. Service taking time to start and the timeout period at windows registry level is configured as either very less or no timeout setting.
2. No proper access to Domain\user.

Solutions:-

If we have 1st as the reason perform below steps.

1. Click Start, click Run, type regedit, and then click OK.
2. Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
3.In the right pane, locate the ServicesPipeTimeout entry.If the ServicesPipeTimeout entry does not exist, you must create it by "On the Edit menu, point to New, and then click DWORD Value" "Type ServicesPipeTimeout, and then press ENTER.".
4. Right-click ServicesPipeTimeout, and then click Modify.
5.Click Decimal, type 60000, and then click OK. i.e 60 sec.
6. Restart the computer.

If we have 2nd as a reason then check for below Access rights.

Normally when we create a service with a particularity user/Domain account that user becomes administrator of that folder and application files(for example .exe, .bat) in that folder. Compare the properties of the .exe or the .bat files which the window service is invoking for both the users one which created the service and other user which is either different domain user or localadmin user. If all the properties are fine then. Particularly check the advanced attributes you may find that the user who installed the service files may have Encrypt Contents to Secure Data as checked. Un-check this for all the users and then try. It will work.

Good Luck.

Tuesday, August 20, 2013

Control Your Network

Control on network in performance testing/Engineering
In performance testing most of the time we don't spend too much time on network and network related indicators but this plays a major role.
Here I'll capture few of the basic points which we should consider.
Case : Suppose we have servers having multiple LANS, to explain it further suppose in your lab there are 2 private networks PVLAN1 (1GB) and PVLAN2 (2GB) apart from your company network(1GB shared) in that case how to make sure that your application is using right network for the performance tests if not then how to use right network.
Sample Lab configurations: 
Operating System Hostname ip, 1Gbps
(Company Network)
Console
 hostname
idrac ip PVLAN 101 ip
(3Gbps)
PVLAN 102 ip
(2 Gbps)
PVLAN 103 ip
(2 Gbps)
Windows 2008 Enterprise R2 64 BIT Server WINPERF1 10.240.103.21 CONPERF1 10.240.103.101 192.168.101.1 NA 192.168.103.1
Windows 2008 Enterprise R2 64 BIT Server WINPERF2 10.240.103.22 CONPERF2 10.240.103.102 192.168.101.2 NA 192.168.103.2
Windows 2003 Enterprise R2 64 BIT Server WINPERF3 10.240.103.23 CONPERF3 10.240.103.103 192.168.101.3 192.168.102.1 NA
Redhat 6 Advanced Server 64 Bit LINUXPERF1 10.240.103.31 CONPERF11 10.240.103.111 192.168.101.11 NA 192.168.103.11
Redhat 6 Advanced Server 64 Bit LINUXPERF2 NA CONPERF12 10.240.103.112 192.168.101.12 NA 192.168.103.12
















Note:-iDRAC is Integrated Dell™ Remote Access Controller

So now, I want that the communication between my DB which is hosted on WINPERF1 and my Application server which is at LINUXPERF1 should happen via PVLAN1(3Gbps) network.

First how to check the current communication network?
Ans:- Go to WINPERF1 and ping LINUXPERF1 this will give you reply from LINUXPERF1 via any one of  10.240.103.31(Company network), 192.168.101.11(PVLAN1) or 192.168.103.11(PVLAN2) this will tell you which network in used while communicating from LINUXPERF1 to WINPERF1.

How to set the right network?
1. Change in the hosts file at windows server location C:\WINDOWS\system32\drivers\etc
Add:-
# This is for any connection coming on WINPERF1 will come via PVLAN1
 192.168.101.1   WINPERF1
# This is for any connection going out from WINPERF1 to LINUXPERF1 will go via PVLAN1
192.168.101.11  LINUXPERF1

2. Change in the LINUXPERF1at /etc/hosts
Add:-
 #
192.168.101.11  LINUXPERF1
#
192.168.101.1   WINPERF1


Important Point: 
1. If we want LINUXPERF1 to connect to DB via PVLAN1 and Client at WINPERF3 via PVLAN 3 this is not possible because PVLAN3 is not available for WINPERF1.
2. If we have a situation where LINUXPERF1 need to communicate with LINUXPERF2 via say PVLAN3 then following changes in hosts file of both of these machines.









In Machine LINUXPERF1







192.168.103.11     LINUXPERF1_ha (_ha is used because LINUXPERF1 is already using 192.168.101.11  LINUXPERF1 for communication with WINPERF1)






192.168.103.12      LINUXPERF2







In Machine LINUXPERF2
192.168.103.12   LINUXPERF2
 192.168.103.11     LINUXPERF1_ha
 note:- LINUXPERF2 should address LINUXPERF1 as LINUXPERF1_ha


Sample Performance Lab Setup

http://www.gliffy.com/go/publish/4816255/