EB Worker deployment error Var/Pid

0

I'm trying to deploy a python script in a worker env in Elastic Beanstalk. The code runs fine on my local environment, and has run on a couple of occasions in EB. The problem is that now when I try to create and deploy a new worker, or update one, I get this error : ERROR] An error occurred during execution of command [app-deploy] - [Track pids in healthd]. Stop running the command. Error: "update processes [worker nginx cfn-hup healthd sqsd] pid symlinks failed with error read pid source file /var/pids/worker.pid failed with error:open /var/pids/worker.pid: no such file or directory". Any ideas on why I'm getting this error? As I mention earlier my code has worked as is in AWS EB before. Thank you.

paganof
질문됨 일 년 전901회 조회
1개 답변
3

Double-check that the worker configuration file (.ebextensions/01-worker.config) contains the correct command to start the worker process, and that the pidfile option is set to /var/pids/worker.pid.

option_settings:
  aws:elasticbeanstalk:worker:python:
    command: "worker.py"
    pidfile: "/var/pids/worker.pid"

Check the worker logs (located at /var/log/eb-worker.log) to see if there are any errors or exceptions being raised that could prevent the worker process from starting or writing to the pid file. Ensure that the worker process has write permissions to the /var/pids directory.

container_commands:
  01_change_pids_permission:
    command: "chmod 777 /var/pids"

If none of the above steps work, try restarting the environment to see if that resolves the issue.

eb restart
profile picture
전문가
답변함 일 년 전
  • Thank you sdtslmn for the answer. My config file didn't had the pidfile parameter. I will add that, set the permissions and restart to see if it solves the issue.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