Mediaproxy cannot write request to opensips mi_datagram socket

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

Mediaproxy cannot write request to opensips mi_datagram socket

Giuseppe Roberti-3
Hi.

I have configured opensips mi_datagram socket with mode 0666 on file
/tmp/opensips_socket.
But, when i simulate e relay error, media-dispatcher cannot write
(dlg_end_dlg ?) request to opensips.

Here the log:
Issuing "update" command to relay at 192.168.1.67
Issuing "update" command to relay at 192.168.1.67
mediaproxy.interfaces.opensips.UNIXSocketProtocol starting on
'/var/run/mediaproxy/opensips_01.sock'
cannot write request to '/tmp/opensips_socket': No such file or directory
failed to end dialog: Cannot send request to OpenSIPS
Got statistics: {'from_tag': '8be673d8b6e193c5o0', 'callee_packets':
{'audio': 732}, 'dialog_id': '1585:0', 'start_time': 1226754595.4300001,
'timed_out': True, 'caller_bytes': {'audio': 147600}, 'callee_bytes':
{'audio': 146292}, 'call_id': 'fcd18794-f13d3339@192.168.1.66',
'to_tag': 'as4f8875fd', 'streams': [{'status': 'closed', 'caller_codec':
'G711u', 'pdd': 3.2557408809699999, 'callee_codec': 'G711u',
'start_time': 0, 'caller_bytes': 146200, 'callee_bytes': 146200,
'callee_remote': '192.168.1.100:15946', 'caller_remote':
'192.168.1.66:16450', 'media_type': 'audio', 'callee_local':
'192.168.1.67:50014', 'timeout_wait': 0, 'caller_local':
'192.168.1.67:50012', 'end_time': 15}], 'caller_packets': {'audio':
741}, 'duration': 15, 'to_uri': '1000@192.168.1.67', 'from_uri':
'pap1@192.168.1.67', 'callee_ua': 'Asterisk PBX', 'caller_ua':
'Linksys/PAP2-3.1.22(LS)'}
Connection with relay at 192.168.1.67 was closed
Error processing request: Non-update command received from OpenSIPS for
unknown session

Here the config for mi_datagram:
loadmodule "mi_datagram.so"
modparam("mi_datagram", "socket_name", "/tmp/opensips_socket")
modparam("mi_datagram", "children_count", 23)
modparam("mi_datagram", "unix_socket_mode", 0666)

Here the config for media-dispatcher:
[OpenSIPS]
; Configure interaction between the media dispatcher and OpenSIPS
; Path to OpenSIPS' UNIX filesystem socket from the mi_datagram module.
socket_path = '/tmp/opensips_socket'
; Maximum number of connections to open with OpenSIPS' mi_datagram socket.
; Please note that connections will be opened on a need basis depending on
; load, but never more than the number configured below.
max_connections = 10

Here the socket:
srw-rw-rw- 1 root root 0 2008-11-15 14:17 /tmp/opensips_socket

Regards.

