Hey all,
I’m setting up a dev-7 (bd477f) server to test as per the other thread, however I’m getting the following loading my config:
ERROR: app_ruby [app_ruby_api.c:465]: sr_kemi_ruby_exec_func_ex(): invalid ruby environment attributes or parameters
I’m unsure what this error means - are there expected environment variables or other values that must be set? I didn’t see this issue in dev-4.
I thought it might be not able to find the library, but I ran with debug=4 and saw:
DEBUG: app_ruby [app_ruby_api.c:193]: ruby_sr_init_child(): test execution without error ERROR: app_ruby [app_ruby_api.c:107]: app_ruby_print_last_exception(): exception: undefined method `>' for false:FalseClass
I changed kamailio.cfg to load my generic routing script, and during the onreply_manage it runs:
scode = KSR::PV.get("$rs”)
This now returns false (which appears to be the second error above, I check if scode is > 599).
Has anything changed in the way ruby is loaded in dev-7? I’m using the same ruby/ruby-devel library versions on the same OS. I did this deploy the same with devel-4 a few weeks ago and this didn’t happen.
Thanks!
Andrew
Hello,
there was a change to use the core PV functions, not those implemented in app_ruby, so this might have broken something.
Can you run kamailio master branch with jsonrpcs module loaded and then execute:
kamctl rpc app_ruby.api_list
See if the PV functions are listed int the output.
Cheers, Daniel
On 05.08.19 15:19, Andrew White wrote:
Hey all,
I’m setting up a dev-7 (bd477f) server to test as per the other thread, however I’m getting the following loading my config:
ERROR: app_ruby [app_ruby_api.c:465]: sr_kemi_ruby_exec_func_ex(): invalid ruby environment attributes or parameters
I’m unsure what this error means - are there expected environment variables or other values that must be set? I didn’t see this issue in dev-4.
I thought it might be not able to find the library, but I ran with debug=4 and saw:
DEBUG: app_ruby [app_ruby_api.c:193]: ruby_sr_init_child(): test execution without error ERROR: app_ruby [app_ruby_api.c:107]: app_ruby_print_last_exception(): exception: undefined method `>' for false:FalseClass
I changed kamailio.cfg to load my generic routing script, and during the onreply_manage it runs:
scode = KSR::PV.get("$rs”)
This now returns false (which appears to be the second error above, I check if scode is > 599).
Has anything changed in the way ruby is loaded in dev-7? I’m using the same ruby/ruby-devel library versions on the same OS. I did this deploy the same with devel-4 a few weeks ago and this didn’t happen.
Thanks!
Andrew _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hey Daniel,
They certainly seem to be, here’s a snippet:
{ "func": { "ret": "xval", "module": "pv", "name": "getw", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "gete", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvn", "params": "str, int" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvs", "params": "str, str" } }, { "func": { "ret": "bool", "module": "pv", "name": "seti", "params": "str, int" } }, { "func": { "ret": "bool", "module": "pv", "name": "sets", "params": "str, str" } },
I’ve just done a fresh deploy with the same playbook to a new instance, but using dev-4 (6d43eacd6d5b78fe857267e70b7fa85519a7d5b6) instead of dev-7 (bd477f5bb938a05efab76fb096cf5ac780d65c45) and it works perfectly, so it must be a change in between the two.
I was going to add in a ruby example config to https://github.com/kamailio/kamailio/tree/master/misc/examples/kemi a while ago, but I keep getting caught up with other things. Would it be helpful here for testing if I did this and put in a pull request? I’ll see if I can get that done tonight (I guess today EU time!)
Cheers,
Andrew
On 6 Aug 2019, at 2:27 am, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
there was a change to use the core PV functions, not those implemented in app_ruby, so this might have broken something.
Can you run kamailio master branch with jsonrpcs module loaded and then execute:
kamctl rpc app_ruby.api_list
See if the PV functions are listed int the output.
Cheers, Daniel
On 05.08.19 15:19, Andrew White wrote:
Hey all,
I’m setting up a dev-7 (bd477f) server to test as per the other thread, however I’m getting the following loading my config:
ERROR: app_ruby [app_ruby_api.c:465]: sr_kemi_ruby_exec_func_ex(): invalid ruby environment attributes or parameters
I’m unsure what this error means - are there expected environment variables or other values that must be set? I didn’t see this issue in dev-4.
I thought it might be not able to find the library, but I ran with debug=4 and saw:
DEBUG: app_ruby [app_ruby_api.c:193]: ruby_sr_init_child(): test execution without error ERROR: app_ruby [app_ruby_api.c:107]: app_ruby_print_last_exception(): exception: undefined method `>' for false:FalseClass
I changed kamailio.cfg to load my generic routing script, and during the onreply_manage it runs:
scode = KSR::PV.get("$rs”)
This now returns false (which appears to be the second error above, I check if scode is > 599).
Has anything changed in the way ruby is loaded in dev-7? I’m using the same ruby/ruby-devel library versions on the same OS. I did this deploy the same with devel-4 a few weeks ago and this didn’t happen.
Thanks!
Andrew _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda
Hi Andrew,
comments below inline
Am 06.08.19 um 09:14 schrieb Andrew White: Hey Daniel,
They certainly seem to be, here’s a snippet:
{ "func": { "ret": "xval", "module": "pv", "name": "getw", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "gete", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvn", "params": "str, int" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvs", "params": "str, str" } }, { "func": { "ret": "bool", "module": "pv", "name": "seti", "params": "str, int" } }, { "func": { "ret": "bool", "module": "pv", "name": "sets", "params": "str, str" } },
I’ve just done a fresh deploy with the same playbook to a new instance, but using dev-4 (6d43eacd6d5b78fe857267e70b7fa85519a7d5b6) instead of dev-7 (bd477f5bb938a05efab76fb096cf5ac780d65c45) and it works perfectly, so it must be a change in between the two.
Just looked to the app_ruby commits - they are only 10 or so after dev4. Maybe you can just a bi-sect (pick the one in the middle, see if still works, pick the next one in the "new" middle etc..) to find the commit that broke it for you.
I was going to add in a ruby example config to https://github.com/kamailio/kamailio/tree/master/misc/examples/kemi a while ago, but I keep getting caught up with other things. Would it be helpful here for testing if I did this and put in a pull request? I’ll see if I can get that done tonight (I guess today EU time!)
Pull requests are always welcome, and an example cfg would make testing of course easier for other developers as well.
Cheers,
Henning
On 6 Aug 2019, at 2:27 am, Daniel-Constantin Mierla <miconda@gmail.commailto:miconda@gmail.com> wrote:
Hello,
there was a change to use the core PV functions, not those implemented in app_ruby, so this might have broken something.
Can you run kamailio master branch with jsonrpcs module loaded and then execute:
kamctl rpc app_ruby.api_list
See if the PV functions are listed int the output.
Cheers, Daniel
On 05.08.19 15:19, Andrew White wrote: Hey all,
I’m setting up a dev-7 (bd477f) server to test as per the other thread, however I’m getting the following loading my config:
ERROR: app_ruby [app_ruby_api.c:465]: sr_kemi_ruby_exec_func_ex(): invalid ruby environment attributes or parameters
I’m unsure what this error means - are there expected environment variables or other values that must be set? I didn’t see this issue in dev-4.
I thought it might be not able to find the library, but I ran with debug=4 and saw:
DEBUG: app_ruby [app_ruby_api.c:193]: ruby_sr_init_child(): test execution without error ERROR: app_ruby [app_ruby_api.c:107]: app_ruby_print_last_exception(): exception: undefined method `>' for false:FalseClass
I changed kamailio.cfg to load my generic routing script, and during the onreply_manage it runs:
scode = KSR::PV.get("$rs”)
This now returns false (which appears to be the second error above, I check if scode is > 599).
Has anything changed in the way ruby is loaded in dev-7? I’m using the same ruby/ruby-devel library versions on the same OS. I did this deploy the same with devel-4 a few weeks ago and this didn’t happen.
Thanks!
Andrew _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comhttp://www.asipto.com www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://skalatan.de/services
Hi Henning,
Thanks! I’ll start bisecting now and see what I can find and report back.
Awesome, I’ve built and tested a generic config and submitted a pull request - I’m excited to finally be contributing!
Thanks again,
Andrew
On 6 Aug 2019, at 5:30 pm, Henning Westerholt hw@skalatan.de wrote:
Hi Andrew,
comments below inline
Am 06.08.19 um 09:14 schrieb Andrew White:
Hey Daniel,
They certainly seem to be, here’s a snippet:
{ "func": { "ret": "xval", "module": "pv", "name": "getw", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "gete", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvn", "params": "str, int" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvs", "params": "str, str" } }, { "func": { "ret": "bool", "module": "pv", "name": "seti", "params": "str, int" } }, { "func": { "ret": "bool", "module": "pv", "name": "sets", "params": "str, str" } },
I’ve just done a fresh deploy with the same playbook to a new instance, but using dev-4 (6d43eacd6d5b78fe857267e70b7fa85519a7d5b6) instead of dev-7 (bd477f5bb938a05efab76fb096cf5ac780d65c45) and it works perfectly, so it must be a change in between the two.
Just looked to the app_ruby commits - they are only 10 or so after dev4. Maybe you can just a bi-sect (pick the one in the middle, see if still works, pick the next one in the "new" middle etc..) to find the commit that broke it for you.
I was going to add in a ruby example config to https://github.com/kamailio/kamailio/tree/master/misc/examples/kemi https://github.com/kamailio/kamailio/tree/master/misc/examples/kemi a while ago, but I keep getting caught up with other things. Would it be helpful here for testing if I did this and put in a pull request? I’ll see if I can get that done tonight (I guess today EU time!)
Pull requests are always welcome, and an example cfg would make testing of course easier for other developers as well. Cheers,
Henning
On 6 Aug 2019, at 2:27 am, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
Hello,
there was a change to use the core PV functions, not those implemented in app_ruby, so this might have broken something.
Can you run kamailio master branch with jsonrpcs module loaded and then execute:
kamctl rpc app_ruby.api_list
See if the PV functions are listed int the output.
Cheers, Daniel
On 05.08.19 15:19, Andrew White wrote:
Hey all,
I’m setting up a dev-7 (bd477f) server to test as per the other thread, however I’m getting the following loading my config:
ERROR: app_ruby [app_ruby_api.c:465]: sr_kemi_ruby_exec_func_ex(): invalid ruby environment attributes or parameters
I’m unsure what this error means - are there expected environment variables or other values that must be set? I didn’t see this issue in dev-4.
I thought it might be not able to find the library, but I ran with debug=4 and saw:
DEBUG: app_ruby [app_ruby_api.c:193]: ruby_sr_init_child(): test execution without error ERROR: app_ruby [app_ruby_api.c:107]: app_ruby_print_last_exception(): exception: undefined method `>' for false:FalseClass
I changed kamailio.cfg to load my generic routing script, and during the onreply_manage it runs:
scode = KSR::PV.get("$rs”)
This now returns false (which appears to be the second error above, I check if scode is > 599).
Has anything changed in the way ruby is loaded in dev-7? I’m using the same ruby/ruby-devel library versions on the same OS. I did this deploy the same with devel-4 a few weeks ago and this didn’t happen.
Thanks!
Andrew _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.com http://www.asipto.com/ www.twitter.com/miconda http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Henning Westerholt - https://skalatan.de/blog/ https://skalatan.de/blog/ Kamailio services - https://skalatan.de/services https://skalatan.de/services
Thank you Andrew, already merged. :-)
Am 06.08.19 um 14:52 schrieb Andrew White: Hi Henning,
Thanks! I’ll start bisecting now and see what I can find and report back.
Awesome, I’ve built and tested a generic config and submitted a pull request - I’m excited to finally be contributing!
Thanks again,
Andrew
On 6 Aug 2019, at 5:30 pm, Henning Westerholt <hw@skalatan.demailto:hw@skalatan.de> wrote:
Hi Andrew,
comments below inline
Am 06.08.19 um 09:14 schrieb Andrew White: Hey Daniel,
They certainly seem to be, here’s a snippet:
{ "func": { "ret": "xval", "module": "pv", "name": "getw", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "gete", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvn", "params": "str, int" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvs", "params": "str, str" } }, { "func": { "ret": "bool", "module": "pv", "name": "seti", "params": "str, int" } }, { "func": { "ret": "bool", "module": "pv", "name": "sets", "params": "str, str" } },
I’ve just done a fresh deploy with the same playbook to a new instance, but using dev-4 (6d43eacd6d5b78fe857267e70b7fa85519a7d5b6) instead of dev-7 (bd477f5bb938a05efab76fb096cf5ac780d65c45) and it works perfectly, so it must be a change in between the two.
Just looked to the app_ruby commits - they are only 10 or so after dev4. Maybe you can just a bi-sect (pick the one in the middle, see if still works, pick the next one in the "new" middle etc..) to find the commit that broke it for you.
I was going to add in a ruby example config to https://github.com/kamailio/kamailio/tree/master/misc/examples/kemi a while ago, but I keep getting caught up with other things. Would it be helpful here for testing if I did this and put in a pull request? I’ll see if I can get that done tonight (I guess today EU time!)
Pull requests are always welcome, and an example cfg would make testing of course easier for other developers as well.
Cheers,
Henning
On 6 Aug 2019, at 2:27 am, Daniel-Constantin Mierla <miconda@gmail.commailto:miconda@gmail.com> wrote:
Hello,
there was a change to use the core PV functions, not those implemented in app_ruby, so this might have broken something.
Can you run kamailio master branch with jsonrpcs module loaded and then execute:
kamctl rpc app_ruby.api_list
See if the PV functions are listed int the output.
Cheers, Daniel
On 05.08.19 15:19, Andrew White wrote: Hey all,
I’m setting up a dev-7 (bd477f) server to test as per the other thread, however I’m getting the following loading my config:
ERROR: app_ruby [app_ruby_api.c:465]: sr_kemi_ruby_exec_func_ex(): invalid ruby environment attributes or parameters
I’m unsure what this error means - are there expected environment variables or other values that must be set? I didn’t see this issue in dev-4.
I thought it might be not able to find the library, but I ran with debug=4 and saw:
DEBUG: app_ruby [app_ruby_api.c:193]: ruby_sr_init_child(): test execution without error ERROR: app_ruby [app_ruby_api.c:107]: app_ruby_print_last_exception(): exception: undefined method `>' for false:FalseClass
I changed kamailio.cfg to load my generic routing script, and during the onreply_manage it runs:
scode = KSR::PV.get("$rs”)
This now returns false (which appears to be the second error above, I check if scode is > 599).
Has anything changed in the way ruby is loaded in dev-7? I’m using the same ruby/ruby-devel library versions on the same OS. I did this deploy the same with devel-4 a few weeks ago and this didn’t happen.
Thanks!
Andrew _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comhttp://www.asipto.com/ www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://skalatan.de/services
-- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://skalatan.de/services
Thanks @Henning, I’m really excited and honoured to actually be in the commit history for Kamailio! That’s a tick off my bucket list for sure.
Thanks @Daniel - I’m very impressed with how much you’re doing at ClueCon, I struggle to get work done at conferences, hope you’re having fun!
The module names show in jsonrpc as lower case, although they are accessed in upper case within the code itself.
I’ve tried with the latest master and my code is running perfectly! It seems this fix worked, thanks!
Cheers Andrew
On 7 Aug 2019, at 5:30 am, Henning Westerholt hw@skalatan.de wrote:
Thank you Andrew, already merged. :-)
Am 06.08.19 um 14:52 schrieb Andrew White:
Hi Henning,
Thanks! I’ll start bisecting now and see what I can find and report back.
Awesome, I’ve built and tested a generic config and submitted a pull request - I’m excited to finally be contributing!
Thanks again,
Andrew
On 6 Aug 2019, at 5:30 pm, Henning Westerholt <hw@skalatan.de mailto:hw@skalatan.de> wrote:
Hi Andrew,
comments below inline
Am 06.08.19 um 09:14 schrieb Andrew White:
Hey Daniel,
They certainly seem to be, here’s a snippet:
{ "func": { "ret": "xval", "module": "pv", "name": "getw", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "gete", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvn", "params": "str, int" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvs", "params": "str, str" } }, { "func": { "ret": "bool", "module": "pv", "name": "seti", "params": "str, int" } }, { "func": { "ret": "bool", "module": "pv", "name": "sets", "params": "str, str" } },
I’ve just done a fresh deploy with the same playbook to a new instance, but using dev-4 (6d43eacd6d5b78fe857267e70b7fa85519a7d5b6) instead of dev-7 (bd477f5bb938a05efab76fb096cf5ac780d65c45) and it works perfectly, so it must be a change in between the two.
Just looked to the app_ruby commits - they are only 10 or so after dev4. Maybe you can just a bi-sect (pick the one in the middle, see if still works, pick the next one in the "new" middle etc..) to find the commit that broke it for you.
I was going to add in a ruby example config to https://github.com/kamailio/kamailio/tree/master/misc/examples/kemi https://github.com/kamailio/kamailio/tree/master/misc/examples/kemi a while ago, but I keep getting caught up with other things. Would it be helpful here for testing if I did this and put in a pull request? I’ll see if I can get that done tonight (I guess today EU time!)
Pull requests are always welcome, and an example cfg would make testing of course easier for other developers as well. Cheers,
Henning
On 6 Aug 2019, at 2:27 am, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
Hello,
there was a change to use the core PV functions, not those implemented in app_ruby, so this might have broken something.
Can you run kamailio master branch with jsonrpcs module loaded and then execute:
kamctl rpc app_ruby.api_list
See if the PV functions are listed int the output.
Cheers, Daniel
On 05.08.19 15:19, Andrew White wrote:
Hey all,
I’m setting up a dev-7 (bd477f) server to test as per the other thread, however I’m getting the following loading my config:
ERROR: app_ruby [app_ruby_api.c:465]: sr_kemi_ruby_exec_func_ex(): invalid ruby environment attributes or parameters
I’m unsure what this error means - are there expected environment variables or other values that must be set? I didn’t see this issue in dev-4.
I thought it might be not able to find the library, but I ran with debug=4 and saw:
DEBUG: app_ruby [app_ruby_api.c:193]: ruby_sr_init_child(): test execution without error ERROR: app_ruby [app_ruby_api.c:107]: app_ruby_print_last_exception(): exception: undefined method `>' for false:FalseClass
I changed kamailio.cfg to load my generic routing script, and during the onreply_manage it runs:
scode = KSR::PV.get("$rs”)
This now returns false (which appears to be the second error above, I check if scode is > 599).
Has anything changed in the way ruby is loaded in dev-7? I’m using the same ruby/ruby-devel library versions on the same OS. I did this deploy the same with devel-4 a few weeks ago and this didn’t happen.
Thanks!
Andrew _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.com http://www.asipto.com/ www.twitter.com/miconda http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Henning Westerholt - https://skalatan.de/blog/ https://skalatan.de/blog/ Kamailio services - https://skalatan.de/services https://skalatan.de/services
-- Henning Westerholt - https://skalatan.de/blog/ https://skalatan.de/blog/ Kamailio services - https://skalatan.de/services https://skalatan.de/services
Hi,
are the other module names in lowercase or upper case? I am at ClueCon with limited resources to start up a ruby environment for testing.
I will look at the difference of the code between the two revisions and see if I can spot something quickly.
Meanwhile, if you make a pull request with the equivalent of the other routing scripts in misc/examples/kemi would be great ... I actually wanted to ask you do it at some point, but since you mentioned now, it's good to express my interest as well...
Cheers, Daniel
On 06.08.19 09:14, Andrew White wrote:
Hey Daniel,
They certainly seem to be, here’s a snippet:
{ "func": { "ret": "xval", "module": "pv", "name": "getw", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "gete", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvn", "params": "str, int" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvs", "params": "str, str" } }, { "func": { "ret": "bool", "module": "pv", "name": "seti", "params": "str, int" } }, { "func": { "ret": "bool", "module": "pv", "name": "sets", "params": "str, str" } },
I’ve just done a fresh deploy with the same playbook to a new instance, but using dev-4 (6d43eacd6d5b78fe857267e70b7fa85519a7d5b6) instead of dev-7 (bd477f5bb938a05efab76fb096cf5ac780d65c45) and it works perfectly, so it must be a change in between the two.
I was going to add in a ruby example config to https://github.com/kamailio/kamailio/tree/master/misc/examples/kemi a while ago, but I keep getting caught up with other things. Would it be helpful here for testing if I did this and put in a pull request? I’ll see if I can get that done tonight (I guess today EU time!)
Cheers,
Andrew
On 6 Aug 2019, at 2:27 am, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
Hello,
there was a change to use the core PV functions, not those implemented in app_ruby, so this might have broken something.
Can you run kamailio master branch with jsonrpcs module loaded and then execute:
kamctl rpc app_ruby.api_list
See if the PV functions are listed int the output.
Cheers, Daniel
On 05.08.19 15:19, Andrew White wrote:
Hey all,
I’m setting up a dev-7 (bd477f) server to test as per the other thread, however I’m getting the following loading my config:
ERROR: app_ruby [app_ruby_api.c:465]: sr_kemi_ruby_exec_func_ex(): invalid ruby environment attributes or parameters
I’m unsure what this error means - are there expected environment variables or other values that must be set? I didn’t see this issue in dev-4.
I thought it might be not able to find the library, but I ran with debug=4 and saw:
DEBUG: app_ruby [app_ruby_api.c:193]: ruby_sr_init_child(): test execution without error ERROR: app_ruby [app_ruby_api.c:107]: app_ruby_print_last_exception(): exception: undefined method `>' for false:FalseClass
I changed kamailio.cfg to load my generic routing script, and during the onreply_manage it runs:
scode = KSR::PV.get("$rs”)
This now returns false (which appears to be the second error above, I check if scode is > 599).
Has anything changed in the way ruby is loaded in dev-7? I’m using the same ruby/ruby-devel library versions on the same OS. I did this deploy the same with devel-4 a few weeks ago and this didn’t happen.
Thanks!
Andrew _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.com http://www.asipto.com www.twitter.com/miconda http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda
Try with latest master, I found an issue in handling the return of int values back to ruby, hopefully that fixes at least the KSR.pv.get("$rs").
Cheers, Daniel
On 06.08.19 16:17, Daniel-Constantin Mierla wrote:
Hi,
are the other module names in lowercase or upper case? I am at ClueCon with limited resources to start up a ruby environment for testing.
I will look at the difference of the code between the two revisions and see if I can spot something quickly.
Meanwhile, if you make a pull request with the equivalent of the other routing scripts in misc/examples/kemi would be great ... I actually wanted to ask you do it at some point, but since you mentioned now, it's good to express my interest as well...
Cheers, Daniel
On 06.08.19 09:14, Andrew White wrote:
Hey Daniel,
They certainly seem to be, here’s a snippet:
{ "func": { "ret": "xval", "module": "pv", "name": "getw", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "gete", "params": "str" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvn", "params": "str, int" } }, { "func": { "ret": "xval", "module": "pv", "name": "getvs", "params": "str, str" } }, { "func": { "ret": "bool", "module": "pv", "name": "seti", "params": "str, int" } }, { "func": { "ret": "bool", "module": "pv", "name": "sets", "params": "str, str" } },
I’ve just done a fresh deploy with the same playbook to a new instance, but using dev-4 (6d43eacd6d5b78fe857267e70b7fa85519a7d5b6) instead of dev-7 (bd477f5bb938a05efab76fb096cf5ac780d65c45) and it works perfectly, so it must be a change in between the two.
I was going to add in a ruby example config to https://github.com/kamailio/kamailio/tree/master/misc/examples/kemi a while ago, but I keep getting caught up with other things. Would it be helpful here for testing if I did this and put in a pull request? I’ll see if I can get that done tonight (I guess today EU time!)
Cheers,
Andrew
On 6 Aug 2019, at 2:27 am, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
Hello,
there was a change to use the core PV functions, not those implemented in app_ruby, so this might have broken something.
Can you run kamailio master branch with jsonrpcs module loaded and then execute:
kamctl rpc app_ruby.api_list
See if the PV functions are listed int the output.
Cheers, Daniel
On 05.08.19 15:19, Andrew White wrote:
Hey all,
I’m setting up a dev-7 (bd477f) server to test as per the other thread, however I’m getting the following loading my config:
ERROR: app_ruby [app_ruby_api.c:465]: sr_kemi_ruby_exec_func_ex(): invalid ruby environment attributes or parameters
I’m unsure what this error means - are there expected environment variables or other values that must be set? I didn’t see this issue in dev-4.
I thought it might be not able to find the library, but I ran with debug=4 and saw:
DEBUG: app_ruby [app_ruby_api.c:193]: ruby_sr_init_child(): test execution without error ERROR: app_ruby [app_ruby_api.c:107]: app_ruby_print_last_exception(): exception: undefined method `>' for false:FalseClass
I changed kamailio.cfg to load my generic routing script, and during the onreply_manage it runs:
scode = KSR::PV.get("$rs”)
This now returns false (which appears to be the second error above, I check if scode is > 599).
Has anything changed in the way ruby is loaded in dev-7? I’m using the same ruby/ruby-devel library versions on the same OS. I did this deploy the same with devel-4 a few weeks ago and this didn’t happen.
Thanks!
Andrew _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.com http://www.asipto.com www.twitter.com/miconda http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda