Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-06-03 Thread Bogdan-Andrei Iancu

Please keep the list CC'ed to the discussion.

Thanks for the info, it seems to be an OpenSIPS bug - the anycast token 
is missing in the locally generated requests (like this OPTIONS). Could 
you open a bug report on the github tracker please ?


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/

On 06/03/2019 02:02 PM, Антон Ершов wrote:

Hi Bogdan,
node1 send

2019/06/03 16:01:17.484626 10.50.0.1:5060  -> 
10.7.0.201:5070 

OPTIONS sip:10.7.0.201:5070  SIP/2.0
Via: SIP/2.0/UDP 10.50.0.1:5060;branch=z9hG4bK119b.69e9c536.0
To: sip:10.7.0.201:5070 
From: >;tag=7f64a078bf34d12f31433ecf357bd91b-968b

CSeq: 10 OPTIONS
Call-ID: 0fa7a2ed14e0d2fe-14840@10.50.0.1 


Max-Forwards: 70
Content-Length: 0
User-Agent: OpenSIPS (3.0.0 (x86_64/linux))

and does not receive an answer as it goes to the second node

node 2 send and receive answer

2019/06/03 16:01:26.320354 10.50.0.1:5060  -> 
10.7.0.201:5070 

OPTIONS sip:10.7.0.201:5070  SIP/2.0
Via: SIP/2.0/UDP 10.50.0.1:5060;branch=z9hG4bK894b.277e074.0
To: sip:10.7.0.201:5070 
From: >;tag=7f64a078bf34d12f31433ecf357bd91b-9e0e

CSeq: 10 OPTIONS
Call-ID: 73aebff26b2035c7-17475@10.50.0.1 


Max-Forwards: 70
Content-Length: 0
User-Agent: OpenSIPS (3.0.0 (x86_64/linux))


2019/06/03 15:52:26.490325 10.7.0.201:5070  -> 
10.50.0.1:5060 

SIP/2.0 200 OK
Via: SIP/2.0/UDP 
10.50.0.1:5060;rport=5060;received=10.50.0.1;branch=z9hG4bK894b.277e074.0
Call-ID: 73aebff26b2035c7-17475@10.50.0.1 

From: >;tag=7f64a078bf34d12f31433ecf357bd91b-9e0e

To: ;tag=z9hG4bK894b.277e074.0
CSeq: 10 OPTIONS
Accept: application/dialog-info+xml, application/xpidf+xml, 
application/cpim-pidf+xml, application/simple-message-summary, 
application/pidf+xml, application/pidf+xml, 
application/dialog-info+xml, application/simple-message-summary, 
application/sdp, message/sipfrag;version=2.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, 
BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER

Supported: 100rel, timer, replaces, norefersub
Accept-Encoding: text/plain
Accept-Language: en
Server: Asterisk PBX 16.1.0
Content-Length:  0

my config node 1

