# ERROR: Cannot resume build because FlowNode 19

**URL:** <https://community.jenkins.io/t/error-cannot-resume-build-because-flownode-19/9477>\
**Category:** Ask a question\
**Tags:** question, pipeline\
**Created:** [September 8, 2023, 5:55am UTC](https://community.jenkins.io/t/error-cannot-resume-build-because-flownode-19/9477 "2023-09-08T05:55:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahimunshaik](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/rahimunshaik/32/5428_2.png) [@rahimunshaik](https://community.jenkins.io/u/rahimunshaik)\
**Post date:** [September 8, 2023, 5:55am UTC](https://community.jenkins.io/t/error-cannot-resume-build-because-flownode-19/9477/1 "2023-09-08T05:55:00Z")

</div>

Creating placeholder flownodes because failed loading originals.  
ERROR: Cannot resume build because FlowNode 19 for FlowHead 1 could not be loaded. This is expected to happen when using the PERFORMANCE\_OPTIMIZED durability setting and Jenkins is not shut down cleanly. Consider investigating to understand if Jenkins was not shut down cleanly or switching to the MAX\_SURVIVABILITY durability setting which should prevent this issue in most cases.  
Finished: FAILURE

Techs:–  
Jenkins 2.414.1  
Digital Ocean  
Github

pipeline:–pipeline {  
agent any

```
stages {
    stage('Build Front-End') {
        steps {
            dir('Front_End') {
                script {
                    try {
                        sh 'whoami'
                        sh 'npm install'
                        sh 'CI=false npm run build'
                    } catch (Exception e) {
                        currentBuild.result = 'FAILURE'
                        error("Frontend build failed: ${e.message}")
                    }
                }
            }
        }
    }

    stage('Deploy to DigitalOcean') {
        steps {
            script {
                sh 'pwd'
                sh 'ls'
                
                sh 'sudo rm -rf /var/www/react_cc/html'
                sh 'sudo mkdir -p /var/www/react_cc/html'
                sh 'ls -l /var/www/react_cc'
                sh 'sudo cp -R ./Front_End/build/* /var/www/react_cc/html/' 
            }
        }
    }
}

 post {
    failure {
        script {
            echo "Build #${currentBuild.number} failed. See below for details:"
            echo "${currentBuild.rawBuild.getLog(1000)}"
        }
        mail to: 'n160643@rguktn.ac.in',
            subject: "Failed React Project Deployment - Build #${currentBuild.number}",
            body: 'The React project deployment failed. Please check the Jenkins build logs for details.'
    }
    success {
         script {
            echo "Build #${currentBuild.number} success. See below for details:"
            echo "${currentBuild.rawBuild.getLog(1000)}"
        }
        mail to: 'n160643@rguktn.ac.in',
            subject: 'Successful React Project Deployment',
            body: 'The React project deployment was successful.'
    }
}

```

}

---

<div class="post-metadata">

**Author:** ![rahimunshaik](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/rahimunshaik/32/5428_2.png) [@rahimunshaik](https://community.jenkins.io/u/rahimunshaik)\
**Post date:** [September 8, 2023, 5:55am UTC](https://community.jenkins.io/t/error-cannot-resume-build-because-flownode-19/9477/2 "2023-09-08T05:55:45Z")

</div>

Help me in solving this and build a working pipeline

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [September 11, 2023, 8:42am UTC](https://community.jenkins.io/t/error-cannot-resume-build-because-flownode-19/9477/3 "2023-09-11T08:42:12Z")

</div>

The error message you provided,

> “Cannot resume build because FlowNode 19 for FlowHead 1 could not be loaded,”

is related to the durability setting used in Jenkins Pipelines. It suggests that you are using the [`PERFORMANCE_OPTIMIZED`](https://www.jenkins.io/doc/book/pipeline/scaling-pipeline/#what-are-the-durability-settings) durability setting, which is more prone to issues if Jenkins is not shut down cleanly. 🤷

The error message suggests switching to the `MAX_SURVIVABILITY` durability setting. This setting is more robust and less likely to encounter issues related to Jenkins not shutting down cleanly. To change the durability setting for your pipeline, you can add the following line at the beginning of your pipeline script:

```groovy
pipeline {
    agent any
    options {
        durabilityHint 'MAX_SURVIVABILITY'
    }
    // ...
}

```

By setting the `durabilityHint` to ‘`MAX_SURVIVABILITY`’, you ensure that the pipeline is less susceptible to issues related to Jenkins not shutting down cleanly.
