-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Powered by SuggestiMate
We get this socket timeout the odd occasion, as you can see we have tried setting the HttpTimeout to a big number but it doesn't seem to help.
12:59:36 hudson.plugins.fitnesse.FitnesseBuilder:
{fitnesseTargetPage=PayrollTeam.ModulePayroll.AaTaxArea.NewZealandTax, fitnesseTargetIsSuite=true, fitnesseHost=Private, fitnesseHttpTimeout=2700000, fitnessePortRemote=8886, fitnesseStart=False, fitnessePathToXmlResultsOut=C:\PayGlobal\FitNesse\Results\XESuiteNZTax_Results.xml}12:59:36 Connnecting to http://PAYFIT003:8886/PayrollTeam.ModulePayroll.AaTaxArea.NewZealandTax?suite&format=xml&includehtml
12:59:36 Connected: 200/OK
13:44:46 java.net.SocketTimeoutException: Read timed out
13:44:46 at java.net.SocketInputStream.socketRead0(Native Method)
13:44:46 at java.net.SocketInputStream.read(Unknown Source)
13:44:46 at java.net.SocketInputStream.read(Unknown Source)
13:44:46 at java.io.BufferedInputStream.fill(Unknown Source)
13:44:46 at java.io.BufferedInputStream.read1(Unknown Source)
13:44:46 at java.io.BufferedInputStream.read(Unknown Source)
13:44:46 at sun.net.www.http.ChunkedInputStream.readAheadBlocking(Unknown Source)
13:44:46 at sun.net.www.http.ChunkedInputStream.readAhead(Unknown Source)
13:44:46 at sun.net.www.http.ChunkedInputStream.read(Unknown Source)
13:44:46 at java.io.FilterInputStream.read(Unknown Source)
13:44:46 at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
13:44:46 at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
13:44:46 at hudson.plugins.fitnesse.FitnesseExecutor.getHttpBytes(FitnesseExecutor.java:230)
13:44:46 at hudson.plugins.fitnesse.FitnesseExecutor$1.run(FitnesseExecutor.java:201)
13:44:46 at java.lang.Thread.run(Unknown Source)
I've had a quick look at the code and I'm pretty sure this is where it is crashing:
try {
log.println("Connnecting to " + pageCmdTarget);
HttpURLConnection connection = (HttpURLConnection) pageCmdTarget.openConnection();
connection.setReadTimeout(httpTimeout);
log.println("Connected: " + connection.getResponseCode() + "/" + connection.getResponseMessage());
inputStream = connection.getInputStream();
long recvd = 0, lastLogged = 0;
byte[] buf = new byte[4096];
int lastRead;
while ((lastRead = inputStream.read(buf)) > 0) {
bucket.write(buf, 0, lastRead);
timeout.reset();
recvd += lastRead;
if (recvd - lastLogged > 1024)
}
} catch (IOException e)
finally {
if (inputStream != null) {
try
catch (Exception e)
{ // swallow } }
}
I'm not very good with networking code so would someone please be able to look at this for me and see if there is an issue or suggest something environmentally we could do to avoid these timeouts?
Cheers,
Sam
[JENKINS-18501] Fitnesse Plugin - java.net.SocketTimeoutException: Read timed out
Have you tried to increase the HTTP Timeout (ms) and Test Timeout (ms) in the FitNesse Plugin ?
I solved this Java Read time out issue by increasing the HTTP Timeout (ms) and Test Timeout (ms), put it long enough to finish all you test suite
Hi guys,
I have to reopen this ticket, because I have the same Problem over and over. In my Project I execute four FitNesse tests (one after another). To get to the bottom of it, I use a different port for every single FitNesse Test. I also use different slim.ports in the FitNesse environment.
The SocketTimeoutException doesn't appear on every run, but usually on one out of the four. I can tell you that in the case where the exception appears:
- FitNesse process is running
- The Server opened the port that was specified
- There are no FitNesse tests executed
So the main reason is that the FitNesse tests aren't executed and that causes the SocketTimeoutException. Do you have any idea?
hudson.plugins.fitnesse.FitnesseBuilder: {fitnessePathToRoot=sl_instance/fitnesse.project/FitNesseRoot, additionalFitnesseOptions=-f ./../../launcher/plugin.properties.jenkins, fitnesseTestTimeout=600000, fitnesseJdk=, fitnesseStart=True, fitnesseHttpTimeout=600000, fitnesseTargetIsSuite=true, fitnesseJavaOpts=-Xmx128M, fitnessePathToJar=sl_instance/fitnesse.project/libs/fitnesse/fitnesse-standalone.jar, fitnesseTargetPage=integration.testBase.AccessTestSuite, fitnessePathToXmlResultsOut=sl_instance/reports/fitnesse/fitnesse-results.xml, fitnessePortLocal=28002, fitnesseJavaWorkingDirectory=sl_instance/fitnesse.project/libs/fitnesse} /var/lib/jenkins/jobs/integrationTest/workspace Starting new Fitnesse instance... [fitnesse] $ java -Xmx128M -jar /var/lib/jenkins/jobs/integrationTest/workspace/sl_instance/fitnesse.project/libs/fitnesse/fitnesse-standalone.jar -d /var/lib/jenkins/jobs/integrationTest/workspace/sl_instance/fitnesse.project -r FitNesseRoot -p 28002 -f ./../../launcher/plugin.properties.jenkins Wait for Fitnesse Server start .Bootstrapping FitNesse, the fully integrated standalone wiki and acceptance testing framework. root page: fitnesse.wiki.fs.WikiFilePage: FitNesseRoot logger: none authenticator: fitnesse.authentication.PromiscuousAuthenticator page factory: fitnesse.html.template.PageFactory page theme: bootstrap Starting FitNesse on port: 28002 Fitnesse server started in 1000ms. Can't find target file: sl_instance/reports/fitnesse/fitnesse-results.xml with working directory: /var/lib/jenkins/jobs/integrationTest/workspace Connnecting to http://localhost:28002/integration.testBase.AccessTestSuite?suite&format=xml&includehtml Connected: 200/OK java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171) at java.net.SocketInputStream.read(SocketInputStream.java:141) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) at java.io.BufferedInputStream.read(BufferedInputStream.java:345) at sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java:552) at sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:609) at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:696) at java.io.FilterInputStream.read(FilterInputStream.java:133) at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3375) at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3368) at hudson.plugins.fitnesse.FitnesseExecutor.getHttpBytes(FitnesseExecutor.java:253) at hudson.plugins.fitnesse.FitnesseExecutor$1.run(FitnesseExecutor.java:231) at java.lang.Thread.run(Thread.java:745) Force close of input stream. Xml results saved as UTF-8 to /var/lib/jenkins/jobs/integrationTest/workspace/sl_instance/reports/fitnesse/fitnesse-results.xml
Hi there,
yesterday I removed the FitNesse Buildstep and replaced it with an ant-call. This ant-call creates a FitNesse instance and tests a Suite. But I still get the timeout on some of the tests. I can see that the FitNesse instance is running and the Chrome instance as well, but there is no Chrome visible and therefore no test will be executed.
Seems like this problem occures in the FitNesse instance itself and has nothing to do with the FitNesse Plugin...
Hi all,
I seem to also be facing the same issue.
But contrarily to previous comment from Daniel Eichert, I know that the suite is still running after the build in Jenkins has failed because I see my mockup being rebooted and tests performed the way I expect them to be.
Here is the log of my case:
Started by user admin Running as SYSTEM [EnvInject] - Loading node environment variables. Building in workspace C:\workdir\Jenkins\workspace\Agecanonix - Functional Tests hudson.plugins.fitnesse.FitnesseBuilder: {fitnessePathToJunitResultsOut=fitnesse-result-junit.xml, fitnesseTestTimeout=3600000, fitnesseUsername=, fitnesseStart=False, fitnesseHost=dczc84881nl, fitnesseHttpTimeout=60000, fitnesseEnableSsl=false, fitnesseTargetIsSuite=true, fitnessePortRemote=8079, fitnesseTargetPage=FrontPage.FunctionalTests.SupportFeature1System.SystemConfiguration.ConfigurableIO.Configuration.ManualConfiguration&mockup_name=agecanonix&mockup_ip=10.1.60.112&plc_ip=10.1.60.122&remote_power_ip=10.1.60.102&remote_power_port=80&remote_power_socket=socket1, fitnessePathToXmlResultsOut=fitnesse-results.xml} Can't find target file: fitnesse-result-junit.xml with working directory: C:\workdir\Jenkins\workspace\Agecanonix - Functional Tests Attempt to delete C:\workdir\Jenkins\workspace\Agecanonix - Functional Tests\fitnesse-result-junit.xml java.io.IOException: Unable to delete 'C:\workdir\Jenkins\workspace\Agecanonix - Functional Tests\fitnesse-result-junit.xml'. Tried 3 times (of a maximum of 3) waiting 0,1 sec between attempts. at jenkins.util.io.PathRemover.forceRemoveFile(PathRemover.java:81) at hudson.Util.deleteFile(Util.java:271) at hudson.FilePath$Delete.invoke(FilePath.java:1546) at hudson.FilePath$Delete.invoke(FilePath.java:1542) at hudson.FilePath.act(FilePath.java:1075) at hudson.FilePath.act(FilePath.java:1058) at hudson.FilePath.delete(FilePath.java:1539) at hudson.plugins.fitnesse.FitnesseExecutor.execute(FitnesseExecutor.java:75) at hudson.plugins.fitnesse.FitnesseBuilder.perform(FitnesseBuilder.java:305) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1856) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) Caused by: java.nio.file.AccessDeniedException: C:\workdir\Jenkins\workspace\Agecanonix - Functional Tests\fitnesse-result-junit.xml at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsFileAttributeViews$Dos.updateAttributes(Unknown Source) at sun.nio.fs.WindowsFileAttributeViews$Dos.setReadOnly(Unknown Source) at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:298) at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:259) at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:239) at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:205) at jenkins.util.io.PathRemover.forceRemoveFile(PathRemover.java:77) ... 18 more Can't find target file: fitnesse-results.xml with working directory: C:\workdir\Jenkins\workspace\Agecanonix - Functional Tests Connecting to http://dczc84881nl:8079/FrontPage.FunctionalTests.SupportFeature1System.SystemConfiguration.ConfigurableIO.Configuration.ManualConfiguration?suite&mockup_name=agecanonix&mockup_ip=10.1.60.112&plc_ip=10.1.60.122&remote_power_ip=10.1.60.102&remote_power_port=80&remote_power_socket=socket1&format=xml&includehtml Connection Status: 200/OK Fitnesse-Test-Id: 5 java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read1(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at sun.net.www.http.ChunkedInputStream.readAheadBlocking(Unknown Source) at sun.net.www.http.ChunkedInputStream.readAhead(Unknown Source) at sun.net.www.http.ChunkedInputStream.read(Unknown Source) at java.io.FilterInputStream.read(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source) at hudson.plugins.fitnesse.FitnesseExecutor.getHttpBytes(FitnesseExecutor.java:331) at hudson.plugins.fitnesse.FitnesseExecutor$1.run(FitnesseExecutor.java:292) at java.lang.Thread.run(Unknown Source) Force close of input stream. java.nio.file.AccessDeniedException: C:\workdir\Jenkins\workspace\Agecanonix - Functional Tests\fitnesse-results.xml at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source) at java.nio.file.spi.FileSystemProvider.newOutputStream(Unknown Source) at java.nio.file.Files.newOutputStream(Unknown Source) at hudson.FilePath.write(FilePath.java:2063) at hudson.plugins.fitnesse.FitnesseExecutor.writeFitnesseResults(FitnesseExecutor.java:395) at hudson.plugins.fitnesse.FitnesseExecutor.access$200(FitnesseExecutor.java:26) at hudson.plugins.fitnesse.FitnesseExecutor$1.run(FitnesseExecutor.java:293) at java.lang.Thread.run(Unknown Source) Attempt to convert C:\workdir\Jenkins\workspace\Agecanonix - Functional Tests\fitnesse-results.xml to C:\workdir\Jenkins\workspace\Agecanonix - Functional Tests\fitnesse-result-junit.xml java.nio.file.AccessDeniedException: C:\workdir\Jenkins\workspace\Agecanonix - Functional Tests\fitnesse-results.xml at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source) at java.nio.file.Files.newByteChannel(Unknown Source) at java.nio.file.Files.newByteChannel(Unknown Source) at java.nio.file.spi.FileSystemProvider.newInputStream(Unknown Source) at java.nio.file.Files.newInputStream(Unknown Source) at hudson.FilePath.read(FilePath.java:1942) at hudson.plugins.fitnesse.ConvertReport.generateJunitResult(ConvertReport.java:26) at hudson.plugins.fitnesse.FitnesseExecutor.execute(FitnesseExecutor.java:96) at hudson.plugins.fitnesse.FitnesseBuilder.perform(FitnesseBuilder.java:305) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1856) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) [qTest] [INFO] [qTest] [INFO] Jenkins version: 2.222.3 [qTest] [INFO] ------------------------------------------------------------------------ [qTest] [INFO] Submit JUnit Test Results to qTest [qTest] [INFO] Build Version: 1.4.5 [qTest] [INFO] ------------------------------------------------------------------------ [qTest] [INFO] Submit Junit test result to qTest at:http://blvsviqtest31.imaje.intra:8080/ (cid:15) [qTest] [INFO] With project: Systems Integration sandbox (id=3). [qTest] [INFO] With release: 2020.18 (id=96). [qTest] [INFO] With no environment. [qTest] [INFO] [qTest] [INFO] ------------------------------------------------------------------------ [qTest] [INFO] Read test results from jenkins. [qTest] [WARN] No testResult action was added to project. [qTest] [WARN] No JUnit test result found. [qTest] [INFO] ------------------------------------------------------------------------ Finished: SUCCESS
If I let the default 60s in the HTTP timeout field, the build hang up at the end of the 60s.
I'm expecting to see this HTTP timeout in trying to contact the host ONLY, and the other one (Test timeout) involved in the time for the tests execution ONLY. The two timeouts should not be linked.
Is there anything planned on this side? This would help us a lot!
Thanks
Hey all, me and another developer here have been looking into this further and we see that there is only 1 variable used for the httpTimeout and the tests timeout. This is not good in our case as it may take 45 minutes to run a test (big reports) but it also means it will take 45 minutes for the test to fail if the http fails to connect and timeout.
Also it doesn't seem to retry to connect if it fails to connect the first time?