[sip-comm-dev] Missing a required header : Max-Forwards


#1

Hi devs,

I've been getting the following exception every 30 seconds throughout
the day, it's the first time I see it with my set of accounts. As it
instructs, I'mr reporting it to the dev mailing list.

Regards,
Lyubomir

10:35:40.417 SEVERE:
impl.protocol.sip.SipStackSharing.processRequest().570 couldn't create
transaction, please report this to dev@sip-communicator.dev.java.net
javax.sip.TransactionUnavailableException: Missing a required header :
Max-Forwards
        at
gov.nist.javax.sip.SipProviderImpl.getNewServerTransaction(SipProviderImpl.java:463)
        at
net.java.sip.communicator.impl.protocol.sip.SipStackSharing.processRequest(SipStackSharing.java:554)
        at
gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:227)
        at
gov.nist.javax.sip.SipProviderImpl.handleEvent(SipProviderImpl.java:193)
        at
gov.nist.javax.sip.DialogFilter.processRequest(DialogFilter.java:1301)
        at
gov.nist.javax.sip.stack.SIPServerTransaction.processRequest(SIPServerTransaction.java:844)
        at
gov.nist.javax.sip.stack.UDPMessageChannel.processMessage(UDPMessageChannel.java:530)
        at
gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:487)
        at
gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:295)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.text.ParseException: Missing a required header :
Max-Forwards
        at
gov.nist.javax.sip.message.SIPRequest.checkHeaders(SIPRequest.java:272)
        at
gov.nist.javax.sip.SipProviderImpl.getNewServerTransaction(SipProviderImpl.java:461)
        ... 9 more
10:35:40.422 SEVERE:
impl.protocol.sip.SipStackSharing.logApplicationException().971 An error
occurred while processing event of type: javax.sip.DialogTerminatedEvent
java.lang.NullPointerException
        at
net.java.sip.communicator.impl.protocol.sip.SipStackSharing.getServiceData(SipStackSharing.java:931)
        at
net.java.sip.communicator.impl.protocol.sip.SipStackSharing.processRequest(SipStackSharing.java:577)
        at
gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:227)
        at
gov.nist.javax.sip.SipProviderImpl.handleEvent(SipProviderImpl.java:193)
        at
gov.nist.javax.sip.DialogFilter.processRequest(DialogFilter.java:1301)
        at
gov.nist.javax.sip.stack.SIPServerTransaction.processRequest(SIPServerTransaction.java:844)
        at
gov.nist.javax.sip.stack.UDPMessageChannel.processMessage(UDPMessageChannel.java:530)
        at
gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:487)
        at
gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:295)
        at java.lang.Thread.run(Thread.java:662)

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hey Lyubomir,

На 08.11.10 18:47, Lyubomir Marinov написа:

Hi devs,

I've been getting the following exception every 30 seconds throughout
the day, it's the first time I see it with my set of accounts. As it
instructs, I'mr reporting it to the dev mailing list.

Have you added a new SIP server lately? The exceptions are probably
caused by NAT keep-alives.

Maybe we should drop down the log level to DEBUG here.

WDYT?

Emil

···

Regards,
Lyubomir

10:35:40.417 SEVERE:
impl.protocol.sip.SipStackSharing.processRequest().570 couldn't create
transaction, please report this to dev@sip-communicator.dev.java.net
javax.sip.TransactionUnavailableException: Missing a required header :
Max-Forwards
        at
gov.nist.javax.sip.SipProviderImpl.getNewServerTransaction(SipProviderImpl.java:463)
        at
net.java.sip.communicator.impl.protocol.sip.SipStackSharing.processRequest(SipStackSharing.java:554)
        at
gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:227)
        at
gov.nist.javax.sip.SipProviderImpl.handleEvent(SipProviderImpl.java:193)
        at
gov.nist.javax.sip.DialogFilter.processRequest(DialogFilter.java:1301)
        at
gov.nist.javax.sip.stack.SIPServerTransaction.processRequest(SIPServerTransaction.java:844)
        at
gov.nist.javax.sip.stack.UDPMessageChannel.processMessage(UDPMessageChannel.java:530)
        at
gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:487)
        at
gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:295)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.text.ParseException: Missing a required header :
Max-Forwards
        at
gov.nist.javax.sip.message.SIPRequest.checkHeaders(SIPRequest.java:272)
        at
gov.nist.javax.sip.SipProviderImpl.getNewServerTransaction(SipProviderImpl.java:461)
        ... 9 more
10:35:40.422 SEVERE:
impl.protocol.sip.SipStackSharing.logApplicationException().971 An error
occurred while processing event of type: javax.sip.DialogTerminatedEvent
java.lang.NullPointerException
        at
net.java.sip.communicator.impl.protocol.sip.SipStackSharing.getServiceData(SipStackSharing.java:931)
        at
net.java.sip.communicator.impl.protocol.sip.SipStackSharing.processRequest(SipStackSharing.java:577)
        at
gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:227)
        at
gov.nist.javax.sip.SipProviderImpl.handleEvent(SipProviderImpl.java:193)
        at
gov.nist.javax.sip.DialogFilter.processRequest(DialogFilter.java:1301)
        at
gov.nist.javax.sip.stack.SIPServerTransaction.processRequest(SIPServerTransaction.java:844)
        at
gov.nist.javax.sip.stack.UDPMessageChannel.processMessage(UDPMessageChannel.java:530)
        at
gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:487)
        at
gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:295)
        at java.lang.Thread.run(Thread.java:662)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
SIP Communicator
emcho@sip-communicator.org PHONE: +33.1.77.62.43.30
http://sip-communicator.org FAX: +33.1.77.62.47.31

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

> I've been getting the following exception every 30 seconds throughout
> the day, it's the first time I see it with my set of accounts. As it
> instructs, I'mr reporting it to the dev mailing list.

