[Supervisor-users] environment variables

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Supervisor-users] environment variables

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://username:[hidden email]:5672/"

 

This doesn’t work

[program:nameofprogram]

environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING="amqp://username:[hidden email]:5672/"

 

This doesn’t work

[program:nameofprogram]

environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING=amqp://username:[hidden email]: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
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users
rod
Reply | Threaded
Open this post in threaded view
|

Re: [Supervisor-users] environment variables

rod
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 <[hidden email]> 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:password@...:5672/"

 

This doesn’t work

[program:nameofprogram]

environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING="amqp://username:password@...:5672/"

 

This doesn’t work

[program:nameofprogram]

environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING=amqp://username:password@...: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
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users

_______________________________________________
Supervisor-users mailing list
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Reply | Threaded
Open this post in threaded view
|

Re: [Supervisor-users] environment variables

Matt J Davies

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:password@...:5672//

Ta da!!

mental

 

 

 

 

From: rod <[hidden email]>
Date: Thursday, 7 July 2016 at 15:02
To: Matt Davies <[hidden email]>, "[hidden email]" <[hidden email]>
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 <[hidden email]> 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:password@...:5672/"

 

This doesn’t work

[program:nameofprogram]

environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING="amqp://username:password@...:5672/"

 

This doesn’t work

[program:nameofprogram]

environment=QUERCUS_PUBLISHER_RABBIT_CONN_STRING=amqp://username:password@...: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
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users


_______________________________________________
Supervisor-users mailing list
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users