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

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Apr 5 09:38:41 EDT 2017


Thank you Robert,

Any of your finds (the incorrect configurations) worth be documented in 
the README file, so other user will benefit of it ? if yes, just sent 
the text and where it should be inserted and I can do the task.

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:15 PM, Mundkowsky, Robert wrote:
> No. That is set correctly. If it was not, then it would not work for both ways to start the server.
>
> Regardless, I think I had something configured incorrectly.  Seems to work now.
>
> Thanks,
>
> Robert Mundkowsky
>
> -----Original Message-----
> From: Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
> Sent: Wednesday, April 5, 2017 4:07 AM
> To: Mundkowsky, Robert <rmundkowsky at ets.org>; OpenSIPS users mailling list <users at lists.opensips.org>
> Subject: Re: [OpenSIPS-Users] 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' <bogdan at opensips.org>; OpenSIPS users
>> mailling list <users at lists.opensips.org>
>> 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:bogdan at opensips.org]
>> Sent: Tuesday, April 4, 2017 1:52 PM
>> To: OpenSIPS users mailling list <users at lists.opensips.org>;
>> Mundkowsky, Robert <rmundkowsky at ets.org>
>> 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
>>> Users at lists.opensips.org
>>> 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.
>>
>> ________________________________
>
> ________________________________
>
> 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.
>
> ________________________________




More information about the Users mailing list