I need to proxy multiple environment variables from /etc/environment to a process managed by a supervisor.

The following configuration worked for me with supervisor 3.0r1-1 but supervisor 3.2.0-2 reports an error:


Error: Unexpected end of key/value pairs in value...

Some answers suggest to quote the values but if I do so, the variables wouldn't be expanded to real values.

What am I doing wrong? How to fix it?


According to http://supervisord.org/configuration.html?highlight=environment, have you tried putting them all on one line?


(that is, = is used for both environment itself and for the key-value pairs, separated by commas, with the values bounded with quotation marks)

Also, where does $FOO come from? http://supervisord.org/subprocess.html#subprocess-environment says 'No shell is executed by supervisord when it runs a subprocess' so its not clear how you expect $FOO to work.

  • $FOO is an environment variable.
    – Kolyunya
    May 29 '17 at 20:59
  • From where though? Supervisord isn't passing that to a shell, so its not going to know how to handle it other than as a string. May 29 '17 at 21:00
  • Subprocesses will inherit the environment of the shell used to start the supervisord program. $FOO is an environment variable of the shell used to start the supervisord program.
    – Kolyunya
    May 29 '17 at 21:00
  • I defined those variables in /etc/environment.
    – Kolyunya
    May 29 '17 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.