我正在運行Foreman(Ubuntu),一旦我得到它的工作將切換到使用暴發戶。工頭無法啓動Nginx,但我可以手動啓動它。爲什麼?
我Procfile.staging看起來是這樣的:
nginx: sudo service nginx start
unicorn: bundle exec unicorn -c ./config/unicorn.rb
redis: bundle exec redis-server
sidekiq: bundle exec sidekiq -v -C ./config/sidekiq.yml
我可以用成功啓動nginx的:
$ sudo service nginx start
然而,當我運行$ foreman start
,而其他三個過程成功啓動,nginx的不:
11:15:46 nginx.1 | started with pid 15966
11:15:46 unicorn.1 | started with pid 15968
11:15:46 redis.1 | started with pid 15971
11:15:46 sidekiq.1 | started with pid 15974
11:15:46 nginx.1 | Starting nginx: nginx.
11:15:46 nginx.1 | exited with code 0
11:15:46 system | sending SIGTERM to all processes
SIGTERM received
11:15:46 unicorn.1 | terminated by SIGTERM
11:15:46 redis.1 | terminated by SIGTERM
11:15:46 sidekiq.1 | terminated by SIGTERM
S o爲什麼不是由Foreman啓動時啓動的nginx?
檢查出你的nginx的日誌,「有碼0退出」可能意味着很多東西。通常日誌可以在/ var/log/nginx –
@TanelSuurhans找到感謝您的建議。不幸的是,有兩個日誌,但/var/log/nginx/access.log和/var/log/nginx/error.log都是空的。 – Undistraction
如果您執行'$ sudo foreman start',會發生什麼情況? –