I have a problem with jenkins. It reports that the build of my symfony2 project ist successful, but directly after that it crashes with
ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception
java.io.EOFException: input contained no data
I have no clue why and I don't find any helpfull on the net for this error.
It apperead out of the blue. yesterday the build was done correctly.
here is my log:
jslint:
[exec] Result: 1
build:
BUILD SUCCESSFUL
Total time: 13 minutes 21 seconds
[CHECKSTYLE] Collecting checkstyle analysis files...
[CHECKSTYLE] Finding all files that match the pattern build/logs/checkstyle.xml
[CHECKSTYLE] Parsing 1 files in /var/lib/jenkins/jobs/DEVELOPMENT/workspace
[CHECKSTYLE] Successfully parsed file /var/lib/jenkins/jobs/DEVELOPMENT/workspace/build/logs/checkstyle.xml of module with 3 warnings.
[CHECKSTYLE] Computing warning deltas based on reference build #54
[DRY] Collecting duplicate code analysis files...
[DRY] Finding all files that match the pattern build/logs/pmd-cpd.xml
[DRY] Parsing 1 files in /var/lib/jenkins/jobs/DEVELOPMENT/workspace
[DRY] Successfully parsed file /var/lib/jenkins/jobs/DEVELOPMENT/workspace/build/logs/pmd-cpd.xml of module with 207 warnings.
[DRY] Computing warning deltas based on reference build #54
[xUnit] [INFO] - Starting to record.
[xUnit] [INFO] - Processing PHPUnit-3.x (default)
[xUnit] [INFO] - [PHPUnit-3.x (default)] - 1 test report file(s) were found with the pattern 'build/logs/junit.xml' relative to '/var/lib/jenkins/jobs/DEVELOPMENT/workspace' for the testing framework 'PHPUnit-3.x (default)'.
[xUnit] [INFO] - Check 'Failed Tests' threshold.
[xUnit] [INFO] - Check 'Skipped Tests' threshold.
[xUnit] [INFO] - Setting the build status to SUCCESS
[xUnit] [INFO] - Stopping recording.
[JDepend] JDepend plugin is ready
[JDepend] Found 894 classes in 253 packages
ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception
java.io.EOFException: input contained no data
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at hudson.plugins.violations.parse.AbstractParser.expectNextTag(AbstractParser.java:262)
at hudson.plugins.violations.types.pmd.PMDParser.execute(PMDParser.java:39)
at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:57)
at hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:187)
at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:114)
at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:25)
at hudson.FilePath.act(FilePath.java:906)
at hudson.FilePath.act(FilePath.java:879)
at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
at hudson.model.Run.execute(Run.java:1618)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
As I see, the problem comes at a post-build action! Maybe, you don't have any data in the input file for JDepend, as I see from the error log. You must see if you give the correct path to the file and also, you must be sure that the file have some content... maybe the path is correct but the file is empty...
Related
I have some tests written in Selenide/Java.
Also I have local Jenkins on my Windows, tests are running under this Jenkins perfectly, but i have problem with tests from same repository running on external Jenkins (Linux)
Logs from Jenkins:
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running [1mTests[m
ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2
1491 [main] INFO com.github.javafaker.Faker - Using default locale en
Jul 08, 2019 2:36:49 PM com.codeborne.selenide.drivercommands.LazyDriver getAndCheckWebDriver
INFO: No webdriver is bound to current thread: 1 - let's create a new webdriver
Jul 08, 2019 2:36:49 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
2687 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - Reading https://chromedriver.storage.googleapis.com/ to seek chromedriver
3700 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - Latest version of chromedriver is 76.0.3809.25
3704 [main] INFO io.github.bonigarcia.wdm.Downloader - Downloading https://chromedriver.storage.googleapis.com/76.0.3809.25/chromedriver_linux64.zip
4066 [main] INFO io.github.bonigarcia.wdm.Downloader - Extracting binary from compressed file chromedriver_linux64.zip
4194 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as /var/lib/jenkins/.m2/repository/webdriver/chromedriver/linux64/76.0.3809.25/chromedriver
Starting ChromeDriver 76.0.3809.25 (a0c95f440512e06df1c9c206f2d79cc20be18bb1-refs/branch-heads/3809#{#271}) on port 28990
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Jul 08, 2019 2:36:52 PM com.codeborne.selenide.drivercommands.LazyDriver getAndCheckWebDriver
INFO: No webdriver is bound to current thread: 1 - let's create a new webdriver
Starting ChromeDriver 76.0.3809.25 (a0c95f440512e06df1c9c206f2d79cc20be18bb1-refs/branch-heads/3809#{#271}) on port 30572
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[ERROR] [1;31mTests [0;1mrun: [0;1m3[m, [1;31mFailures: [0;1;31m3[m, Errors: 0, Skipped: 0, Time elapsed: 5.878 s[1;31m <<< FAILURE![m - in [1mTests[m
[ERROR] test001_logowanie_programs(Tests) Time elapsed: 3.105 s <<< FAILURE!
java.lang.IllegalStateException: No webdriver is bound to current thread: 1. You need to call open(url) first.
at Tests.test001_logowanie_programs(Tests.java:38)
[ERROR] test002_logowanie_evaluation(Tests) Time elapsed: 0.058 s <<< FAILURE!
java.lang.IllegalStateException: No webdriver is bound to current thread: 1. You need to call open(url) first.
at Tests.test002_logowanie_evaluation(Tests.java:50)
[ERROR] test003_fail(Tests) Time elapsed: 0.159 s <<< FAILURE!
java.lang.IllegalStateException: No webdriver is bound to current thread: 1. You need to call open(url) first.
at Tests.test003_fail(Tests.java:67)
[INFO]
[INFO] Results:
[INFO]
[ERROR] [1;31mFailures: [m
[ERROR] [1;31m Tests.test001_logowanie_programs:38 » IllegalState No webdriver is bound to cu...[m
[ERROR] [1;31m Tests.test002_logowanie_evaluation:50 » IllegalState No webdriver is bound to ...[m
[ERROR] [1;31m Tests.test003_fail:67 » IllegalState No webdriver is bound to current thread: ...[m
[INFO]
[ERROR] [1;31mTests run: 3, Failures: 3, Errors: 0, Skipped: 0[m
[INFO]
[ERROR] There are test failures.
Please refer to /var/lib/jenkins/jobs/nawa_selenide/workspace/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[JENKINS] Recording test results
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.071 s
[INFO] Finished at: 2019-07-08T14:36:56+02:00
[INFO] Final Memory: 31M/330M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /var/lib/jenkins/jobs/nawa_selenide/workspace/pom.xml to com/nawa/1.0-SNAPSHOT/nawa-1.0-SNAPSHOT.pom
channel stopped
Finished: UNSTABLE
On every test we have: java.lang.IllegalStateException: No webdriver is bound to current thread:
Do You have experience with similar situation?
Why on local machine tests are done correctly, but on main Jenkins in company there are only failures caused by No webdriver is bound to current thread?
Only operating system is difference.
This is problem with jenkins configuration under Linux?
When I run the tests locally, using Jenkins (with Maven), I get the same message, but the WebDriver is actually created and runs my test cases.
My maven goals are: mvn clean test -Puat
Declaration of Chrome in tests:
#BeforeClass
public void setUp() throws Exception {
Configuration.holdBrowserOpen = false;
Configuration.browser = "chrome";
Configuration.timeout = 10000;
Configuration.headless = true;
SelenideLogger.addListener("AllureSelenide", new AllureSelenide().screenshots(true).savePageSource(true));
objReader.environmentPropertiesLoader();
}
_______________edit
Now i check Start Xvfb before the build, and shut it down after in Jenkins job Build Environment, i read that is very important, maybe xvfb is the cause, i dont know, now in console i have
java.io.IOException: Cannot run program "Xvfb": error=2, No such file or directory
Did anyone answer? You need to call open Url as the error says.
driver.open(URL HERE) at the end of your setup method.
this is my solution:
after open(), store current webDriver, and before use - restore webDriver
WebDriver webDriver;
// constructor
public SelenideCommand() {
Configuration.holdBrowserOpen = true;
Selenide.open("https://www.instagram.com/");
webDriver = WebDriverRunner.getWebDriver();
}
public void login(String userName, String password) {
WebDriverRunner.setWebDriver(webDriver);
Selenide.element(Selectors.byName("username")).setValue(userName);
Selenide.element(Selectors.byName("password")).setValue(password);
Selenide.elements(Selectors.byTagName("button")).get(1).click();
}
Im trying to following the instructions on https://webdev.dartlang.org/guides/get-started
I have installed 2.0.0-dev.55.0 in /usr/lib/dart.
And have Dartium installed in /home/bob/Documents/software/dartium-linux-x64-stable-1.24.2.0/chrome.
When I try 5. Run the app. I get the following:
pubspec.yaml
name: angular_app
description: A web app that uses AngularDart
version: 0.0.1
environment:
sdk: '>=2.0.0-dev.51.0 <2.0.0'
dependencies:
angular: ^5.0.0-alpha+12
dev_dependencies:
angular_test: ^2.0.0-alpha
build_runner: ^0.8.8
build_test: ^0.10.2
build_web_compilers: ^0.4.0
test: ^0.12.30
I have tried right-click pubspec.yaml and choose Pub: Get Dependencies but this didnt make any difference.
I have also tried using the sample dart project from https://github.com/angular-examples/quickstart which uses Dart 2, and NOT using Dartium. But I still get the same error.
When I run pub run build_runner serve I get
Could not find bin/build_runner.dart in package build_runner.
Building in WebStorm
When I build using Webstorm, everything looks rosie:
Working dir: /home/anton/WebstormProjects/quickstart
/usr/lib/dart/bin/pub global run webdev build --output=web:build
[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[INFO] Reading cached asset graph completed, took 675ms
[INFO] Checking for updates since last build...
[INFO] Checking for updates since last build completed, took 808ms
[INFO] Running build...
[INFO] build_web_compilers|entrypoint on web/main.dart:Running dart2js with --minify --packages=.package-643dc5d58d0e8c6a495fcb24c0476818 -oweb/main.dart.js web/main.dart
[INFO] 1.5s elapsed, 3/4 actions completed.
[INFO] 2.6s elapsed, 3/4 actions completed.
[INFO] 3.7s elapsed, 3/4 actions completed.
[INFO] 4.8s elapsed, 3/4 actions completed.
[INFO] 5.9s elapsed, 3/4 actions completed.
[INFO] 7.0s elapsed, 3/4 actions completed.
[INFO] 8.1s elapsed, 3/4 actions completed.
[INFO] build_web_compilers|entrypoint on web/main.dart:Dart2Js finished with:
Compiled 9,664,399 characters Dart to 162,915 characters JavaScript in 7.72 seconds
Dart file (web/main.dart) compiled to JavaScript: web/main.dart.js
[INFO] Running build completed, took 9.2s
[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 271ms
[INFO] Creating merged output dir `build`...
[INFO] Creating merged output dir `build` completed, took 2.9s
[INFO] Writing asset manifest...
[INFO] Writing asset manifest completed, took 3ms
[INFO] Succeeded after 12.3s with 3 outputs (1859 actions)
Process finished with exit code 0
I have also tried using https://github.com/dart-lang/angular/tree/master/examples but still get the same error.
I don't know how to put a conditioned token to evaluate if a file exists with the Conditional Step Plugin in Jenkins:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 54.479 s
[INFO] Finished at: 2017-09-05T12:57:09+02:00
[INFO] Final Memory: 16M/56M
[INFO] ------------------------------------------------------------------------
Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Unrecognized macro 'test_resultados_miniprueba' in '$test_resultados_miniprueba'], action = [Don't run]
Finished: SUCCESS
What is the error in the condition token?
Thanks so much for your time!!!!
In your case $test_resultados_miniprueba does not resolve to anything, i.e. it is not a token or environment variable. It seems you wish to test if a file exists? That can be done with the 'File Exists' condition.
The Conditional Buildstep Plugin uses the Run Condition Plugin internally, so you can get a little bit more of documentation there.
it's my first post here so please excuse me for making any mistakes.
I try to perform the installation of ZAProxy Plugin in Jenkins.
I installed the custom tools plugin by inserting the values according to the website https://wiki.jenkins-ci.org/display/JENKINS/ZAProxy+Plugin.
After that I execute ZAProxy in my Jenkins Job:
After performing the build I see the following error:
Perform ZAProxy
Unpacking https://github.com/zaproxy/zaproxy/wiki/Downloads/ZAP_2.4.3_Core.tar.gz to /var/lib/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/ZAProxy_2.4.3 on Jenkins
ERROR: java.io.IOException: Failed to install https://github.com/zaproxy/zaproxy/wiki/Downloads/ZAP_2.4.3_Core.tar.gz to /var/lib/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/ZAProxy_2.4.3
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:832)
at hudson.tools.ZipExtractionInstaller.performInstallation(ZipExtractionInstaller.java:79)
at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68)
at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:108)
at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
at com.cloudbees.jenkins.plugins.customtools.CustomTool.forNode(CustomTool.java:154)
at com.cloudbees.jenkins.plugins.customtools.CustomTool.forNode(CustomTool.java:59)
at fr.novia.zaproxyplugin.ZAProxy.retrieveZapHomeWithToolInstall(ZAProxy.java:486)
at fr.novia.zaproxyplugin.ZAProxy.checkParams(ZAProxy.java:574)
at fr.novia.zaproxyplugin.ZAProxy.startZAP(ZAProxy.java:613)
at fr.novia.zaproxyplugin.ZAProxyBuilder.perform(ZAProxyBuilder.java:159)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:919)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:870)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.io.IOException: Failed to unpack https://github.com/zaproxy/zaproxy/wiki/Downloads/ZAP_2.4.3_Core.tar.gz (26 bytes read of total -1)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:826)
... 19 more
Caused by: java.io.IOException: Failed to extract input stream
at hudson.FilePath.readFromTar(FilePath.java:2300)
at hudson.FilePath.access$400(FilePath.java:190)
at hudson.FilePath$10.invoke(FilePath.java:720)
at hudson.FilePath$10.invoke(FilePath.java:718)
at hudson.FilePath.act(FilePath.java:990)
at hudson.FilePath.act(FilePath.java:968)
at hudson.FilePath.untarFrom(FilePath.java:718)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:824)
... 19 more
Caused by: java.io.IOException: incorrect header check
at com.jcraft.jzlib.InflaterInputStream.read(InflaterInputStream.java:112)
at org.apache.commons.compress.utils.IOUtils.readFully(IOUtils.java:160)
at org.apache.commons.compress.utils.IOUtils.readFully(IOUtils.java:134)
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.readRecord(TarArchiveInputStream.java:419)
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getRecord(TarArchiveInputStream.java:388)
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:269)
at hudson.FilePath.readFromTar(FilePath.java:2278)
... 26 more
Build step 'Execute ZAProxy' marked build as failure
[DependencyCheck] Collecting Dependency-Check analysis files...
[DependencyCheck] Finding all files that match the pattern dependency-check- report.xml
[DependencyCheck] Parsing 1 file in /var/lib/jenkins/jobs/<project name>_continuous/workspace
[DependencyCheck] Successfully parsed file /var/lib/jenkins/jobs/<project name>_continuous/workspace/dependency-check-report.xml of module <company name> HELP with 0 unique warnings and 0 duplicates.
[DependencyCheck] Computing warning deltas based on reference build #75
[DependencyCheck] Ignore new warnings since this is the first valid build
[DependencyCheck] Plug-in Result: Success - no threshold has been exceeded
Finished: FAILURE
I just couldn*t find any information about this error(s) and I'm sure it could help other newcomers who have to use this plugin in the future. Please help me. It's the Jenkins of my company so I have to conceal internal information. I overdraw it for you with red color.
Where did you get that URL from?
The correct one for ZAP 2.4.3 core is: https://github.com/zaproxy/zaproxy/releases/download/2.4.3/ZAP_2.4.3_Core.tar.gz
This is similar to the asked and answered question Maven test dependency on multi module project. However, this has nothing to do with the test phase, instead I'm having problems with package.
I have a multi-module project something like:
root
|
|-parent-client
| |
| |-client-1
| |
| \-client-2
|
\-parent-server
|
|-server-1
|
|-server-2
|
|-server-3
|
\-server-4
My dependencies are client-1 -> client-2 -> server-1 -> server-2 -> server-3 -> server-4, which is to say that client-2 depends on server-1, server-1 depends on server-2, and so on. Each is scoped to compile.
So the problem is that when I run mvn clean package in the root, I get a compilation failure in server-2 that package server-3 does not exist.
When I run mvn clean compile followed by mvn package in the root, it runs through without issue.
It always fails at the same module when it fails.
My understanding of the Build Lifecycle is that compile package is redundant since package includes the compile lifecycle.
The project is more complex, with a total of 41 modules, two parents and one root. Creating a simple example inevitably works as expected.
I'm stumped as to how I should proceed.
Update 2015-10-25
Turns out I was wrong about the order of commands for success. I've updated my question and the description, and included debug output per Michael-O's request:
<snip/>
[INFO] --- maven-ejb-plugin:2.3:ejb (default-ejb) # terradatum-systemconfig ---
[INFO] Building EJB terradatum-systemconfig-4.8.1-SNAPSHOT with EJB version 3.0
[INFO] Building jar: /home/rbellamy/Development/Terradatum/metrics-project/metrics-server/systemconfig/ejb/target/terradatum-systemconfig-4.8.1-SNAPSHOT.jar
[INFO] Building EJB client terradatum-systemconfig-4.8.1-SNAPSHOT-client
[INFO] Building jar: /home/rbellamy/Development/Terradatum/metrics-project/metrics-server/systemconfig/ejb/target/terradatum-systemconfig-4.8.1-SNAPSHOT-client.jar
<snip/>
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building terradatum-payment 4.8.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # terradatum-payment ---
[INFO] Deleting /home/rbellamy/Development/Terradatum/metrics-project/metrics-server/payment/ejb/target
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) # terradatum-payment ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) # terradatum-payment ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /home/rbellamy/Development/Terradatum/metrics-project/metrics-server/payment/ejb/target/classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] bootstrap class path not set in conjunction with -source 1.6
[INFO] 1 warning
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/rbellamy/Development/Terradatum/metrics-project/metrics-server/payment/ejb/src/main/java/com/terradatum/common/payment/PaymentRemoteDelegate.java:[13,42] package com.terradatum.common.systemconfig does not exist
<snip/>
Update 2015-11-16
After much refactoring the build no longer fails in the same place. I've seen it fail in a similar way, consistently, but the location of the failure moves around. I am not running multiple threads, but it seems very clear to me there's a race somewhere in which an obviously available package (absolutely located and reachable in my ~/.m2/repository local cache, and added to the classpath) is not visible to the Maven compiler.
And knowing what I know about race conditions, I have no idea how I would file a bug report of any substance given I can't offer anything more than supposition and finger pointing.