You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please ask questions about using Supervisor on the supervisor-users mailing list. We use this issue tracker mainly for bugs in Supervisor itself.
The Subprocess Environment section in the documentation explains how the subprocess environment is created.
From the error message:
Error: Format string 'TWITTERACCESSTOKEN=%(ENV_TWITTERACCESSTOKEN)s' for 'environment' contains names ('ENV_TWITTERACCESSTOKEN') which cannot be expanded. Available names: ENV_HISTSIZE, ENV_HOME, ENV_HOSTNAME, ENV_LANG, ENV_LOGNAME, ENV_LS_COLORS, ENV_MAIL, ENV_PATH, ENV_SHELL, ENV_SUDO_COMMAND, ENV_SUDO_GID, ENV_SUDO_UID, ENV_SUDO_USER, ENV_TERM, ENV_USER, ENV_USERNAME, group_name, here, host_node_name, process_num, program_name in section 'program:notificationhandler' (file: '/etc/supervisord.conf')
You're trying to use the expansion %(ENV_TWITTERACCESSTOKEN)s in the config file. This means that a TWITTERACCESSTOKEN variable must exist in supervisord's environment. TWITTERACCESSTOKEN is not set in supervisord's environment, so it can't be expanded.
I am trying to get the value of variables exported in environment inside the supervisor. My configuration looks like this:
[program:notificationhandler]
directory=/home/sp0090
command=sh run_notification.sh
environment=TWITTERACCESSTOKEN=%(ENV_TWITTERACCESSTOKEN)s
killasgroup=true
stopasgroup=true
autostart=true
autorestart=true
stopsignal=KILL
stdout_logfile=/var/log/celery/notification.log
stderr_logfile=/var/log/celery/notification.log
For this configuration, I get the error:
I have tried other combination as well. Listed below are those:
TWITTER_ACCESS_TOKEN=%(ENV_TWITTER_ACCESS_TOKEN)s
TWITTER_ACCESS_TOKEN=%(ENV_TWITTERACCESSTOKEN)s
TWITTERACCESSTOKEN=%(ENV_TWITTER_ACCESS_TOKEN)s
TWITTERACCESSTOKEN=%(ENV_TWITTERACCESSTOKEN)s
All 4 of these gives the same error. I am using supervisor 3.3.1. What am I doing wrong here?
The text was updated successfully, but these errors were encountered: