Reasons for invalid session

Can anyone give me reasons why openfire could show the warning: “Client provided invalid session” in the warning log ( besides the obvious event that a client provides an invalid session). seems openfire drops my session somewhere along the way, while i keep sending requests, but cant figure out why.

anyone ? , found similar problems in http://www.igniterealtime.org/community/message/142548#142548 , perhaps im doing something that causes openfire to view the sid invalid. I am polling the server with empty packets to keep the connection alive though.

Hi Azul,

are you getting these errors using “normal XMPP connection” or over BOSH?

br,

tuomas

hey, thx for the reply

im using bosh, to specify: im making a httpbinding chatclient in java ( old java: its for digital television ).

, azul

Hi,

im using bosh, to specify: im making a httpbinding chatclient in java ( old java: its for digital television ).
OK. What I recall, the default idle session time for HTTP binds is only 30 seconds. So if you are not sending any stanzas to Openfire during the 30 second lifetime, your HTTP session is removed and SID becomes invalid. After you need to negociate a new SID (since you need a new session ).

You can change the default session idle time with system property “xmpp.httpbind.client.idle”. Value of the property is in seconds.

hey,

I’m aware of that system property, i havent set it, but since my poller sends empty packages every 2 seconds that shouldnt be the problem. Do you know any other reasons why the session could be dropped or the sid can become invalid.

,azul.

I’m aware of that system property, i havent set it, but since my poller sends empty packages every 2 seconds that shouldnt be the problem. Do you know any other reasons why the session could be dropped or the sid can become invalid.

Hi,

I’m remembergin that the system will also kick you out if you send stanzas too often. I think the default “minimum time time when next message can be send or be kicked out” was 5 seconds. So if polling stanza is send by user more often than this, system will kick the user out.

If I remember right (i’m sorry but i have to trust me memory now only) it can be set using “xmpp.httpbind.client.requests.polling” to shorter/higher. I would recommend you to set the polling phase first in your client to for example 15 seconds and see if it will do any difference.

Also if you send erroneus stanzas to the server, it will kick you out.

br,

tuomas

hey,

yes im aware of the polling attribute aswell, its currently set to 0. :wink:

so that shouldnt be a problem … , anything else i mightve missed ?

,azul

OK

You have seemed to have checked everythign. Also maxRequests? (xmpp.httpbind.client.requests.max) ?

Are you being kicked out all the time or only after some specific stanza?

hey,

yup, checked that aswell. No it appears to be entirely random, i always get it but sometimes it takes awhile, sometimes immediatly, sometimes when polling sometimes when sending something.

OK,

can you verify that the Session ID stayes the same? I think i start to sound despred

I also recommend that you ran the OF in debug mode and see if it tells you the reason why the user is kicked out.

pics or it didnt happen …

yea no, i print every package i send before i send it, session id doesnt change like i stated in the first post and

the debug log always shows jetty pending continuously on a request after the errors occur

,max

hey,

if anyone ever has similar problems I’ll post the mistake i made,

when connecting to openfire, when sending a packet, the code i

was using still contained a

con.setRequestProperty(

“Connection”, “close”);

con here being my httpurlconnection, somehow openfire makes a timeout

of one of the packets and because of this drops my session. I can only guess at

this: perhaps openfire still needs the connection i made, but closed, tries to look for it to

no avail and after awhile of failing just gives a timeout and drops the session ?

Hi, I’m having this same connection problem with Openfire/JWchat and from a little googling, it seems a lot of people are having this same problem but didn’t get solved.

http://www.google.com/search?hl=en&q=+site:www.igniterealtime.org+"Client+prov ided+invalid+session%22

http://code.google.com/p/jabber-net/issues/detail?id=25

http://code.google.com/p/emite/issues/detail?id=6

Is this an Openfire bug? I recently switched from ejabberd (really disgusted by Erlang) and it didn’t have this connection problem.

David

Anybody on this thread wish to report their current success with httpbind and openfire?

daryl

Anybody solved this problem in your solution? I have the same problem with Openfire + JsJaC on FF only…

thks,

Gregory

Anyone?

I found i fixed this when my server name (in server properties) didn’t match the host name the client was connecting with.