digital ocean manage sidekiq worker

为君一笑 提交于 2019-12-11 15:21:55

问题


I followed Properly setting up Redis and Sidekiq in production on Ubuntu 16.04 to manage sidekiq worker

I created a file like

touch /lib/systemd/system/sidekiq.service

and added following content

[Unit]
Description=sidekiq
After=syslog.target network.target

[Service]
Type=simple
WorkingDirectory=/home/deploy/ezlarm-server/current

ExecStart=/home/deploy/.rbenv/shims/bundle exec "sidekiq -e production"
User=deploy
Group=deploy
UMask=0002

Environment=MALLOC_ARENA_MAX=2

RestartSec=1
Restart=on-failure

StandardOutput=syslog
StandardError=syslog

SyslogIdentifier=sidekiq

[Install]
WantedBy=multi-user.target

Now when I run

systemctl {start,stop,status,restart} sidekiq

it gives following errors


回答1:


Maybe its too late but have you tried sudo systemctl {start,stop,status,restart} sidekiq

Faced the same issue but running the command with sudo worked like a charm. Thanks.



来源:https://stackoverflow.com/questions/55365205/digital-ocean-manage-sidekiq-worker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!