2016-07-09 20 views
0

Ich versuche, Gunicorn mit Hilfe von bosh release.It ist zufällig fehlgeschlagen.Einige Zeit funktioniert es gut andere Zeit es scheitert.Monit-Status ist fehlgeschlagen, aber Prozess funktioniert gut

monit Zusammenfassung

Process 'gunicorn'     Execution failed 
Process 'nginx'      running 
Process 'consul'     running 

monit log ist

[UTC Jul 9 11:56:06] error : 'gunicorn' process is not running 
[UTC Jul 9 11:56:06] info  : 'gunicorn' trying to restart 
[UTC Jul 9 11:56:06] info  : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger 
[UTC Jul 9 11:56:11] info  : start service 'consul' on user request 
[UTC Jul 9 11:56:11] info  : monit daemon at 1383 awakened 
[UTC Jul 9 11:56:11] info  : start service 'nginx' on user request 
[UTC Jul 9 11:56:11] info  : monit daemon at 1383 awakened 
[UTC Jul 9 11:56:11] info  : start service 'gunicorn' on user request 
[UTC Jul 9 11:56:11] info  : monit daemon at 1383 awakened 
[UTC Jul 9 11:56:36] error : 'gunicorn' failed to start 
[UTC Jul 9 11:56:36] info  : 'nginx' start: /var/vcap/jobs/nginx/bin/monit_debugger 
[UTC Jul 9 11:56:37] info  : 'nginx' start action done 
[UTC Jul 9 11:56:37] info  : 'consul' start: /var/vcap/jobs/consul/bin/monit_debugger 
[UTC Jul 9 11:56:38] info  : 'consul' start action done 
[UTC Jul 9 11:56:38] info  : Awakened by User defined signal 1 
[UTC Jul 9 11:56:38] info  : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger 
[UTC Jul 9 11:57:08] error : 'gunicorn' failed to start 
[UTC Jul 9 11:57:08] info  : 'gunicorn' start action done 
[UTC Jul 9 11:57:18] error : 'gunicorn' process is not running 
[UTC Jul 9 11:57:18] info  : 'gunicorn' trying to restart 
[UTC Jul 9 11:57:18] info  : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger 
[UTC Jul 9 11:57:48] error : 'gunicorn' failed to start 
[UTC Jul 9 11:57:58] error : 'gunicorn' process is not running 
[UTC Jul 9 11:57:58] info  : 'gunicorn' trying to restart 
[UTC Jul 9 11:57:58] info  : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger 
[UTC Jul 9 11:58:28] error : 'gunicorn' failed to start 
[UTC Jul 9 11:58:38] error : 'gunicorn' process is not running 
[UTC Jul 9 11:58:38] info  : 'gunicorn' trying to restart 
[UTC Jul 9 11:58:38] info  : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger 
[UTC Jul 9 11:59:08] error : 'gunicorn' failed to start 
[UTC Jul 9 11:59:18] info  : 'gunicorn' process is running with pid 5670 

Prozess auch feine
ps -ef

root  5670  1 0 11:59 ?  00:00:02 /usr/bin/python /usr/local/bin/gunicorn --workers 3 --bind 0.0.0.0:8000 idmapi.wsgi:application 
root  5682 5670 0 11:59 ?  00:00:00 /usr/bin/python /usr/local/bin/gunicorn --workers 3 --bind 0.0.0.0:8000 idmapi.wsgi:application 
root  5685 5670 0 11:59 ?  00:00:00 /usr/bin/python /usr/local/bin/gunicorn --workers 3 --bind 0.0.0.0:8000 idmapi.wsgi:application 
root  5686 5670 0 11:59 ?  00:00:00 /usr/bin/python /usr/local/bin/gunicorn --workers 3 --bind 0.0.0.0:8000 idmapi.wsgi:application 

Dies geschieht

012.351.641 zufällig arbeitet

Wenn gunicorn i log erhalten folgende gelingt

[UTC Jul 8 22:32:31] error : 'gunicorn' process is not running 
[UTC Jul 8 22:32:31] info  : 'gunicorn' trying to restart 
[UTC Jul 8 22:32:31] info  : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger 
[UTC Jul 8 22:32:36] info  : start service 'consul' on user request 
[UTC Jul 8 22:32:36] info  : monit daemon at 1375 awakened 
[UTC Jul 8 22:32:36] info  : start service 'nginx' on user request 
[UTC Jul 8 22:32:36] info  : monit daemon at 1375 awakened 
[UTC Jul 8 22:32:36] info  : start service 'gunicorn' on user request 
[UTC Jul 8 22:32:36] info  : monit daemon at 1375 awakened 
[UTC Jul 8 22:33:01] error : 'gunicorn' failed to start 
[UTC Jul 8 22:33:01] info  : 'nginx' start: /var/vcap/jobs/nginx/bin/monit_debugger 
[UTC Jul 8 22:33:02] info  : 'nginx' start action done 
[UTC Jul 8 22:33:02] info  : 'consul' start: /var/vcap/jobs/consul/bin/monit_debugger 
[UTC Jul 8 22:33:03] info  : 'consul' start action done 
[UTC Jul 8 22:33:03] info  : Awakened by User defined signal 1 
[UTC Jul 8 22:33:03] info  : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger 
[UTC Jul 8 22:33:33] error : 'gunicorn' failed to start 
[UTC Jul 8 22:33:33] info  : 'gunicorn' start action done 
[UTC Jul 8 22:33:43] error : 'gunicorn' process is not running 
[UTC Jul 8 22:33:43] info  : 'gunicorn' trying to restart 
[UTC Jul 8 22:33:43] info  : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger 
[UTC Jul 8 22:34:13] error : 'gunicorn' failed to start 
[UTC Jul 8 22:34:23] error : 'gunicorn' process is not running 
[UTC Jul 8 22:34:23] info  : 'gunicorn' trying to restart 
[UTC Jul 8 22:34:23] info  : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger 
[UTC Jul 8 22:34:53] error : 'gunicorn' failed to start 
[UTC Jul 8 22:35:03] error : 'gunicorn' process is not running 
[UTC Jul 8 22:35:03] info  : 'gunicorn' trying to restart 
[UTC Jul 8 22:35:03] info  : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger 
[UTC Jul 8 22:35:33] error : 'gunicorn' failed to start 
[UTC Jul 8 22:35:43] error : 'gunicorn' process is not running 
[UTC Jul 8 22:35:43] info  : 'gunicorn' trying to restart 
[UTC Jul 8 22:35:43] info  : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger 
[UTC Jul 8 22:36:13] error : 'gunicorn' failed to start 
[UTC Jul 8 22:36:23] error : 'gunicorn' process is not running 
[UTC Jul 8 22:36:23] info  : 'gunicorn' trying to restart 
[UTC Jul 8 22:36:23] info  : 'gunicorn' start: /var/vcap/jobs/gunicorn/bin/monit_debugger 
[UTC Jul 8 22:36:25] info  : 'gunicorn' started 
[UTC Jul 8 22:36:35] info  : 'gunicorn' process is running with pid 5780 

UPDATE

check process gunicorn 
    with pidfile /var/vcap/sys/run/gunicorn/gunicorn.pid 
    start program "/var/vcap/jobs/gunicorn/bin/monit_debugger gunicorn_ctl '/var/vcap/jobs/gunicorn/bin/gunicorn_ctl start'" 
    stop program "/var/vcap/jobs/gunicorn/bin/monit_debugger gunicorn_ctl '/var/vcap/jobs/gunicorn/bin/gunicorn_ctl stop'" 
    group vcap 
+0

Können Sie einen Link zu der von Ihnen verwendeten bosh-Version bereitstellen? Was ist in der Monit-Datei, die den 'Gunicorn'-Prozess definiert? –

+0

Ich habe es erstellt mnaully .thi bosh release ist nicht online verfügbar. Ich habe die Frage –

+0

aktualisiert Sie sollten überprüfen, wenn der Prozess läuft und Monit sagt, dass es gescheitert ist, die Prozess-ID in/var/vcap/sys/run/gunicorn /gunicorn.pid entspricht der ID des laufenden Prozesses selbst. –

Antwort

0

Sie könnten die pid Ihres Prozesses überprüfen möchten, ob es oder nicht. Allgemein ist es in /var/run/ Ordner gespeichert. Wenn die pid Datei fehlt, sollten Sie manuell starten & starten Sie den Prozess.