--
Giuseppe Roberti
<[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy cannot write request to opensips mi_datagram socket

Dan Pascu
On Saturday 15 November 2008, Giuseppe Roberti wrote:

> Hi.
>
> I have configured opensips mi_datagram socket with mode 0666 on file
> /tmp/opensips_socket.
> But, when i simulate e relay error, media-dispatcher cannot write
> (dlg_end_dlg ?) request to opensips.
>
> cannot write request to '/tmp/opensips_socket': No such file or
>
> Here the socket:
> srw-rw-rw- 1 root root 0 2008-11-15 14:17 /tmp/opensips_socket

It may be possible that the socket is not the one that belongs to the
dispatcher. For example if you run the dispatcher with --no-fork, so it
won't create a pid file, then while it is running you start another one
which will refuse to start because the control port is already in use, it
will still delete the old socket (connected to the 1st dispatcher) and
create a new one. While it may look like it is there, it's not the socket
from the 1st dispatcher, so it's not the socket you can use to talk to
it. It's just a dangling socket that is not connected to anything.

If you run the dispatcher as a daemon and it creates a pid file, then the
2nd instance will detect that and won't even attempt to start, so it
won't delete the 1st instance socket.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy cannot write request to opensips mi_datagram socket

Giuseppe Roberti-3
Dan Pascu wrote:

> On Saturday 15 November 2008, Giuseppe Roberti wrote:
>> Hi.
>>
>> I have configured opensips mi_datagram socket with mode 0666 on file
>> /tmp/opensips_socket.
>> But, when i simulate e relay error, media-dispatcher cannot write
>> (dlg_end_dlg ?) request to opensips.
>>
>> cannot write request to '/tmp/opensips_socket': No such file or
>>
>> Here the socket:
>> srw-rw-rw- 1 root root 0 2008-11-15 14:17 /tmp/opensips_socket
>
> It may be possible that the socket is not the one that belongs to the
> dispatcher. For example if you run the dispatcher with --no-fork, so it
> won't create a pid file, then while it is running you start another one
> which will refuse to start because the control port is already in use, it
> will still delete the old socket (connected to the 1st dispatcher) and
> create a new one. While it may look like it is there, it's not the socket
> from the 1st dispatcher, so it's not the socket you can use to talk to
> it. It's just a dangling socket that is not connected to anything.
>
> If you run the dispatcher as a daemon and it creates a pid file, then the
> 2nd instance will detect that and won't even attempt to start, so it
> won't delete the 1st instance socket.
>
None of that, i have found the error.

The dispatcher read the configuration parameter for opensips socket AS
IS, so i have to write the path without the apex.
Now that i have found this misconfiguration error i come with another error.
The setup is the same from my first email.
Here the log from dispatcher: http://rafb.net/p/j2U4YN96.html

Thanks for helping.

--
Giuseppe Roberti
<[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy cannot write request to opensips mi_datagram socket

Dan Pascu
On Friday 28 November 2008, Giuseppe Roberti wrote:
> None of that, i have found the error.
>
> The dispatcher read the configuration parameter for opensips socket AS
> IS, so i have to write the path without the apex.
> Now that i have found this misconfiguration error i come with another
> error. The setup is the same from my first email.
> Here the log from dispatcher: http://rafb.net/p/j2U4YN96.html
>
> Thanks for helping.

<quote>
cannot write request to /tmp/opensips_socket: Transport endpoint is not
connected
</quote>

That means that /tmp/opensips_socket exists, but none is listening on it.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy cannot write request to opensips mi_datagram socket

Giuseppe Roberti-3
Dan Pascu wrote:

> On Friday 28 November 2008, Giuseppe Roberti wrote:
>> None of that, i have found the error.
>>
>> The dispatcher read the configuration parameter for opensips socket AS
>> IS, so i have to write the path without the apex.
>> Now that i have found this misconfiguration error i come with another
>> error. The setup is the same from my first email.
>> Here the log from dispatcher: http://rafb.net/p/j2U4YN96.html
>>
>> Thanks for helping.
>
> <quote>
> cannot write request to /tmp/opensips_socket: Transport endpoint is not
> connected
> </quote>
>
> That means that /tmp/opensips_socket exists, but none is listening on it.
>
Yes but i know that opensips mi_datagram works.
So maybe it can be a problem of mediaproxy.
I have created a link for /tmp/opensips_socket (/tmp/opensips.sock)
because it is used by opensipsctl when in UNIXSOCK mode.
See the log below.

root@maje:/tmp# ls -l opensips*
prw-rw---- 1 root root  0 2008-11-28 13:18 opensips_fifo
lrwxrwxrwx 1 root root 15 2008-11-28 13:17 opensips.sock -> opensips_socket
srw-rw-rw- 1 root root  0 2008-11-28 13:18 opensips_socket
root@maje:/tmp# CTLENGINE=UNIXSOCK opensipsctl unixsock which
get_statistics
reset_statistics
uptime
version
pwd
arg
which
ps
kill
debug
list_blacklists
t_uac_dlg
t_uac_cancel
t_hash
t_reply
dlg_list
dlg_list_ctx
dlg_end_dlg
profile_get_size
profile_list_dlgs
ul_rm
ul_rm_contact
ul_dump
ul_flush
ul_add
ul_show_contact
sip_trace
nh_enable_ping
nh_enable_rtpp
nh_show_rtpp
root@maje:/tmp#

Regards.

--
Giuseppe Roberti
<[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy cannot write request to opensips mi_datagram socket

Dan Pascu
On Friday 28 November 2008, Giuseppe Roberti wrote:

> Dan Pascu wrote:
> > On Friday 28 November 2008, Giuseppe Roberti wrote:
> >> None of that, i have found the error.
> >>
> >> The dispatcher read the configuration parameter for opensips socket
> >> AS IS, so i have to write the path without the apex.
> >> Now that i have found this misconfiguration error i come with
> >> another error. The setup is the same from my first email.
> >> Here the log from dispatcher: http://rafb.net/p/j2U4YN96.html
> >>
> >> Thanks for helping.
> >
> > <quote>
> > cannot write request to /tmp/opensips_socket: Transport endpoint is
> > not connected
> > </quote>
> >
> > That means that /tmp/opensips_socket exists, but none is listening on
> > it.
>
> Yes but i know that opensips mi_datagram works.
> So maybe it can be a problem of mediaproxy.

It may be, of course, but that's not what the error message indicates.
Unfortunately with the provided information I cannot give you any more
suggestions and unless you tell me how to reproduce, I'm afraid that I
can't help you.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy cannot write request to opensips mi_datagram socket

Giuseppe Roberti-3
Dan Pascu wrote:

> On Friday 28 November 2008, Giuseppe Roberti wrote:
>> Dan Pascu wrote:
>>> On Friday 28 November 2008, Giuseppe Roberti wrote:
>>>> None of that, i have found the error.
>>>>
>>>> The dispatcher read the configuration parameter for opensips socket
>>>> AS IS, so i have to write the path without the apex.
>>>> Now that i have found this misconfiguration error i come with
>>>> another error. The setup is the same from my first email.
>>>> Here the log from dispatcher: http://rafb.net/p/j2U4YN96.html
>>>>
>>>> Thanks for helping.
>>> <quote>
>>> cannot write request to /tmp/opensips_socket: Transport endpoint is
>>> not connected
>>> </quote>
>>>
>>> That means that /tmp/opensips_socket exists, but none is listening on
>>> it.
>> Yes but i know that opensips mi_datagram works.
>> So maybe it can be a problem of mediaproxy.
>
> It may be, of course, but that's not what the error message indicates.
> Unfortunately with the provided information I cannot give you any more
> suggestions and unless you tell me how to reproduce, I'm afraid that I
> can't help you.
>

I'm just using a simple opensips as a proxy that relay the INVITEs to an
asterisk, engaging mediaproxy.
After started opensips and asterisk, start the dispatcher then the relay.
Now make a call to the number 1000, so asterisk will play demo
congratulations.
Everything works fine, the rtp go through mediaproxy.
Now, because i'm testing dialog termination of the dispatcher, while
this call is in progress, i kill the relay (so the dispatcher try to end
the dialog associated with every call owned by the media-relay that goes
down, correct me if i'm wrong) but this never happen because the
dispatcher get error.

--
Giuseppe Roberti
<[hidden email]>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy cannot write request to opensips mi_datagram socket

Dan Pascu
On Monday 01 December 2008, Giuseppe Roberti wrote:

> >> Yes but i know that opensips mi_datagram works.
> >> So maybe it can be a problem of mediaproxy.
> >
> > It may be, of course, but that's not what the error message
> > indicates. Unfortunately with the provided information I cannot give
> > you any more suggestions and unless you tell me how to reproduce, I'm
> > afraid that I can't help you.
>
> I'm just using a simple opensips as a proxy that relay the INVITEs to
> an asterisk, engaging mediaproxy.
> After started opensips and asterisk, start the dispatcher then the
> relay. Now make a call to the number 1000, so asterisk will play demo
> congratulations.
> Everything works fine, the rtp go through mediaproxy.
> Now, because i'm testing dialog termination of the dispatcher, while
> this call is in progress, i kill the relay (so the dispatcher try to
> end the dialog associated with every call owned by the media-relay that
> goes down, correct me if i'm wrong) but this never happen because the
> dispatcher get error.

As I said, the details you provide do not allow me to reproduce the error.
I tried all these and it works just fine for me. So it's either a subtle
bug triggered by your specific setup or you do something wrong. Either
way, I could not figure it out from your description.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy cannot write request to opensips mi_datagram socket

Giuseppe Roberti-3
Dan Pascu wrote:

> On Monday 01 December 2008, Giuseppe Roberti wrote:
>>>> Yes but i know that opensips mi_datagram works.
>>>> So maybe it can be a problem of mediaproxy.
>>> It may be, of course, but that's not what the error message
>>> indicates. Unfortunately with the provided information I cannot give
>>> you any more suggestions and unless you tell me how to reproduce, I'm
>>> afraid that I can't help you.
>> I'm just using a simple opensips as a proxy that relay the INVITEs to
>> an asterisk, engaging mediaproxy.
>> After started opensips and asterisk, start the dispatcher then the
>> relay. Now make a call to the number 1000, so asterisk will play demo
>> congratulations.
>> Everything works fine, the rtp go through mediaproxy.
>> Now, because i'm testing dialog termination of the dispatcher, while
>> this call is in progress, i kill the relay (so the dispatcher try to
>> end the dialog associated with every call owned by the media-relay that
>> goes down, correct me if i'm wrong) but this never happen because the
>> dispatcher get error.
>
> As I said, the details you provide do not allow me to reproduce the error.
> I tried all these and it works just fine for me. So it's either a subtle
> bug triggered by your specific setup or you do something wrong. Either
> way, I could not figure it out from your description.
>
Ok.
I will try to write more about my configuration.
But, what have to happen when media-relay goes ? Can media-dispatcher
trigger dlg_end_dlg() for the call that goes down with media-relay ?
Thanks.

--
Giuseppe Roberti
<[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy cannot write request to opensips mi_datagram socket

Dan Pascu
On Tuesday 02 December 2008, Giuseppe Roberti wrote:

> Dan Pascu wrote:
> > On Monday 01 December 2008, Giuseppe Roberti wrote:
> >>>> Yes but i know that opensips mi_datagram works.
> >>>> So maybe it can be a problem of mediaproxy.
> >>>
> >>> It may be, of course, but that's not what the error message
> >>> indicates. Unfortunately with the provided information I cannot
> >>> give you any more suggestions and unless you tell me how to
> >>> reproduce, I'm afraid that I can't help you.
> >>
> >> I'm just using a simple opensips as a proxy that relay the INVITEs
> >> to an asterisk, engaging mediaproxy.
> >> After started opensips and asterisk, start the dispatcher then the
> >> relay. Now make a call to the number 1000, so asterisk will play
> >> demo congratulations.
> >> Everything works fine, the rtp go through mediaproxy.
> >> Now, because i'm testing dialog termination of the dispatcher, while
> >> this call is in progress, i kill the relay (so the dispatcher try to
> >> end the dialog associated with every call owned by the media-relay
> >> that goes down, correct me if i'm wrong) but this never happen
> >> because the dispatcher get error.
> >
> > As I said, the details you provide do not allow me to reproduce the
> > error. I tried all these and it works just fine for me. So it's
> > either a subtle bug triggered by your specific setup or you do
> > something wrong. Either way, I could not figure it out from your
> > description.
>
> Ok.
> I will try to write more about my configuration.
> But, what have to happen when media-relay goes ? Can media-dispatcher
> trigger dlg_end_dlg() for the call that goes down with media-relay ?

Yes. The relay will report all current sessions as expired, which will
make the dispatcher trigger a dlg_end_dlg for each of them.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy cannot write request to opensips mi_datagram socket

Giuseppe Roberti-3
Dan Pascu wrote:

> On Tuesday 02 December 2008, Giuseppe Roberti wrote:
>> Dan Pascu wrote:
>>> On Monday 01 December 2008, Giuseppe Roberti wrote:
>>>>>> Yes but i know that opensips mi_datagram works.
>>>>>> So maybe it can be a problem of mediaproxy.
>>>>> It may be, of course, but that's not what the error message
>>>>> indicates. Unfortunately with the provided information I cannot
>>>>> give you any more suggestions and unless you tell me how to
>>>>> reproduce, I'm afraid that I can't help you.
>>>> I'm just using a simple opensips as a proxy that relay the INVITEs
>>>> to an asterisk, engaging mediaproxy.
>>>> After started opensips and asterisk, start the dispatcher then the
>>>> relay. Now make a call to the number 1000, so asterisk will play
>>>> demo congratulations.
>>>> Everything works fine, the rtp go through mediaproxy.
>>>> Now, because i'm testing dialog termination of the dispatcher, while
>>>> this call is in progress, i kill the relay (so the dispatcher try to
>>>> end the dialog associated with every call owned by the media-relay
>>>> that goes down, correct me if i'm wrong) but this never happen
>>>> because the dispatcher get error.
>>> As I said, the details you provide do not allow me to reproduce the
>>> error. I tried all these and it works just fine for me. So it's
>>> either a subtle bug triggered by your specific setup or you do
>>> something wrong. Either way, I could not figure it out from your
>>> description.
>> Ok.
>> I will try to write more about my configuration.
>> But, what have to happen when media-relay goes ? Can media-dispatcher
>> trigger dlg_end_dlg() for the call that goes down with media-relay ?
>
> Yes. The relay will report all current sessions as expired, which will
> make the dispatcher trigger a dlg_end_dlg for each of them.
>
And if the connection between media-relay end media-dispatcher is lost
but the relay goes on ?

--
Giuseppe Roberti
<[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy cannot write request to opensips mi_datagram socket

Dan Pascu
On Tuesday 02 December 2008, Giuseppe Roberti wrote:
> > Yes. The relay will report all current sessions as expired, which
> > will make the dispatcher trigger a dlg_end_dlg for each of them.
>
> And if the connection between media-relay end media-dispatcher is lost
> but the relay goes on ?

In that case nothing happens. When the dispatcher and the relay reconnect
the dispatcher will resync its state with the relay.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users