[JIRA] (JENKINS-54678) Logs are lost in Multibranch Pipleline after the build has finished

93 views
Skip to first unread message

tibordigana@apache.org (JIRA)

unread,
Nov 16, 2018, 1:46:02 PM11/16/18
to jenkinsc...@googlegroups.com
Tibor Digana created an issue
 
Jenkins / Bug JENKINS-54678
Logs are lost in Multibranch Pipleline after the build has finished
Issue Type: Bug Bug
Assignee: Unassigned
Components: pipeline
Created: 2018-11-16 18:45
Environment: Jenkins 2.138.3
Pipeline Multibranch with defaults 2.0
Pipeline Multibranch Plugin 2.20
Build Pipeline Plugin 1.58
Priority: Major Major
Reporter: Tibor Digana

The logs in /job/master/167/console are shown when the build is in progress.
After it has finished I see nothing. Only a black narrow bar.
The BlueOcen shows me this stacktrace

java.io.FileNotFoundException: /var/lib/jenkins/jobs/Invoice/branches/master/builds/166/log (No such file or directory)

	at java.io.RandomAccessFile.open0(Native Method)

	at java.io.RandomAccessFile.open(RandomAccessFile.java:316)

	at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)

	at org.jenkinsci.plugins.workflow.log.FileLogStorage.stepLog(FileLogStorage.java:259)

	at org.jenkinsci.plugins.workflow.support.actions.LogStorageAction.getLogText(LogStorageAction.java:62)

	at io.jenkins.blueocean.rest.impl.pipeline.PipelineStepImpl.getLog(PipelineStepImpl.java:139)

	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

tvuillaume@solent.fr (JIRA)

unread,
Nov 21, 2018, 9:17:01 AM11/21/18
to jenkinsc...@googlegroups.com

tibordigana@apache.org (JIRA)

unread,
Nov 25, 2018, 5:59:02 AM11/25/18
to jenkinsc...@googlegroups.com

Jesse Glick
Who should handle this issue?
I am doing an internal workshop in my company about Jenkins on December 3rd and this issue is a big problem.

tvuillaume@solent.fr (JIRA)

unread,
Nov 26, 2018, 2:55:02 AM11/26/18
to jenkinsc...@googlegroups.com

tvuillaume@solent.fr (JIRA)

unread,
Nov 26, 2018, 2:57:01 AM11/26/18
to jenkinsc...@googlegroups.com
Thomas Vuillaume commented on Bug JENKINS-54678
 
Re: Logs are lost in Multibranch Pipleline after the build has finished

I'm sharing my Pipeline file so that we can move on (and maybe found a root cause).

 

Anyway, this is pretty strange because we have 2 different Jenkins here. Both of them are on 2.138.2, both of them use Pipeline Build 1.5.8. Both of them use a pipeline to build, but not the same pipeline.

 

Only one face the issue (the one which I published the pipeline)

tvuillaume@solent.fr (JIRA)

unread,
Nov 26, 2018, 2:57:02 AM11/26/18
to jenkinsc...@googlegroups.com
Thomas Vuillaume edited a comment on Bug JENKINS-54678
I'm sharing my Pipeline file so that we can move on (and maybe found a root cause).

 

Anyway, this is pretty strange because we have 2 different Jenkins here. Both of them are on 2.138.2, both of them use Pipeline Build 1.5.8. Both of them use a pipeline to build, but not the same pipeline.

 

Only one face faces the issue (the one which I published the pipeline)

tvuillaume@solent.fr (JIRA)

unread,
Nov 26, 2018, 2:58:03 AM11/26/18
to jenkinsc...@googlegroups.com
Thomas Vuillaume edited a comment on Bug JENKINS-54678
I'm sharing my Pipeline file so that we can move on (and maybe found a root cause).

 

Anyway, this is pretty strange because we have 2 different Jenkins here. Both of them are on 2.138.2, both of them use Pipeline Build 1.5.8. Both of them use a pipeline to build, but not the same pipeline.

 

Only one faces the issue (the one which I published uses the pipeline I added to this ticket )

jglick@cloudbees.com (JIRA)

unread,
Nov 27, 2018, 9:31:02 AM11/27/18
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
 

I presume

compressBuildLog()

is to blame. Try deleting that and uninstalling this plugin. Its Pipeline compatibility should be removed, as it will not work as of workflow-job 2.26.

