jain-sip
jain-sip copied to clipboard
IOException on UDP scenario
"But, every 3rd run I get the following issue. Could you take a look? There are other ERROR lines which I think are associated with this one.. Note, I am running SIPp with 2 concurrent calls, 10 calls max, 2CPS.
20:09:29,499 ERROR stderr - 71 java.io.IOException: Operation not permitted 20:09:29,499 DEBUG com.vendor.dialogic.javax.media.mscontrol.sip.DlgcSipB2BUA - 458 APP-ID-0 - *** LEAVING SCHEDULETASK() ** 20:09:29,499 DEBUG com.vendor.dialogic.javax.media.mscontrol.networkconnection.DlgcXSdpPortManagerStates - 421 Leaving Entering helperConnectLeg() 20:09:29,499 ERROR stderr - 71 at java.net.PlainDatagramSocketImpl.send(Native Method) 20:09:29,500 DEBUG com.vendor.dialogic.javax.media.mscontrol.fsm.DlgcFSM - 91 Leaving Condition{ DlgcXSdpPortManagerFM: event[evProcessSdpOffer(SDP)] ==> NextState:DlgcXIvrLegPendState)} 20:09:29,500 DEBUG com.vendor.dialogic.javax.media.mscontrol.networkconnection.DlgcNetworkConnectionProxy - 318 Exiting SdpPortManagerProxy::processSdpOfferAsync Task run() => Media Server 20:09:29,500 ERROR stderr - 71 at java.net.DatagramSocket.send(DatagramSocket.java:698) 20:09:29,501 ERROR stderr - 71 at gov.nist.javax.sip.stack.UDPMessageChannel.sendMessage(UDPMessageChannel.java:835) 20:09:29,501 ERROR stderr - 71 at gov.nist.javax.sip.stack.MessageChannel.sendMessage(MessageChannel.java:281) 20:09:29,502 ERROR stderr - 71 at gov.nist.javax.sip.stack.SIPTransactionImpl.sendMessage(SIPTransactionImpl.java:892) 20:09:29,502 ERROR stderr - 71 at gov.nist.javax.sip.stack.SIPClientTransactionImpl.sendMessage(SIPClientTransactionImpl.java:475) 20:09:29,503 ERROR stderr - 71 at gov.nist.javax.sip.stack.SIPClientTransactionImpl.sendRequest(SIPClientTransactionImpl.java:1062) 20:09:29,503 INFO gov.nist.javax.sip.stack.UDPMessageChannel - 236 Setting SIPMessage peerPacketSource to: /146.152.122.168:5060 20:09:29,503 ERROR stderr - 71 at org.mobicents.servlet.sip.message.SipServletRequestImpl.send(SipServletRequestImpl.java:1337) 20:09:29,504 ERROR stderr - 71 at org.mobicents.servlet.sip.message.SipServletRequestImpl.send(SipServletRequestImpl.java:1009)
"
There are two hypothesis to this behavior: 1- Thread concurrency as in http://stackoverflow.com/questions/28098386/plaindatagramsocketimpl-ioexception-operation-not-permitted 2- Traffic throttling done at sys level as in https://github.com/netty/netty/issues/1258
More evidence on pace throttling http://oosnmp.net/pipermail/snmp4j/2014-October/005433.html
jain-sip-ri-1.2.X-SNAPSHOT.jar.zip
This patch synchronizes the UDP sending, and uses an optional system property to provide basic throttling (use -DdatagramSocketThrottling=<milliSecond> to start java process).
Another hypothesis would be firewall issues as in http://www.bhyuu.com/linux-udp-socket-sendto-operation-not-permitted/
Can you check syslog for this trace (http://www.scriptscoop.net/t/62a8b22725d1/linux-udp-socket-sendto-operation-not-permitted.html)
"dropping packet"...
Roman confirmed that disabling firewall removed the issue
good investigation job @jaimecasero . We should start to create a new section in documentation http://docs.telestax.com/sip-servlets-homepage/ to log those common pitfalls, what do you think ?
thanks.
Well it doesnt hurt to have one more section with some links to Github, and a small description/solution.
I will add it to my TODO list
On Wed, Jan 20, 2016 at 9:01 AM, Jean Deruelle [email protected] wrote:
good investigation job @jaimecasero https://github.com/jaimecasero . We should start to create a new section in documentation http://docs.telestax.com/sip-servlets-homepage/ to log those common pitfalls, what do you think ?
— Reply to this email directly or view it on GitHub https://github.com/RestComm/jain-sip/issues/53#issuecomment-173122993.