-
Type:
Bug
-
Resolution: Cannot Reproduce
-
Priority:
Blocker
-
Component/s: pipeline
-
None
-
Environment:Docker image jenkins:2.426.3-lts-jdk11, jenkins:jdk17, jenkins:latest-jdk21 running on kubernetes or Docker.
Jenkins Console Output Issue with Input Step
Issue Description
Console output is not displaying in Jenkins web interface when using pipeline-as-code with input steps. This issue occurs specifically with Jenkins versions 2.426.3-lts-jdk11 and latest-jdk21, but works correctly in version 2.426.1-lts-jdk11.
Environment
- Affected Jenkins versions:
- jenkins:2.426.3-lts-jdk11
- jenkins:latest-jdk21
- Working Jenkins version:
- jenkins:2.426.1-lts-jdk11
Pipeline Configuration
The issue manifests when the following input step is present in the pipeline:
def userInput = input( message: 'Please enter landing zone code', parameters: [string( defaultValue: 'lz000', description: 'The name of the assigned landing zone for this application', name: 'lzCode' )] )
```
For all Jenkins steps and stages after this the Jenkins console is blank.
However the output is visible in raw text format.
Attempted Solutions
- JAVA_OPTS Modification
- Added memory settings:
JAVA_OPTS="-Xmx2048m -Xms512m"
- Added GC logging:
JAVA_OPTS="-Xlog:gc*=debug:file=/var/jenkins_home/gc.log"
- JENKINS_OPTS Modification
- Modified logging settings:
JENKINS_OPTS="{}httpKeepAliveTimeout=60000{-} -handlerCountMax=100"
- Adjusted console output buffer:
JENKINS_OPTS="--consoleOutputBufferSize=20MB"
Symptoms
- Pipeline execution continues normally
- Web interface shows no console output
- Pipeline steps execute successfully
- Input prompts appear but without surrounding console context
- Issue only manifests when input step is present in pipeline code
Impact
- Difficult to debug pipeline issues
- No visibility into pipeline execution progress
- Reduced ability to troubleshoot deployment problems
- Affects operational efficiency and monitoring capabilities
Workaround
Currently, the only viable workaround is to use Jenkins version 2.426.1-lts-jdk11, which does not exhibit this issue.
Additional Notes
- The issue appears to be related specifically to the interaction between the input step and console output handling
- Problem persists across different browser types
- Jenkins system logs show no relevant errors
- Issue is reproducible in clean installations of affected versions
Request
Please investigate why console output fails specifically when input steps are present in pipeline code for versions after 2.426.1-lts-jdk11. This appears to be a regression in newer Jenkins versions.
The complete pipeline is below
pipeline {
agent any
options {
disableConcurrentBuilds()
timeout(time: 1, unit: 'HOURS')
skipDefaultCheckout()
}
environment {
BITBUCKET_COMMON_CREDS = credentials('BITBUCKET_COMMON_CREDS') REPOSITORY_CREDS = credentials('REPOSITORY_INFO') CURRENT_BRANCH = "main"
PIPELINE_LOG_LEVEL = 'FINEST'
LANDING_ZONE_CODE = 'lz000' // Default landing zone code
}
stages {
stage("Extracting landing zone environment variables") {
steps {
script {
try {
def userInput = input(
message: 'Please enter landing zone code',
parameters: [string(
defaultValue: 'lz000',
description: 'The name of the assigned landing zone for this application',
name: 'lzCode'
)]
)
env.lzCode = userInput def props = readProperties(file: "${env.lzCode}.conf")
props.each {
k,
v -> env[k] = v
}
} catch (Exception e) {
error "Failed to process landing zone configuration"
}
}
}
}
stage("Getting Azure CSF Landing Zone Foundations") {
steps {
script {
env.ORG_REPO_SPACE = REPOSITORY_CREDS_USR env.GIT_REPO = REPOSITORY_CREDS_PSW
}
cleanWs()
withCredentials([usernamePassword(credentialsId: 'REPOSITORY_INFO',
usernameVariable: 'REPO_SPACE',
passwordVariable: 'REPO_NAME')]) {
script {
def gitUrl = "https://${BITBUCKET_COMMON_CREDS_USR}:${BITBUCKET_COMMON_CREDS_PSW}@github.com/${ORG_REPO_SPACE}/${GIT_REPO}.git"
checkout([$class: 'GitSCM',
branches: [
[name: "*/${CURRENT_BRANCH}"]
],
userRemoteConfigs: [
[url: gitUrl]
]
])
}
}
}
}
stage("Configuring Azure Access") {
steps {
script {
sh 'chmod +x ./login.sh'
}
}
}
stage("Deploying Application Infrastructure") {
steps {
script {
sh 'chmod +x ./test.sh'
}
}
}
stage("Deployment Validation Checks") {
steps {
script {
sh 'chmod +x ./check-aks-cert-readiness.sh'
}
}
}
stage("Deployment Summary") {
steps {
script {
sh 'echo "================== BEGIN VALIDATION ========="'
sh 'pwd'
sh 'ls -l'
sh 'echo "================== DONE VALIDATING =========="'
}
}
}
}
post {
always {
cleanWs()
}
failure {
script {
echo "Pipeline failed. Cleaning up..."
}
}
}
}