Test environment: - OS: Windows 8.1 Pro - Jmeter version: 2.12 r1636949 - Java version: Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Jmeter test setup: - Threads: 50 - Ramp-Up period: 1 - Loop: 3 Steps to reproduce: - I created a Jmeter script for a web application I want to test (can't go into much details about the app) - I executed the test first using the following setup: Threads (50), Ramp-Up (1) and Loop (1) and the test is successfully executed. - I executed the test using the same setup, except 3 loops instead of 1 and the test fails with the following error: java.net.SocketException: Permission denied: connect at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.security.ssl.SSLSocketImpl.connect(Unknown Source) at sun.security.ssl.SSLSocketImpl.<init>(Unknown Source) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source) at org.apache.jmeter.util.HttpSSLProtocolSocketFactory.createSocket(HttpSSLProtocolSocketFactory.java:151) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) at org.apache.jmeter.protocol.http.sampler.HTTPHC3Impl.sample(HTTPHC3Impl.java:265) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1141) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1130) at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:431) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:258) at java.lang.Thread.run(Unknown Source) - I also tested the same test on a Linux machine and it worked fine even with 200 threads and 5 loops. - I also tested the same test on a Windows 7 machine and it worked fine for 50 threads and 3 loops. The thing is that it didn't worked with default settings, I had to add to jmeter.bat the following line: "set JVM_ARGS=-Djava.net.preferIPv4Stack=true" - On Windows 8.1 machine, I also added the following line to jmeter.bat "set JVM_ARGS=-Djava.net.preferIPv4Stack=true" but the same error occurred. - I also tested the same test on a different Windows 8.1 machine, but the same error occurred. I believe this is a bug of Jmeter, happening only on Windows 8, or at least the workaround that worked on Windows 7, does not work on Windows 8. Please advice! Thank you! Best regards, Sorin
Hi, What Java version are you using ? See http://stackoverflow.com/questions/8360913/weird-java-net-socketexception-permission-denied-connect-error-when-running-groo
As it was mentioned in the original description: Java version: Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Do you need something else regarding Java version? Here is the full java -version result (don't know if it makes any difference though): java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
(In reply to Sorin from comment #2) > As it was mentioned in the original description: > Java version: Java(TM) SE Runtime Environment (build 1.7.0_71-b14) > Do you need something else regarding Java version? > Indeed sorry I missed this information. > Here is the full java -version result (don't know if it makes any difference > though): > java version "1.7.0_71" > Java(TM) SE Runtime Environment (build 1.7.0_71-b14) > Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode) Could you try what is in stackoverflow answer please and say if it worked ? Thanks
Again... as I mentioned in the initial description I tried also -Djava.net.preferIPv4Stack=true option... and didn't worked... It worked only on Windows 7.
If you read the full answers and comment there is one that mentions using java6. Did you try this one ? As a bug in java7 is mentionned.
I used also Java 6 & Java 8, with -Djava.net.preferIPv4Stack=true but same result.
Are you admin on this system ? Can't it be a rights issue ?
I am admin, therefore no issue because of access rights.
Hi, I tried it with : Windows 8.1 PRO Java 1.8_40 Same Test plan It works for me. I suggest you check for firewall or some antivirus doing this or a proxy you are passing through. Also try hitting another server. For now closing as WORKSFORME , feel free to reopen with more details.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3556