Change By: Jesse Glick
Component/s: compress-build-log-plugin
Component/s: pipeline
Labels: pipeline

tvuillaume@solent.fr (JIRA)

unread,
Nov 27, 2018, 10:51:02 AM11/27/18
to jenkinsc...@googlegroups.com
Thomas Vuillaume commented on Bug JENKINS-54678
 
Re: Logs are lost in Multibranch Pipleline after the build has finished

Confirmed !

 

Thanks Jesse Glick, this did work ! I removed the compressBuildLog() and uninstalled the pluggin.

I guess Tibor Digana will be pleased to have been saved before the 3rd of December !

Many thanks !

jglick@cloudbees.com (JIRA)

unread,
Nov 27, 2018, 11:15:02 AM11/27/18
to jenkinsc...@googlegroups.com

Note that JEP-210 defines a beta, but supported, API for properly replacing build log storage as a whole, which theoretically this plugin could implement via log.gz. (Run.getLogFile is slated to be deprecated and is not supported by new versions of Pipeline.) That said, if you are compressing build logs because you are concerned about storage space on the master, the way forward is likely to be cloud log storage, as in the recently released pipeline-cloudwatch-logs plugin.

brant.niggemyer@uspsector.com (JIRA)

unread,
Nov 29, 2018, 6:32:01 PM11/29/18
to jenkinsc...@googlegroups.com

As I noted in the other report, downgrading Pipeline: Job Plugin to 2.25 did restore correct behavior.  We did not see removing compressBuildLog() as an option, as we would lose console access to historic logs already compressed. 

After consideration, we are going to remove compressBuildLog() from our pipeline standard, as it isn't buying us much in terms of space, and plan to upgrade Job Plugin in a few weeks as old compressed build logs will be rotated off the system or otherwise not too useful to look at.

jglick@cloudbees.com (JIRA)

unread,
Nov 29, 2018, 6:42:01 PM11/29/18
to jenkinsc...@googlegroups.com

we would lose console access to historic logs already compressed

Untested:

find $JENKINS_HOME -name log.gz -print0 | xargs -0 -n1 gunzip

tibordigana@apache.org (JIRA)

unread,
Nov 30, 2018, 7:06:02 AM11/30/18
to jenkinsc...@googlegroups.com

Jesse Glick
ok, good to know your plan.
I would like to have compressed log in e-mail attachments.
Would you please add a compression to emailext?

tibordigana@apache.org (JIRA)

unread,
Nov 30, 2018, 7:08:03 AM11/30/18
to jenkinsc...@googlegroups.com
Tibor Digana updated an issue
 
Change By: Tibor Digana
Comment: [~jglick]

ok, good to know your plan.
I would like to have compressed log in e-mail attachments.
Would you please add a compression to [emailext|https://wiki.jenkins.io/display/JENKINS/Email-ext+plugin]?

tibordigana@apache.org (JIRA)

unread,
Nov 30, 2018, 8:34:02 AM11/30/18
to jenkinsc...@googlegroups.com
Tibor Digana edited a comment on Bug JENKINS-54678
 
Re: Logs are lost in Multibranch Pipleline after the build has finished
I have updated all plugins in my Jenkins, and removed the function _compressBuildLog()_ from my _Jenkinsfile_.
Now the logs are back again as expected.
[~jglick] I think there was some environment variable to limit the the log size. Where can I find it? And second question, is the plugin [logfilesizechecker|
htthttps https ://plugins.jenkins.io/logfilesizechecker] safe to use?

tibordigana@apache.org (JIRA)

unread,
Nov 30, 2018, 8:34:02 AM11/30/18
to jenkinsc...@googlegroups.com

I have updated all plugins in my Jenkins, and removed the function compressBuildLog() from my Jenkinsfile.


Now the logs are back again as expected.

Jesse Glick I think there was some environment variable to limit the the log size. Where can I find it? And second question, is the plugin [logfilesizechecker|htthttps://plugins.jenkins.io/logfilesizechecker] safe to use?

tibordigana@apache.org (JIRA)

unread,
Nov 30, 2018, 10:02:02 AM11/30/18
to jenkinsc...@googlegroups.com

Jesse Glick How can i override MAX_LINES_READ in Jenkinsfile?
Could not find a snippet code in documentation, only mentioning the constant in release notes.

Reply all
Reply to author
Forward
0 new messages