新聞中心
本篇內容介紹了“supervisor ERROR (spawn error)錯誤怎么解決”的有關知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠學有所成!
開陽ssl適用于網(wǎng)站、小程序/APP、API接口等需要進行數(shù)據(jù)傳輸應用場景,ssl證書未來市場廣闊!成為創(chuàng)新互聯(lián)建站的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18982081108(備注:SSL證書合作)期待與您的合作!
在supervisor中配置的進程無法正常啟動
supervisorctl status
可以看到運行狀態(tài),
cerebro FATAL Exited too quickly (process log may have details)
這里的信息太少,我們需要到具體的日志中查看到底出了什么問題。
tail -20 /var/log/supervisord.log
2017-08-07 13:23:36,829 INFO spawned: 'cerebro' with pid 16482
2017-08-07 13:23:36,863 INFO exited: cerebro (exit status 1; not expected)
2017-08-07 13:23:36,863 INFO gave up: cerebro entered FATAL state, too many start retries too quickly
這里的信息雖然多了些,但是并沒有實質性的內容。
到底啟動的時候發(fā)生了什么呢
supervisorctl tail programname stdout (能解決大多問題,programname改為自己服務的名字)
該命令是動態(tài)的輸出啟動進程時的輸出
/usr/bin/env: bash: Not a directory
發(fā)現(xiàn)環(huán)境變量沒有正確配置。
我其實已經(jīng)在/etc/profile中配置了java的環(huán)境變量,但是沒有效果。
因為supervisor啟動時并不會加載/etc/profile 文件。(設計本身)
但是supervisor 提供了一個配置參數(shù)enviroment
[program:cerebro]
environment = JAVA_HOME="/opt/jdk/"
command =/bin/bash /opt/cerebro/bin/cerebro
autostart =true
autorestart = true
使用
supervisorctl update
supervisorctl reload
supervisorctl status
進程正常工作
cerebro RUNNING pid 17236, uptime 0:00:08
elasticsearch RUNNING pid 17235, uptime 0:00:08
“supervisor ERROR (spawn error)錯誤怎么解決”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關的知識可以關注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質量的實用文章!
當前文章:supervisorERROR(spawnerror)錯誤怎么解決
URL網(wǎng)址:http://fisionsoft.com.cn/article/pggeji.html