Frequently Asked Questions

Basic Questions

What is Jenkins?

Jenkins is an open source automation server primarily used for Continuous Integration (CI) and Continuous Delivery (CD). It helps development teams automate the software build, test, and deployment process, improving development efficiency and quality.

Is Jenkins free?

Yes, Jenkins is completely free and open source. It uses the MIT license, allowing anyone to freely use, modify, and distribute it.

What runtime does Jenkins need?

Jenkins requires Java 8 or higher. It can run on multiple operating systems including Windows, Linux, and macOS. A minimum of 1GB memory and 10GB disk space is recommended.

What is the difference between Jenkins and Hudson?

Jenkins is a fork of Hudson. In 2011, after a trademark dispute with Oracle, the main development team forked Hudson and created Jenkins. Jenkins is now the active project while Hudson has been discontinued.

Installation Questions

Cannot access after first startup. What should I do?

  1. Check if Jenkins started properly by viewing logs
  2. Confirm the port is not in use (default port 8080)
  3. Check firewall settings to ensure port access
  4. View error messages in startup logs

Where is the unlock password?

On first installation, the unlock password is displayed in Jenkins console logs. If running via Docker, use docker logs jenkins-blueocean to view. The password file is usually at /var/jenkins_home/secrets/initialAdminPassword.

Plugin installation failed. What should I do?

  1. Check network connection: Jenkins needs access to update center
  2. Install manually: Try uploading plugin hpi file from Advanced tab
  3. Use Jenkins mirror: Configure domestic update source
  4. View logs: Understand specific failure reason

How to modify Jenkins port?

  • Docker method: Modify -p parameter
  • WAR method: Use java -jar jenkins.war --httpPort=9090
  • Linux package: Modify HTTP_PORT in /etc/default/jenkins

Credentials Questions

Credentials not working. What should I do?

  1. Confirm credential ID is correct
  2. Check credential type matches
  3. Verify credentials have not expired
  4. Check user permissions

How to store passwords securely?

Use Jenkins credentials storage:

  1. Go to Manage Credentials
  2. Add credentials, choose type
  3. Jenkins encrypts storage, passwords not shown in plain text

SSH key authentication failed. What should I do?

  1. Confirm public key added to target server
  2. Check key permissions: private key file should be 600
  3. Verify key format is correct
  4. Try regenerating key pair

Pipeline Questions

How to troubleshoot Jenkinsfile syntax errors?

  1. Use Declarative Pipeline validator
  2. Check Jenkins console error messages
  3. Use Jenkins simulator locally
  4. Refer to official syntax documentation

Pipeline execution failed. What should I do?

  1. View build logs for detailed error information
  2. Check return status of each stage
  3. Confirm required tools are available
  4. Verify environment variables and credentials

How to implement parallel execution?

Declarative Pipeline supports parallel syntax:

pipeline {
    agent any
    stages {
        stage('Parallel Build') {
            parallel {
                stage('Module A') {
                    steps {
                        sh './build-a.sh'
                    }
                }
                stage('Module B') {
                    steps {
                        sh './build-b.sh'
                    }
                }
            }
        }
    }
}

How to wait for manual confirmation?

Use input step:

stage('Deploy to Production') {
    steps {
        input message: 'Confirm deployment to production?', ok: 'Confirm'
    }
}

Build Questions

Build is very slow. What should I do?

  1. Use incremental builds
  2. Configure build caching
  3. Use parallel stages
  4. Add more build nodes
  5. Optimize dependency downloads

Maven build downloads dependencies slowly. What should I do?

  1. Configure Maven mirror repository
  2. Use private repository manager
  3. Configure and persist local repository path

How to configure build timeout?

pipeline {
    agent any
    stages {
        stage('Timeout Test') {
            options {
                timeout(time: 30, unit: 'MINUTES')
            }
            steps {
                // build steps
            }
        }
    }
}

How to keep build artifacts?

Use archive step:

post {
    always {
        archiveArtifacts artifacts: 'target/*.jar', fingerprint: true
    }
}

Distributed Build Questions

Node connection failed. What should I do?

  1. Check network connectivity
  2. Confirm Java version compatibility
  3. Verify node key configuration
  4. View node logs

How to configure Docker nodes?

  1. Install Docker plugin
  2. Configure Docker cloud
  3. Specify docker agent in pipeline

How to configure load balancing?

Configure agent selection strategy in pipeline:

pipeline {
    agent none
    stages {
        stage('Build') {
            agent { label 'docker' }
            steps {
                // build
            }
        }
    }
}

Notification Questions

How to configure email notifications?

  1. Install Email Extension plugin
  2. Configure SMTP server
  3. Add email step in pipeline

How to configure Slack notifications?

  1. Install Slack plugin
  2. Create Jenkins app in Slack
  3. Configure Slack credentials in Jenkins
  4. Add notification step in pipeline

Backup and Recovery

How to backup Jenkins?

Need to backup:

  1. JENKINS_HOME directory (contains all configurations and build records)
  2. Plugins directory
  3. Environment configuration files

Using Configuration as Code plugin is recommended for managing configurations.

How to migrate Jenkins?

  1. Stop source Jenkins
  2. Copy JENKINS_HOME to new server
  3. Install same version of Jenkins
  4. Ensure Java version compatibility
  5. Start new Jenkins

Security Questions

How to enable user registration?

  1. Go to Configure Global Security
  2. Enable security realm (Jenkins' own user database)
  3. Configure authorization strategy (Logged-in users can do anything)

How to restrict project access?

Use Matrix authorization strategy:

  1. Configure Global Security
  2. Choose Matrix Authorization Strategy
  3. Configure different permissions for different users

How to handle security vulnerabilities?

  1. Update Jenkins core version promptly
  2. Update plugins regularly
  3. Pay attention to Jenkins security advisories
  4. Limit anonymous access

Performance Questions

What to do when out of memory?

  1. Adjust JVM parameters: Add -Xmx in startup script
  2. Reduce concurrent builds
  3. Clean old build records regularly
  4. Increase system memory

Build records take too much space?

  1. Configure build retention policy
  2. Clean old builds regularly
  3. Use archiving instead of keeping complete build records

Integration Questions

GitHub integration failed?

  1. Check GitHub API permissions
  2. Verify webhook configuration
  3. Confirm credentials are correct

Docker integration failed?

  1. Check Docker API configuration
  2. Confirm Docker socket permissions
  3. Verify Docker version compatibility

Kubernetes integration failed?

  1. Check kubeconfig configuration
  2. Verify Kubernetes API permissions
  3. Confirm Jenkins container has sufficient permissions

Upgrade Questions

How to upgrade Jenkins?

  • Docker method: Update image version
  • WAR method: Replace WAR file
  • Package method: Use package manager

Plugins incompatible after upgrade?

  1. Check compatibility list
  2. Update plugins to compatible versions
  3. Rollback Jenkins version if necessary

Other Questions

How to get help?

  • Jenkins official documentation
  • Jenkins community forums
  • Stack Overflow
  • GitHub Issues

How to contribute code?

  1. Fork Jenkins project on GitHub
  2. Create feature branch
  3. Submit Pull Request
  4. Participate in code review