Have you added a new SIP server lately? The exceptions are probably
caused by NAT keep-alives.

No, I'm using the same voipgw.u-strasbg.fr and ippi.fr that I've been
using for... a long time.

Maybe we should drop down the log level to DEBUG here.

WDYT?

I don't have an opinion. What bothered me was that I was using the same
old accounts and the exception started appearing today.

···

On Mon, 2010-11-08 at 18:51 +0100, Emil Ivov wrote:

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

I get the exact same thing, with only my sip account added. and i
didn't modify anything related to sip protocol in my copy.

···

On Mon, Nov 8, 2010 at 11:31 PM, Lyubomir Marinov <lubo@sip-communicator.org> wrote:

On Mon, 2010-11-08 at 18:51 +0100, Emil Ivov wrote:

> I've been getting the following exception every 30 seconds throughout
> the day, it's the first time I see it with my set of accounts. As it
> instructs, I'mr reporting it to the dev mailing list.

Have you added a new SIP server lately? The exceptions are probably
caused by NAT keep-alives.

No, I'm using the same voipgw.u-strasbg.fr and ippi.fr that I've been
using for... a long time.

Maybe we should drop down the log level to DEBUG here.

WDYT?

I don't have an opinion. What bothered me was that I was using the same
old accounts and the exception started appearing today.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
Amila Manoj

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

JAIN-SIP is seeing a request with Max-Forwards missing. Since that is
a required header, it is throwing exception when you go to create the
server transaction.

Ranga

···

On Mon, Nov 8, 2010 at 2:33 PM, Amila Manoj Silva <amilamanoj@gmail.com> wrote:

I get the exact same thing, with only my sip account added. and i
didn't modify anything related to sip protocol in my copy.

On Mon, Nov 8, 2010 at 11:31 PM, Lyubomir Marinov > <lubo@sip-communicator.org> wrote:

On Mon, 2010-11-08 at 18:51 +0100, Emil Ivov wrote:

> I've been getting the following exception every 30 seconds throughout
> the day, it's the first time I see it with my set of accounts. As it
> instructs, I'mr reporting it to the dev mailing list.

Have you added a new SIP server lately? The exceptions are probably
caused by NAT keep-alives.

No, I'm using the same voipgw.u-strasbg.fr and ippi.fr that I've been
using for... a long time.

Maybe we should drop down the log level to DEBUG here.

WDYT?

I don't have an opinion. What bothered me was that I was using the same
old accounts and the exception started appearing today.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
Amila Manoj

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
M. Ranganathan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#6

JAIN-SIP is seeing a request with Max-Forwards missing. Since that is
a required header, it is throwing exception when you go to create the
server transaction.

In my case, the problem is an OPTIONS request the server send to me
every time I do a REGISTER (as a keep-alive).

My question is, though, do we absolutely have to validate that the
Max-Forwards header is present is every request? I skimmed through RFC
3261 looking for OPTIONS, Max-Forwards and I saw that UACs MUST put it
in their requests. However, the request validation which MUST be
performed by proxies states "If the request does not contain a
Max-Forwards header field, this check is passed." Since the RFC
describes that "Max-Forwards serves to limit the number of hops a
request can make on the way to its destination", we are the
destination and I haven't been able to find a description of a request
validation for our role, it really doesn't sound to me that we
absolutely have to throw the exception in question.

Try to get whatever is sending that OPTIONS to you to fix the problem
before hacking on JAIN-SIP to remove the Exception. If you remove the
Max-Forwards check then endless looping can and will occur.

I'll (reluctantly) go along with a solution that inserts a default
Max-forwards into the request before passing it up to the application
but do try to get the offending UAC to fix the problem.

Regards,

Ranga

···

On Mon, Nov 8, 2010 at 5:03 PM, Lyubomir Marinov <lubo@sip-communicator.org> wrote:

On Mon, Nov 8, 2010 at 9:48 PM, M. Ranganathan <mranga@gmail.com> wrote:

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
M. Ranganathan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#7

Hey Ranga,

На 08.11.10 23:22, M. Ranganathan написа:

Try to get whatever is sending that OPTIONS to you to fix the problem
before hacking on JAIN-SIP to remove the Exception. If you remove the
Max-Forwards check then endless looping can and will occur.

I'll (reluctantly) go along with a solution that inserts a default
Max-forwards into the request before passing it up to the application

Hmm ... it would probably make more sense to do this in the application
(i.e. add a default Max-Forwards before we create the transaction). We
are already doing this for the MWI NOTIFY requests that Asterisk sends
and besides, at the application layer, we do know that we won't be
running in an endless loop since we are not proxy-ing anything.

but do try to get the offending UAC to fix the problem.

Oh well ... :). This is * we are talking about so I am thinking we'd be
better off fixing it on our side :).

Emil

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#8

In my case, the problem is an OPTIONS request the server send to me
every time I do a REGISTER (as a keep-alive).

My question is, though, do we absolutely have to validate that the
Max-Forwards header is present is every request? I skimmed through RFC
3261 looking for OPTIONS, Max-Forwards and I saw that UACs MUST put it
in their requests. However, the request validation which MUST be
performed by proxies states "If the request does not contain a
Max-Forwards header field, this check is passed." Since the RFC
describes that "Max-Forwards serves to limit the number of hops a
request can make on the way to its destination", we are the
destination and I haven't been able to find a description of a request
validation for our role, it really doesn't sound to me that we
absolutely have to throw the exception in question.

···

On Mon, Nov 8, 2010 at 9:48 PM, M. Ranganathan <mranga@gmail.com> wrote:

JAIN-SIP is seeing a request with Max-Forwards missing. Since that is
a required header, it is throwing exception when you go to create the
server transaction.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net