[OpenSIPS-Users] set environment variables for system - opensipsctl?

robert rmundkowsky at ets.org
Wed Apr 5 09:15:07 EDT 2017


No. That is set correctly. If it was not, then it would not work for both ways to start the server.

Robert Mundkowsky

From: Bogdan-Andrei Iancu-2 [via OpenSIPS (Open SIP Server)] [mailto:ml-node+s1449251n7606824h51 at n2.nabble.com]
Sent: Wednesday, April 5, 2017 4:08 AM
To: Mundkowsky, Robert <rmundkowsky at ets.org>
Subject: Re: set environment variables for system - opensipsctl?

Hi Robert,

I think the difference is not about env vars but about the current path.
As per your error, OpenSIPS (the python module) is not able to locate
the python file due a wrong basename for the file (given by the
script_name module parameter).

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/05/2017 04:42 AM, Mundkowsky, Robert wrote:

> Well, seems to work now. I think I had something wrong in the opensipsctlrc file.
>
> Might have been that PID_FILE needed to be explicitly set, because I am not running as root and using a "prefix" install location.
>
> BTW, is it reasonable to set PYTHONPATH in the opensipsctlrc file?
>
>
>
>
> Robert Mundkowsky
>
> -----Original Message-----
> From: Mundkowsky, Robert
> Sent: Tuesday, April 4, 2017 2:16 PM
> To: 'Bogdan-Andrei Iancu' <[hidden email]</user/SendEmail.jtp?type=node&node=7606824&i=0>>; OpenSIPS users mailling list <[hidden email]</user/SendEmail.jtp?type=node&node=7606824&i=1>>
> Subject: RE: [OpenSIPS-Users] set environment variables for system - opensipsctl?
>
> I am using opensips python module.  I am using PYTHONPATH env variable.
>
> System starts without errors via "opensips start", but fails via " opensipsctl start" and it complains about the python module. Error messages are:
>
> Apr  4 18:14:32 ip-10-61-81-170 /export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:python:mod_init: cannot import callbackFromOpenSIPS Apr  4 18:14:32 ip-10-61-81-170 /export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:core:init_mod: failed to initialize module python Apr  4 18:14:32 ip-10-61-81-170 /export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:core:main: error while initializing modules
>
>
> Robert Mundkowsky
>
> -----Original Message-----
> From: Bogdan-Andrei Iancu [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7606824&i=2>]
> Sent: Tuesday, April 4, 2017 1:52 PM
> To: OpenSIPS users mailling list <[hidden email]</user/SendEmail.jtp?type=node&node=7606824&i=3>>; Mundkowsky, Robert <[hidden email]</user/SendEmail.jtp?type=node&node=7606824&i=4>>
> Subject: Re: [OpenSIPS-Users] set environment variables for system - opensipsctl?
>
> Hi Robert,
>
> The opensipsctl tool starts OpenSIPS directly by using the opensips binary - nothing special.
>
> What are the env vars you have problems with ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>     OpenSIPS Founder and Developer
>     http://www.opensips-solutions.com
>
> OpenSIPS Summit May 2017 Amsterdam
>     http://www.opensips.org/events/Summit-2017Amsterdam.html
>
> On 04/04/2017 08:14 PM, robert wrote:
>> If I start opensips via:
>>
>> opensips start
>>
>> It seems to pickup the environment variables from current session
>> correctly, but if use:
>>
>> opensipsctl start
>>
>> It does not pickup the environment variables from current session.
>>
>> Is there some configuration file where I can set environment variables
>> for the system regardless of the way I start opensips?
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://opensips-open-sip-server.1449251.n2.nabble.com/set-environment-
>> variables-for-system-opensipsctl-tp7606807.html
>> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]</user/SendEmail.jtp?type=node&node=7606824&i=5>
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ________________________________
>
> This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.
>
>
> Thank you for your compliance.
>
> ________________________________


_______________________________________________
Users mailing list
[hidden email]</user/SendEmail.jtp?type=node&node=7606824&i=6>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

________________________________
If you reply to this email, your message will be added to the discussion below:
http://opensips-open-sip-server.1449251.n2.nabble.com/set-environment-variables-for-system-opensipsctl-tp7606807p7606824.html
To unsubscribe from set environment variables for system - opensipsctl?, click here<http://opensips-open-sip-server.1449251.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7606807&code=cm11bmRrb3dza3lAZXRzLm9yZ3w3NjA2ODA3fDE0NzQ1Njg4MDQ=>.
NAML<http://opensips-open-sip-server.1449251.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

________________________________

This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.


Thank you for your compliance.

________________________________




--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/set-environment-variables-for-system-opensipsctl-tp7606807p7606856.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170405/f914af4f/attachment-0001.html>


More information about the Users mailing list