5paceman / blog-comments

0 stars 0 forks source link

Configuring Supervisor on Elastic Beanstalk #5

Open 5paceman opened 10 months ago

golf-junkie commented 7 months ago

Thanks for sharing your article. I am trying to deploy supervisor on EB referring to your article. I have completed installation of supervisor, but I could not pass the environment valuables. How could I pass the environment property valuables to supervisor?

golf-junkie commented 7 months ago

I think I solved this problem with adding the line below into the start-up script.

EnvironmentFile=/opt/elasticbeanstalk/deployment/env

5paceman commented 7 months ago

I think I solved this problem with adding the line below into the start-up script.

EnvironmentFile=/opt/elasticbeanstalk/deployment/env

you should also be able to add the environment variables in your elastic beanstalk config

forthowin commented 5 months ago

Hi,

Thank you for your article. I was following it and got the following error when trying to deploy in eb-hooks.log:

2024/02/09 03:46:21.330980 [INFO] Job for supervisord.service failed because a configured resource limit was exceeded. See "systemctl status supervisord.service" and "journalctl -xe" for details. Created symlink from /etc/systemd/system/multi-user.target.wants/supervisord.service to /usr/lib/systemd/system/supervisord.service.

2024/02/09 03:46:40.803675 [INFO] Running command .platform/hooks/postdeploy/restart_supervisorctl.sh 2024/02/09 03:46:41.306424 [INFO] error: <class 'ConnectionRefusedError'>, [Errno 111] Connection refused: file: /usr/lib64/python3.7/socket.py line: 716 error: <class 'ConnectionRefusedError'>, [Errno 111] Connection refused: file: /usr/lib64/python3.7/socket.py line: 716 http://127.0.0.1:9001 refused connection

Any idea what it means? The previous lines shows that install_supervisor.sh ran and supervisor was installed. Only difference was I updated restart_supervisorctl.sh to be:

!/bin/sh

sudo supervisorctl reread sudo supervisorctl update sudo supervisorctl restart all

serhiiBliSolutions commented 4 months ago

I had a similar error. http://127.0.0.1:9001/ refused connection I was able to solve it this way.

[supervisorctl]
serverurl=http://localhost:9001
MattWiseParking commented 1 week ago

One issue i am facing is being able to refresh servers after a code commit to master branch. We use CI/CD so our servers are replaced when we push to master branch. Is there a pre shutdown script so i can stop/kill the worker queues before the servers are terminated and replaced with new instances?

currently the shutdown process halts as the worker process hangs on our servers, forcing me to manually terminate the servers one by one before pushing code to master