Open F1ashhimself opened 6 years ago
@F1ashhimself Hello, maybe you can try to reduce the length? Probably you need to have a line less then 2047 symbols: see: https://support.microsoft.com/en-us/help/830473/command-prompt-cmd-exe-command-line-string-limitation
@vbragin Hi.
We don't use XP system so first of all limitations should be 8191. Also its impossible to reduce line length when you using 50+ matrix job subbuilds, it all concatenates in huge line. As @eroshenkoam suggested, it's better to combine this agregation in file and then execute it.
I am seeing this issue as well, and the length of my command (including all directories) is only about 3,000 characters. As far as I understand, the Win7 limit is around 8,000 characters.
I think I understand why this is happening (besides using a file as suggested above), and I have a potential fix which worked in my environment. On the Jenkins slaves, where Allure is installed, there is a file in the "bin" directory called "allure.bat". I think this is the executable called by Jenkins to produce the report.
Inside that file, the CLASSPATH environment variable is set, and because of other variables interpolated inside that assignment, I'm betting the CLASSPATH variable itself is several thousand characters long. Then, unnecessarily, the -classpath parameter to java.exe is also passed the value of this environment variable. Reading the documentation of java.exe, you only have to set the classpath one way: either via environment variables or via the parameter to java.exe.
The fix is to simply delete -classpath %CLASSPATH% from the executing statement. I did this, and my long command worked just fine.
I would love to submit a patch to this plug-in or allure itself, so I don't have to manage this manually, but I don't really know where the contents of allure.bat are generated. Anyone here know?
I am also seeing this issue when we have matrix build
An example of my output. I ran around 50 different test classes and when allure is trying to generate the report for all these 50 test class it throws error.
[workspace] $ "C:\Program Files (x86)\Jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\Allure_2.7.0\bin\allure.bat" generate "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure1051245038278739955results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure1198028742925113484results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure1563013124874759315results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure1882694345674788591results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure1955073169269514036results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure2063172490262134191results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure2451197406121799032results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure2479806166862002306results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure2532201061810811226results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure2579336103235259088results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure26634498288506803results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure2795274377266800899results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure2836628872470898974results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure2851425369445017052results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure2904511517056729112results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure2910398599103237785results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure2993739939769684113results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure3034188645827881332results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure3200985616219755336results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure3277336320226525241results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure3307740178668818998results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure338525385843909664results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure3785672595442765978results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure3910534240127816025results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure3978844006312904102results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure4198002647392497711results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure4220960384358863211results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure4259757662743800630results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure4688016699277476235results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure5227920953571441130results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure5323005041861613346results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure5688387646710487205results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure6214743904059152317results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure6393735140085286522results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure6939822855025580515results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure7041410527149735349results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure7149424655283032057results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure7300032453254215842results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure731043902745581966results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure7843064309935394104results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure7908034933726806966results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure7921846546080725772results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure8003079336322639700results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure8007925306260895267results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure8209980593238213228results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure8250533892920308504results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure8287899877340690049results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure8456891208149711554results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure8552740609130788766results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure8823157490089211056results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure9049029171228189363results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure9169196151458935924results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure952231870942426392results" "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure992047004292578416results" -c -o "C:\Program Files (x86)\Jenkins\jobs\Stage - Run Tests - Smoke\workspace\allure-report" The input line is too long. The syntax of the command is incorrect. FATAL: Can not generate Allure Report, exit code: 255 ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 255 at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:296) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.access$000(AllureReportPublisher.java:61) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher$1.endBuild(AllureReportPublisher.java:266) at hudson.matrix.MatrixBuild$MatrixBuildExecution.post2(MatrixBuild.java:424) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:627) at hudson.model.Run.execute(Run.java:1762) at hudson.matrix.MatrixBuild.run(MatrixBuild.java:314) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:421)
Anything that we can do for this
C:\Jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\Allure_2.7.0\bin\allure.bat generate "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure1128526487730424873results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure1179355803887476336results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure1233349937766440695results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure1267737379693233441results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure1611737765202876714results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure2185343523170359972results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure25177149422213841results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure2563774458583186268results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure294022611315913795results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure3038783697069020210results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure3261086654964491750results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure343343733007358822results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure3538548010347299114results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure3964656717669835345results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure4098504313035403912results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure4121965124612210913results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure4214854898030314792results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure4254125644931385344results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure4275787580493283674results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure4481560761314809843results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure4510687126206704523results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure4673424344382531664results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure4960298351905645033results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure5252042163847563116results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure5330892284788692844results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure5368799275534887735results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure5545533551115587805results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure5692031922534550456results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure5953253620595255463results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure6060407032081316687results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure612383605517927610results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure6424606843617204047results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure6456473825018314152results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure6721253735625734928results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure6822098551370088202results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure6835676621036385848results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure7034209677084825151results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure7061764782007630829results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure756578007302385671results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure7572398813479403433results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure7632624464171632033results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure7710467463400490393results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure7881848819846201990results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure7919508740234885782results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure8045690595815627803results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure8065850814778565310results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure8182155179449498310results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure8324138652873306375results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure8396983422824549077results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure8569032139780156334results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure861279667915746287results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure8744666089881484116results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure8999990618742531559results" "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure9072818374868002688results" -c -o "C:\Jenkins\workspace\Dev - Run Tests - Smoke\allure-report" The input line is too long. The syntax of the command is incorrect. FATAL: Can not generate Allure Report, exit code: 255 ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 255 at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:296) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.access$000(AllureReportPublisher.java:61) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher$1.endBuild(AllureReportPublisher.java:266) at hudson.matrix.MatrixBuild$MatrixBuildExecution.post2(MatrixBuild.java:424) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:627) at hudson.model.Run.execute(Run.java:1762) at hudson.matrix.MatrixBuild.run(MatrixBuild.java:314) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:421)
@SureshGedela - did you try the manual workaround I detailed above your post? That worked for me and I have not seen any issues since.
@F1ashhimself did you ever get this working
The workaround @peterfranks said worked for me too. I just downloaded the latest version of the plugin last week, I'm surprised this has not been fixed in the past 2 years.
Sorry, @ntindle @benzionyunger I will take it in the end of the week)
I can't reproduce this problem on latest windows env. Which version of Windows OS are you using?
Windows Server 2019
On Tue, Feb 9, 2021 at 8:52 AM Artem Eroshenko notifications@github.com wrote:
I can't reproduce this problem on latest windows env. Which version of Windows OS are you using?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jenkinsci/allure-plugin/issues/199#issuecomment-775715142, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF2M2RWLCOAGSR53AGSP5BDS6DLTHANCNFSM4ETQ5WHQ .
Same issue using W7 x64
I already solved this problem. I`ve Windows 10 Enterprise. When you install Jenkins you have 2 packages, 1 - with the path from install popup and 2 in "C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins". In the 2nd package, you have all information for Jenkins (plugins, settings, etc.). So, you need in file "jenkins.xml"(in the 1st package) change all "%LocalAppData%" on the current path (Example: "%LocalAppData%\Jenkins.jenkins" to "C:\Jenkins.jenkins"). After these steps, you need to customize Jenkins again and you will have a working version of the program.
any updates on this? both workarounds do not work for me.
The same for me(((
For the version 2.13 of command line works fine. 2.14 for windows does not work
Кто-нибудь решил данную проблему?
I faced same issue ( Have you some updates?
Unfortunately no. could not solve the problem ...
чт, 21 окт. 2021 г. в 16:43, PavelChachotkin @.***>:
I faced same issue ( Have you some updates?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jenkinsci/allure-plugin/issues/199#issuecomment-948631210, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASO6FLCF7V6367QIELBKU73UIAKHLANCNFSM4ETQ5WHQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Unpacking https://repo1.maven.org/maven2/io/qameta/allure/allure-commandline/2.15.0/allure-commandline-2.15.0.zip to C:\Users\myuser\JenkinsSelenium\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure-commandeline-2.15.0 on local-agent [QA-job] $ C:\Users\myuser\JenkinsSelenium\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure-commandeline-2.15.0\bin\allure.bat generate -c -o C:\Users\myuser\JenkinsSelenium\workspace\QA-job\allure-report The input line is too long. -> Finished: FAILURE :(
Unpacking https://repo1.maven.org/maven2/io/qameta/allure/allure-commandline/2.13.9/allure-commandline-2.13.9.zip to C:\Users\myuser\JenkinsSelenium\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure-commandeline-2.13.9 on local-agent -> Finished: SUCCESS :)
Unpacking https://repo1.maven.org/maven2/io/qameta/allure/allure-commandline/2.15.0/allure-commandline-2.15.0.zip to C:\Users\myuser\JenkinsSelenium\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure-commandeline-2.15.0 on local-agent [QA-job] $ C:\Users\myuser\JenkinsSelenium\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure-commandeline-2.15.0\bin\allure.bat generate -c -o C:\Users\myuser\JenkinsSelenium\workspace\QA-job\allure-report The input line is too long. -> Finished: FAILURE :(
Unpacking https://repo1.maven.org/maven2/io/qameta/allure/allure-commandline/2.13.9/allure-commandline-2.13.9.zip to C:\Users\myuser\JenkinsSelenium\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure-commandeline-2.13.9 on local-agent -> Finished: SUCCESS :)
I downgraded my Allure version to 2.13.9 and it worked! Thanks for this.
I noticed this issue on a Windows 2012 R2 Server with version allure-commandline-2.17.2.zip
I have a fix for this. Since Java 1.6 you can use wildcards in the classpath.
In the allure.bat file I changed the CLASSPATH to:
set CLASSPATH=%APP_HOME%\lib\*;%APP_HOME%\lib\config
I would submit a PR but I can't find the source for this file.
I noticed this issue on a Windows 2012 R2 Server with version allure-commandline-2.17.2.zip
I have a fix for this. Since Java 1.6 you can use wildcards in the classpath.
In the allure.bat file I changed the CLASSPATH to:
set CLASSPATH=%APP_HOME%\lib\*;%APP_HOME%\lib\config
I would submit a PR but I can't find the source for this file.
As far as I can see its being created here: https://github.com/allure-framework/allure2/blob/670d0b5a2ef5f9d0a0b7881641aa89038737c1a5/allure-commandline/build.gradle.kts#L45 But I am no graddle expert, so I don't have a good suggestion on how to change it but bwe ran into the same problem, so thanks for the work around :)
As far as I can see its being created here: https://github.com/allure-framework/allure2/blob/670d0b5a2ef5f9d0a0b7881641aa89038737c1a5/allure-commandline/build.gradle.kts#L45 But I am no graddle expert, so I don't have a good suggestion on how to change it but bwe ran into the same problem, so thanks for the work around :)
Thanks I've raised a PR https://github.com/allure-framework/allure2/pull/1537
I noticed this issue on a Windows 2012 R2 Server with version allure-commandline-2.17.2.zip
I have a fix for this. Since Java 1.6 you can use wildcards in the classpath.
In the allure.bat file I changed the CLASSPATH to:
set CLASSPATH=%APP_HOME%\lib\*;%APP_HOME%\lib\config
I would submit a PR but I can't find the source for this file.
Thanks . It worked for me.
Thanks . It worked for me.
If anyone is still seeing the error after trying the workarounds above (change %CLASSPATH% in allure.bat, changing JENKINS_HOME in jenkins.xml, installing allure-commandline 2.13.9 both manually and automatically via maven) - the issue may be that there are a few versions of allure.bat floating around. Make sure to change the correct one.
Install allure-comandline 2.13.9 globally, manually, Then, update the allure.bat which, in my case, was in C:\ProgramData\Jenkins.jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\D_Users_olga.smolyar_AppData_Roaming_npm_node_modules_allure-commandline_bin\bin\allure.bat
You should be able to find this location from your console output.
The updates made to allure.bat were:
Remove -classpath %CLASSPATH% from the java.exe statemtn
Windows 10, Jenkins 2.332.3.
My PR has now been merged to master https://github.com/allure-framework/allure2/pull/1537 The fix is available in 2.18.1 https://github.com/allure-framework/allure2/releases/tag/2.18.1
Issue
The input line is too long when generating common report from matrix job.
Context
Jenkins version: 2.108
Job type: Matrix
Allure plugin version: 2.26.0
Allure commandline version: 2.5.0
Problem description
Length of line that execute allure.bat generate command is about 4500 symbols.
Logs & Traces