LB did not serve deployed file, 100 days of DevOps - day 77

I’m stuck in this task like forever. Everytime getting this error “LB did not serve deployed file” even when things looks good. or thats what I feel . Attaching snapshots here, please check and help point out the issue




I don’t see your script there, although it might work based on the log. Please look at this forum post to see if it helps.. The test of whether it works would depend whether apache is set up correctly on stapp01, since the load balancer will take the file from apache on that host, not directly from the /var/www/html directory as you show in one of your images.

The script is similar to what you’ve pointed to ,

pipeline {
agent { label ‘stapp01’ }

stages {
    stage('Deploy') {
        steps {
            script {
                sh '''
                    cd /var/www/html
                    git pull https://sarah:Sarah_pass123@/3000-port-ojl62wf4jf3reclh/sarah/web_app.git
                '''
            }
        }
    }
}

}

*** git pull origin master *** doesnt work since the config file ‘url’ value at /var/www/html/.git location has a hardcoded value and pipeline scripts pulls the git location from there . Anyway , all works well but only the LB did not serve deployed file error keeps coming . I dont know where else to look . I’ll dig further.

Tried again . Attached video . Some one please helpVideo of task 77

Did you try my script instead? If I list it, I tried it :slight_smile: You should as well.

Actually, that’s not right – you can pull from the gitea repo unauthenticated. If the authentication is wrong, that would definitely be a problem :slight_smile: Again, script was tested and worked.

I tried again with your script and jenkins deployment worked( I’m not sure why it didnt work before ) .

But even after successful deployment and confirming the changes visible on the App page the error keeps coming .



What I’m I missing

this worked for me finally -

https://medium.com/@janemils/kodekloud-engineer-day-77-jenkins-deploy-pipeline-86efadd6abea