Beanstalk deployment process fails to update Proxy configuration

0

I've seen this several times where it appears that Beanstalk will not deploy a bundle because artifacts contained in a previous deployment had syntax errors. I don't understand why Beanstalk would validate old artifacts rather than deploy the artifact as contained in the bundle currently being deployed. In order to resolve resolve the issue the syntactically bad files have to be manually replaced (or deleted?) before Beanstalk will deploy successfully.

The current problem is highlighted below:

eb-engine log 3:57 2022/04/07 22:12:51.580831 [INFO] Executing instruction: configure proxy server 2022/04/07 22:12:51.584473 [INFO] Running command /bin/sh -c cp -rp /var/app/staging/.platform/httpd/. /var/proxy/staging/httpd

This is done correctly – contains the version of the file from the app bundle I’m deploying …

2022/04/07 22:13:31.619080 [INFO] Executing instruction: start proxy with new configuration 2022/04/07 22:13:31.619124 [INFO] Running command /bin/sh -c /usr/sbin/apachectl -t -f /var/proxy/staging/httpd/conf/httpd.conf 2022/04/07 22:13:31.687560 [INFO] [Thu Apr 07 22:13:31.670790 2022] [core:warn] [pid 21978:tid 139968169546304] AH00111: Config variable ${njpf_host} is not defined AH00526: Syntax error on line 1 of /etc/httpd/conf.d/apache_overides.conf: Cannot parse condition clause: syntax error, unexpected T_OP_BINARY Why is he looking at /etc/httpd/conf.d/apache_overides.conf when the latest is in /var/proxy/staging/httpd? (or why wasn’t the latest apache_overides.conf copied from /var/proxy/staging/httpd to /etc/httpd/conf.d?) 2022/04/07 22:13:31.687593 [ERROR] An error occurred during execution of command [app-deploy] - [start proxy with new configuration]. Stop running the command. Error: copy proxy conf from staging failed with error validate httpd configuration failed with error Command /bin/sh -c /usr/sbin/apachectl -t -f /var/proxy/staging/httpd/conf/httpd.conf failed with error exit status 1. Stderr:[Thu Apr 07 22:13:31.670790 2022] [core:warn] [pid 21978:tid 139968169546304] AH00111: Config variable ${njpf_host} is not defined AH00526: Syntax error on line 1 of /etc/httpd/conf.d/apache_overides.conf: Cannot parse condition clause: syntax error, unexpected T_OP_BINARY

This seems to confirm the copy from /var/proxy/staging/httpd failed but the reason it failed is that the last version (prior to the current deploy) of /etc/httpd/conf.d/apache_overides.conf had a syntax error. Well no kidding – that’s why I’m deploying the latest version of apache_overides.conf (in /var/proxy/staging/httpd/conf.d) which does not have the reported syntax error).

Again, I'm not sure why beanstalk is concerned about a syntax error that doesn't exist in the current deployment.

Help! Thanks.

jack
asked 2 years ago38 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions