Discussion:
[Supervisor-users] environment variables
Matt J Davies
2016-07-07 12:43:58 UTC
Permalink
Hello there

I’m trying to use some added environment variables, and it’s proving to be a massive pain in the arse.

I’m running 3.0b2

How on gods green earth are you supposed to setup this variable?

QUERCUS_PUBLISHER_RABBIT_CONN_STRING="amqp://username:***@server.isd.glam.ac.uk:5672/"

This doesn’t work
[program:nameofprogram]
environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING="amqp://username:***@server.isd.glam.ac.uk:5672/"

This doesn’t work
[program:nameofprogram]
environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING=amqp://username:***@server.isd.glam.ac.uk:5672/

This doesn’t work, with the value setup in an environment variable
[program:nameofprogram]
environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING=%(ENV_QUERCUS_PUBLISHER_RABBIT_CONN_STRING)s

The error I keep getting from the code is

Failed to connect to RabbitMQ: AMQP scheme must be either 'amqp://' or 'amqps://'

It seems that it’s either not setting it at all, or it’s escaping something.

Any help or tips, gratefully received.
rod
2016-07-07 14:02:59 UTC
Permalink
I'm on 3.0, and this works for me...

[program:nameofprogram]
environment=
_JAVA_OPTIONS="FOO BAR",
LOGFILE="/var/log/example"

I also use the single line version and have had no problem. Maybe try
putting a commer at the end of the line.. I remember hearing something
strange about python dicts.

Hope that helps.
Post by Matt J Davies
Hello there
I’m trying to use some added environment variables, and it’s proving to be
a massive pain in the arse.
I’m running 3.0b2
How on gods green earth are you supposed to setup this variable?
QUERCUS_PUBLISHER_RABBIT_CONN_STRING="amqp://
This doesn’t work
[program:nameofprogram]
environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING="amqp://
This doesn’t work
[program:nameofprogram]
environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING=amqp://
This doesn’t work, with the value setup in an environment variable
[program:nameofprogram]
environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING=%(ENV_QUERCUS_PUBLISHER_RABBIT_CONN_STRING)s
The error I keep getting from the code is
Failed to connect to RabbitMQ: AMQP scheme must be either 'amqp://' or 'amqps://'
It seems that it’s either not setting it at all, or it’s escaping something.
Any help or tips, gratefully received.
_______________________________________________
Supervisor-users mailing list
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Matt J Davies
2016-07-07 14:06:08 UTC
Permalink
Thanks for getting back to me Rod

I worked it out in the end.

The error was misleading, if I added another / to the end of the variable, it worked.
environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING=amqp://username:***@server.isd.glam.ac.uk:5672/<http://username:***@server.isd.glam.ac.uk:5672/>/
Ta da!!
mental




From: rod <***@pu-gh.com>
Date: Thursday, 7 July 2016 at 15:02
To: Matt Davies <***@southwales.ac.uk>, "supervisor-***@lists.supervisord.org" <supervisor-***@lists.supervisord.org>
Subject: Re: [Supervisor-users] environment variables

I'm on 3.0, and this works for me...

[program:nameofprogram]
environment=
_JAVA_OPTIONS="FOO BAR",
LOGFILE="/var/log/example"

I also use the single line version and have had no problem. Maybe try putting a commer at the end of the line.. I remember hearing something strange about python dicts.

Hope that helps.


On Thu, Jul 7, 2016 at 1:44 PM Matt J Davies <***@southwales.ac.uk<mailto:***@southwales.ac.uk>> wrote:
Hello there

I’m trying to use some added environment variables, and it’s proving to be a massive pain in the arse.

I’m running 3.0b2

How on gods green earth are you supposed to setup this variable?

QUERCUS_PUBLISHER_RABBIT_CONN_STRING="amqp://username:***@server.isd.glam.ac.uk:5672/<http://username:***@server.isd.glam.ac.uk:5672/>"

This doesn’t work
[program:nameofprogram]
environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING="amqp://username:***@server.isd.glam.ac.uk:5672/<http://username:***@server.isd.glam.ac.uk:5672/>"

This doesn’t work
[program:nameofprogram]
environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING=amqp://username:***@server.isd.glam.ac.uk:5672/<http://username:***@server.isd.glam.ac.uk:5672/>

This doesn’t work, with the value setup in an environment variable
[program:nameofprogram]
environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING=%(ENV_QUERCUS_PUBLISHER_RABBIT_CONN_STRING)s

The error I keep getting from the code is

Failed to connect to RabbitMQ: AMQP scheme must be either 'amqp://' or 'amqps://'

It seems that it’s either not setting it at all, or it’s escaping something.

Any help or tips, gratefully received.


_______________________________________________
Supervisor-users mailing list
Supervisor-***@lists.supervisord.org<mailto:Supervisor-***@lists.supervisord.org>
https://lists.supervisord.org/mailman/listinfo/supervisor-users

Loading...