راکت
حل شده

راه اندازی supervisor روی centos

3 پاسخ

سلام من پروژه ی لاراول خودم رو روی سرور centos ام بالا اوردم توی local وقتی میخواستم job هایی که توی صف هستن رو سیستم انجام بده دستور

php artisan queue:work

رو میزدم حالا چند جا که خوندم میگفتن باید supervisor نصب کنم برای این کار کسی فیلم آموزشی مقاله ای برای این موضوع داره چون من چند جا رو که امتحان کردم راه نمیفته supervisor واسم و این خطا رو میده

Job for supervisord.service failed because the control process exited with error code. See "systemctl status supervisord.service" and "journalctl -xe" for details

خطای زیر رو هم پیدا کردم ولی چیزی پیدا نکردم

● supervisord.service - Process Monitoring and Control Daemon
   Loaded: loaded (/usr/lib/systemd/system/supervisord.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2020-10-19 10:50:08 CEST; 3min 55s ago
  Process: 6642 ExecStop=/usr/bin/supervisorctl $OPTIONS shutdown (code=exited, status=2)
  Process: 6645 ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf (code=exited, status=2)
 Main PID: 3791 (code=exited, status=0/SUCCESS)

Oct 19 10:50:08 ilidan.ir systemd[1]: Stopped Process Monitoring and Control Daemon.
Oct 19 10:50:08 ilidan.ir systemd[1]: Unit supervisord.service entered failed state.
Oct 19 10:50:08 ilidan.ir systemd[1]: supervisord.service failed.
Oct 19 10:50:08 ilidan.ir systemd[1]: Starting Process Monitoring and Control Daemon...
Oct 19 10:50:08 ilidan.ir supervisord[6645]: Error: .ini file does not include supervisord section
Oct 19 10:50:08 ilidan.ir supervisord[6645]: For help, use /usr/bin/supervisord -h
Oct 19 10:50:08 ilidan.ir systemd[1]: supervisord.service: control process exited, code=exited status=2
Oct 19 10:50:08 ilidan.ir systemd[1]: Failed to start Process Monitoring and Control Daemon.
Oct 19 10:50:08 ilidan.ir systemd[1]: Unit supervisord.service entered failed state.
Oct 19 10:50:08 ilidan.ir systemd[1]: supervisord.service failed.

محتوای فایل کانفیگ /etc/supervisord.conf

[program:supervisord]
command=php /home/ilidan/public_html/sys/artisan queue:work 
process_name=%(program_name)s_%(process_num)02d
numprocs=8 
priority=999 
autostart=true
autorestart=true  
startsecs=1
startretries=3
user=apache
redirect_stderr=true
stdout_logfile=/var/log/supervisor/worker.log

@hesammousavi
@ali.bayat
@mhyeganeh
دوستان ممنون میشم یه راهنمایی بکنید دو روزه درگیرشم

ثبت پرسش جدید

پاسخ‌ها

3
mahdi khanzadi
mahdi khanzadi
@khanzadimahdi

تخصص: Software engineer

بهترین پاسخ

سوپر وایزر رو پاک کنید و با توجه به داکیومنت های خودش نصبش کنید.

http://supervisord.org/installing.html

واسه ران کردن صف ها فعلا میتونید از خود ترمینال به صورت زیر استفاده کنید.

php /path/to/artisan queue:work &

دقت کن تهش یه & گذاشتم.
بعدش میتونی ترمینال (ssh رو قطع کنی) رو ببنید.

واسه اینکه چک کنید ببینی process صف در حال ران شدن هست میتونی بعدش کمند زیر رو بزنی:

ps aux | grep artisan

واسه بستن process میتونی به ایدی یا procid رو برداری و اینجوری kill کنی:

kill 25352

اون عدد که میبینی ایدی process هست.

علی بیات
علی بیات
@ali.bayat

تخصص: توسعه دهنده ارشد وب

از pm2 هم میتونی استفاده کنی..
تنظیمات ساده ای هم داره

Amirilidan78
Amirilidan78
@Amirilidan78

تخصص: برنامه نویس وب

@ali.bayat
خیلی ممنون

شاید پاسخ شما همین‌جا باشد

برای ارسال پاسخ لازم است وارد شده یا ثبت‌نام کنید

ورود یا ثبت‌نام