loadmodule "load_balancer.so"
modparam("load_balancer", "db_url", 
 "postgres://postgres:1q2w3e4r@10.3.0.1/opensips2 
")

modparam("load_balancer", "probing_reply_codes", "501, 503, 403, 404")
modparam("load_balancer", "cluster_id", 1)
modparam("load_balancer", "cluster_sharing_tag", "node_SKN")
modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1 
")

modparam("load_balancer", "probing_verbose", 1)

and node 2

loadmodule "load_balancer.so"
modparam("load_balancer", "db_url", 
 "postgres://postgres:1q2w3e4r@10.3.0.1/opensips2 
")

modparam("load_balancer", "probing_reply_codes", "501, 503, 403, 404")
modparam("load_balancer", "cluster_id", 1)
modparam("load_balancer", "cluster_sharing_tag", "node_PRM")
modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1 
")

modparam("load_balancer", "probing_verbose", 1)


maybe I misunderstood how it should work?



пн, 3 июн. 2019 г. в 10:53, Bogdan-Andrei Iancu >:


Hi Anton,

That is an interesting combination - pinging via an anycast
interface.

Could you paste here the OPTIONS and its reply, to check if it is
correctly built from the anycast perspective ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Summit 2019
   https://www.opensips.org/events/Summit-2019Amsterdam/

On 05/27/2019 03:16 PM, Антон Ершов wrote:


Hello friends!

I'm testing new features of opensips 3. And I discovered the
following situation.

Configured cluster module in Anycast Сonfiguration. Load balanser
module

has cluster_sharing_tag. The lb module sends "options" to the
host from the common address, but the answer goes to the nearest
opensips node of the cluster. From what the remote host in lb is
considered inaccessible.

Something is not configured or I did not understand correctly how
the load balanser should work in a cluster



___
Users mailing list
Users@lists.opensips.org 

Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-06-03 Thread Bogdan-Andrei Iancu

Hi Anton,

That is an interesting combination - pinging via an anycast interface.

Could you paste here the OPTIONS and its reply, to check if it is 
correctly built from the anycast perspective ?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/

On 05/27/2019 03:16 PM, Антон Ершов wrote:


Hello friends!

I'm testing new features of opensips 3. And I discovered the following 
situation.


Configured cluster module in Anycast Сonfiguration. Load balanser module

has cluster_sharing_tag. The lb module sends "options" to the host 
from the common address, but the answer goes to the nearest opensips 
node of the cluster. From what the remote host in lb is considered 
inaccessible.


Something is not configured or I did not understand correctly how the 
load balanser should work in a cluster




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-05-28 Thread Kirill Galinurov
Hi Anton. You must correctly set
 cluster_sharing_tag (string)
parameter in you config file.
Please see

https://opensips.org/html/docs/modules/3.0.x/load_balancer.html#param_cluster_sharing_tag
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-05-28 Thread Антон Ершов
opensips-cli -x mi lb_list
{
"Destinations": [
{
"uri": "sip:10.7.0.201:5070",
"id": 1,
"group": 1,
"enabled": "yes",
"auto-reenable": "on"
}
],
"Resources": [
{
"name": "PSTN",
"max": 1,
"load": 0
}
]
}

but when i do call lb return retcode *-3 (false)* - no destinations
available (the requested resources did not match any active destination)

вт, 28 мая 2019 г. в 11:02, Антон Ершов :

> node 1
> loadmodule "load_balancer.so"
> modparam("load_balancer", "db_url",  "postgres://
> postgres:1q2w3e4r@10.3.0.1/opensips1")
> modparam("load_balancer", "probing_reply_codes", "501, 503, 403")
> modparam("load_balancer", "cluster_id", 1)
> modparam("load_balancer", "cluster_sharing_tag", "node_SKN")
> modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1")
> modparam ("load_balancer", "probing_verbose", 1)
>
> node2
> loadmodule "load_balancer.so"
> modparam("load_balancer", "db_url",  "postgres://
> postgres:1q2w3e4r@10.3.0.1/opensips1")
> modparam("load_balancer", "probing_reply_codes", "501, 503, 403")
> modparam("load_balancer", "cluster_id", 1)
> modparam("load_balancer", "cluster_sharing_tag", "node_PRM")
> modparam ("load_balancer", "probing_verbose", 1)
> modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1")
>
> options send both node. only one node receives answer. In log i see what
> one node disable destination, second node re-enable destination.
>
> log node1
> INFO:load_balancer:set_dst_state_from_rplcode: disable destination 1  10.7.0.201:5070> after 408 reply on probe
>
> log node 2
> INFO:load_balancer:set_dst_state_from_rplcode: re-enable destination 1
>  after 200 reply on probe
>
> вт, 28 мая 2019 г. в 08:53, Alexey Kazantsev via Users <
> users@lists.opensips.org>:
>
>> Hello Anton,
>>
>> you'd better show here the load_balancer part of your config,
>> as it has some parameters regarding to working in the cluster.
>>
>>
>> Понедельник, 27 мая 2019, 17:17 +05:00 от Антон Ершов <
>> suhari...@gmail.com>:
>>
>> Hello friends!
>>
>>  I'm testing new features of opensips 3. And I discovered the following 
>> situation.
>>
>> Configured cluster module in Anycast Сonfiguration. Load balanser module
>>
>> has cluster_sharing_tag. The lb module sends "options" to the host from the 
>> common address, but the answer goes to the nearest opensips node of the 
>> cluster. From what the remote host in lb is considered inaccessible.
>>
>> Something is not configured or I did not understand correctly how the load 
>> balanser should work in a cluster
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> ---
>> BR, Alexey
>> http://alexeyka.zantsev.com/
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-05-28 Thread Антон Ершов
node 1
loadmodule "load_balancer.so"
modparam("load_balancer", "db_url",  "postgres://
postgres:1q2w3e4r@10.3.0.1/opensips1")
modparam("load_balancer", "probing_reply_codes", "501, 503, 403")
modparam("load_balancer", "cluster_id", 1)
modparam("load_balancer", "cluster_sharing_tag", "node_SKN")
modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1")
modparam ("load_balancer", "probing_verbose", 1)

node2
loadmodule "load_balancer.so"
modparam("load_balancer", "db_url",  "postgres://
postgres:1q2w3e4r@10.3.0.1/opensips1")
modparam("load_balancer", "probing_reply_codes", "501, 503, 403")
modparam("load_balancer", "cluster_id", 1)
modparam("load_balancer", "cluster_sharing_tag", "node_PRM")
modparam ("load_balancer", "probing_verbose", 1)
modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1")

options send both node. only one node receives answer. In log i see what
one node disable destination, second node re-enable destination.

log node1
INFO:load_balancer:set_dst_state_from_rplcode: disable destination 1  after 408 reply on probe

log node 2
INFO:load_balancer:set_dst_state_from_rplcode: re-enable destination 1  after 200 reply on probe

вт, 28 мая 2019 г. в 08:53, Alexey Kazantsev via Users <
users@lists.opensips.org>:

> Hello Anton,
>
> you'd better show here the load_balancer part of your config,
> as it has some parameters regarding to working in the cluster.
>
>
> Понедельник, 27 мая 2019, 17:17 +05:00 от Антон Ершов  >:
>
> Hello friends!
>
>  I'm testing new features of opensips 3. And I discovered the following 
> situation.
>
> Configured cluster module in Anycast Сonfiguration. Load balanser module
>
> has cluster_sharing_tag. The lb module sends "options" to the host from the 
> common address, but the answer goes to the nearest opensips node of the 
> cluster. From what the remote host in lb is considered inaccessible.
>
> Something is not configured or I did not understand correctly how the load 
> balanser should work in a cluster
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ---
> BR, Alexey
> http://alexeyka.zantsev.com/
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-05-27 Thread Alexey Kazantsev via Users
Hello Anton,

you'd better show here the load_balancer part of your config,
as it has some parameters regarding to working in the cluster.


>Понедельник, 27 мая 2019, 17:17 +05:00 от Антон Ершов :
>
>Hello friends!
> I'm testing new features of opensips 3. And I discovered the following 
> situation.
>Configured cluster module in Anycast Сonfiguration. Load balanser module
>has cluster_sharing_tag. The lb module sends "options" to the host from the 
>common address, but the answer goes to the nearest opensips node of the 
>cluster. From what the remote host in lb is considered inaccessible.
>Something is not configured or I did not understand correctly how the load 
>balanser should work in a cluster
>___
>Users mailing list
>Users@lists.opensips.org
>http://lists.opensips.org/cgi-bin/mailman/listinfo/users


---
BR, Alexey
http://alexeyka.zantsev.com/
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-05-27 Thread Антон Ершов
Hello friends!

 I'm testing new features of opensips 3. And I discovered the
following situation.

Configured cluster module in Anycast Сonfiguration. Load balanser module

has cluster_sharing_tag. The lb module sends "options" to the host
from the common address, but the answer goes to the nearest opensips
node of the cluster. From what the remote host in lb is considered
inaccessible.

Something is not configured or I did not understand correctly how the
load balanser should work in a cluster
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users