supervisord Fehler: Ungültiger Benutzername
Ich versuche zu konfigurieren supervisord
mit golang web app
nach der Artikel. Bekam aber eine Fehlermeldung, wenn ich den Befehl ausführen sudo supervisord -c /etc/supervisor/supervisord.conf
:
Error: Invalid username deploy user # the user your app should run as (i.e. *not* root!)
Ich erstellte Benutzer deployuser
und fügte hinzu, es zu Gruppe supervisor
sudo adduser deployser supervisor
Supervisord config-Datei ist
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0770 ; sockef file mode (default 0700)
chown=root:supervisor ; add our group
[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix://URL for a unix socket
[include]
files = /etc/supervisor/conf.d/*.conf
Ich Hinzugefügt Benutzer deployuser
zu meiner app config-Datei:
[program:myGolangApp]
command=/root/path/to/my/go/lang/app/myGolangApp # the location of your app
autostart=true
autorestart=true
startretries=10
user=deployuser # the user your app should run as (i.e. *not* root!)
directory=/root/path/to/my/go/lang/app/# where your application runs from
environment=APP_SETTINGS="/srv/www/yourapp.com/prod.toml" # environmental variables
redirect_stderr=true
stdout_logfile=/var/log/supervisor/myGolangApp.log # the name of the log file.
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=10
Mein os ist ubuntu server. Und ich mache all die Konfiguration logined als root.
Du musst angemeldet sein, um einen Kommentar abzugeben.
Versuchen Sie, die Kommentar-Stil im zweiten Kommentar ( # -> ; )passend zu den ersten Stil. Ich kann es nicht finden in den docs, aber Sie scheinen nicht zu verwenden "#" für einen Kommentar.
Scheint es wirklich verdächtig, dass die gesamte Konfiguration ist in Zeile der Fehler. Wenn es hatte richtig analysiert werden, es wäre nur ein Fehler Wert, nicht das Kommentar.
Es scheint, dass Sie einen Tippfehler gemacht:
deployser
vs.deployuser