Connection reset by peer.socket write error in jmeter - java

I am new to JMeter and I am getting an error in Jmeter
Response code:Non HTTP response code:Java.net.SocketException Response
message: Non HTTP response message: Connection reset by peer.socket
write error.
Is this an easy fix?

If you totally sure that this is a problem on JMeter, not application under test side, you can try working it around as follows:
In user.properties file (located in JMeter's "bin" folder)
httpclient4.retrycount=1
hc.parameters.file=hc.parameters
In hc.parameters file:
http.connection.stalecheck$Boolean=true
Restart JMeter to pick the properties up.
References:
Connection Reset since JMeter 2.10 ?
Apache JMeter Properties Customization Guide

Related

Java/jmeter http request fails but curl works

I am trying a very basic http request with jmeter, but it seems to always get the error below. I have tried a simple get against google which is fine but the internal servers are not :
java.net.NoRouteToHostException: No route to host (Host unreachable)
I can curl the same url successfully with a 200 response, so not sure if its jmeter or java? The only thing that is unique is that our internal servers are resolving with ipv6, but I would not think that would be the problem?
Try adding the next line to system.properties file (lives in "bin" folder of your JMeter installation)
java.net.preferIPv6Addresses=true
Or pass the aforementioned property via -D command-line argument like:
jmeter -Djava.net.preferIPv6Addresses=true -n -t test.jmx -l result.jtl
References:
Java: Networking Properties
Configuring JMeter
Apache JMeter Properties Customization Guide
Overriding Properties Via The Command Line

JMeter error while running from Jenkins "java.lang.NumberFormatException: For input string: "timeStamp"

I am getting below error when running JMeter script via Jenkins.Not able to figure out what is causing error.
Performance: Failed to parse file 'C:\Program Files (x86)\Jenkins\jobs\JMeter Test\builds\12\performance-reports\JMeter\test.jtl': For input string: "timeStamp"
java.lang.NumberFormatException: For input string: "timeStamp"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at java.lang.Long.valueOf(Unknown Source)
at hudson.plugins.performance.JMeterCsvParser.getSample(JMeterCsvParser.java:153)
at hudson.plugins.performance.JMeterCsvParser.parse(JMeterCsvParser.java:124)
at hudson.plugins.performance.JMeterParser.parseCsv(JMeterParser.java:189)
at hudson.plugins.performance.JMeterParser.parse(JMeterParser.java:48)
at hudson.plugins.performance.AbstractParser.parse(AbstractParser.java:56)
at hudson.plugins.performance.PerformancePublisher.perform(PerformancePublisher.java:347)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Email was triggered for: Always
Sending email for trigger: Always
Finished: SUCCESS
Below is the content of test.jtl file
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,grpThreads,allThreads,Latency,IdleTime
1468432148291,2027,178 /BOT/,Non HTTP response code: java.net.ConnectException,Non HTTP response message: Connection refused: connect,Clock-in / Clock-out Tests 1-1,text,false,,2204,7,7,0,0
1468432148608,2020,178 /BOT/,Non HTTP response code: java.net.ConnectException,Non HTTP response message: Connection refused: connect,Clock-in / Clock-out Tests 1-2,text,false,,2204,8,8,0,0
1468432148941,2024,178 /BOT/,Non HTTP response code: java.net.ConnectException,Non HTTP response message: Connection refused: connect,Clock-in / Clock-out Tests 1-3,text,false,,2204,9,9,0,0
1468432149255,1993,178 /BOT/,Non HTTP response code: java.net.ConnectException,Non HTTP response message: Connection refused: connect,Clock-in / Clock-out Tests 1-4,text,false,,2204,9,9,0,0
According to Continuous Integration 101: How to Run JMeter With Jenkins article it might be due to formats mismatch, i.e. Jenkins Performance Plugin expects XML and gets CSV.
For your first couple of runs, I recommend “telling” JMeter to store its results in an XML format using one of these approaches:
Add the ``jmeter.save.saveservice.output_format=xml line to the user.properties file (this is located in /bin folder of your JMeter installation
Pass the property via the -J command-line argument, such as: C:\jmeter\bin\jmeter.bat -Jjmeter.save.saveservice.output_format=xml -n -t C:\jmeter\extras\Test.jmx -l Test.jtl
You can also use CSV files with the Performance Plugin. However, this requires extra configuration whereas XML files work fine out of the box.

Passing GrobidExtractor.properties to Tika in Java?

I'm trying to write a Java application that uses the JournalParser to extract authors, citations, etc. from journal articles. The documentation for the GrobidJournalParser gives instructions for the command line app and for TikaServer. I need to point to Grobid running somewhere other than localhost:8080. I have a GrobidExtractor.properties file containing the correct URL on my classpath, but it doesn't seem to get found - I get an error because it's trying to access Grobid on localhost:8080.
WARNING: Interceptor for {http://localhost:8080/processHeaderDocument}WebClient has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: No message body writer has been found for class org.apache.cxf.jaxrs.ext.multipart.MultipartBody, ContentType: multipart/form-data
at org.apache.cxf.jaxrs.client.WebClient$BodyWriter.doWriteBody(WebClient.java:1220)
Is there some other way to tell Tika or the JournalParser where to find Grobid? The Javadocs were not helpful in this regard.
As explained in the documentation on using GROBID with Tika, if you want to configure Tika to use an alternate GROBID server you do so with a file named org/apache/tika/parser/journal/GrobidExtractor.properties
You have only called yours GrobidExtractor.properties, which is why it isn't being picked up. The full path is required
Assuming you're using Linux, using the Tika app, and with the GROBID properties in the current directory, you'd need to fix it with something like:
mkdir -p org/apache/tika/parser/journal
mv GrobidExtractor.properties org/apache/tika/parser/journal/
java -classpath .:tika-app-1.13.jar org.apache.tika.cli.TikaCLI --metadata journal.pdf

Can't access RabbitMQ server even after changing configuration file?

By following this link
http://www.rabbitmq.com/access-control.html
I changed /etc/rabbitmq/rabbitmq.config and added the line
[{loopback_users, []}]
Now the config file looks like
[{kernel, [{inet_dist_use_interface, {127,0,0,1}}]},
{rabbit, [{loopback_users, []}, {tcp_listeners, [{"127.0.0.1", 5672}]}]},
{rabbitmq_mochiweb, [{listeners, [{mgmt, [{ip, "127.0.0.1"},
{port, 55672}]}]}]}].
Then I restarted my rabbitmq server by executing in following order:
service rabbitmq-server stop
service rabbitmq-server start
Still I am unable to connect to this server remotely (using both Python and Java clients). It gives connection refused error.
In my configuration I only have:
[{rabbit, [{loopback_users, []}]}]
and everything works fine,
try to remove tcp_listener option.

SoapUI "failed to load url" error when loading WSDL

I keep having some weird problems. The main one is that I keep getting the following error when trying to add a WSDL to a new project:
Error loading [https://.../token?wsdl]: java.lang.Exception: Failed to load url; https://.../token?wsdl, 0 -
Here's the message recorded in the error.log file:
java.lang.Exception: Failed to load url; https://.../token?wsdl, 0 -
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader.load(UrlWsdlLoader.java:184)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:121)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:535)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:524)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionCache.update(AbstractDefinitionCache.java:97)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:226)
at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:149)
at java.lang.Thread.run(Unknown Source)
I verified that the application at that URL is up and running, and I can get to the WSDL from a web browser, but I keep getting this error message no matter what. I am using SoapUI 4.5.0 (32-bit) on a Windows 7 box. I've also tried the 64-bit version with the same results. It happens whether I am on VPN or not.
Do you know why I might be getting this error?
I have had the same problem. I resolved it by disabling the proxy in the SoapUI preferences.
(source : http://www.eviware.com/forum/viewtopic.php?f=13&t=12460)
In my case the server were the service was installed was configured only for TLS. SSL was not allowed. So you have to update SoapUI vmoptions file by adding the server TLS version
-Dsoapui.https.protocols=TLSv1.2
You can find vmoptions file under SoapUI installation folder:
C:\Program Files (x86)\SmartBear\SoapUI-5.0.0\bin\soapUI-5.0.0.vmoptions
I have had similar problems and worked around them by saving the WSDL locally. Don't forget to save any XSD files as well. You may need to edit the WSDL to specify an appropriate location for XSDs.
I got this error when trying to load a WebService implemented in MS Dynamics AX. Because I was connecting via VPN to my network, something went wrong with IPv6 settings. After Googling, I found the solution here: http://support.microsoft.com/kb/929852
In my case the
Error loading [https://.../token?wsdl]: java.lang.Exception: Failed to load url; https://.../token?wsdl, 0
was caused by fake certificate.
If you get the following in browser
"There is a problem with this website’s security certificate."
this is the case.
The resolution was to import a certificate to
C:\Program Files (x86)\SmartBear\SoapUI-5.0.0\jre\lib\security\cacerts
Which is default java used by SOAPUI
This could be a problem with IPV6 address SOAP UI picking. Adding the following JVM option fixed it for me:
-Djava.net.preferIPv4Stack=true
I added it here:
C:\Program Files\SmartBear\soapUI-4.5.2\bin\soapUI-4.5.2.vmoptions
Inside the wsdl file look for the import element, which looks like this :
`<import namespace="nameSpaceValue" location="Users/myname/.../targetxsdName.xsd"/>`
Change the location attribute in the above element to the location of your xsd files stored locally, and it should work.
The following solution helped me:
-Djsse.enableSNIExtension=false
In SoapUI-5.3.0.vmoptions.
This error is due to an erroneous schemaLocation in the WSDL file.
Indicate the correct location (either path on the disk or xsd url) of the xsd file in the wsdl file
exp
<xsd:import namespace="http://xyz:8080/" schemaLocation="http://172.17.16.53:9080/auth/authorizationBS?xsd=1"></xsd:import>
I had this issue when trying to use a SOCKS proxy. It appears that SoapUI does not support SOCKS proxys. I am using the Boomerang Chrome app instead.
I had this error and in my case, the problem was that I was using "localhost" in the URL.
I resolved that changing the localhost word for the respective IP, (Windows + R -> cmd -> ipconfig) then read the IP and write it to the URL replacing the "localhost" word
Close and reopen soapui. Probably is a bug of the application
Update SoapUI version to SoapUI 5.5.0. This error causes when I tried to load wsdl, because of old SoapUI version
If you are running your Web Application with the default port of 8080, please try to change the port to some other value and run your application again and trigger again your SOAPUI request. As you might have history projects in your SOAP UI workspace with port number 8080, might create issues.
My solution was to modify the java.security file:
\SoapUI-5.3.0\jre\lib\security\java.security
Comment code syntax:
#jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
#jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
For java version above 1.8,
Use below command to setup soapUI jar
java -jar --add-modules java.xml.bind --add-modules java.xml.ws <path for jar file+jar file name.jar>

Categories

Resources