I apologize for posting yet another attach / openfire question, but I did read all of the other ones on the group, and I'll do my best to provide the necessary logs. I have confirmed that RID incrementing is not the issue!
If I manually (using Firebug + Firefox 13.0.1) pause(); the connection, wait until the current outstanding poll returns (< 30 secs), and then refresh the page - then attach works. RID is correctly sequential, incoming chats arrived, beautiful.
However, if I refresh the page (my window onunload handler pauses() the connection, but the browser necessarily kills the open http connection), the attach always fails with a "404 Invalid SID". The OpenFire logs are less than helpful: org.jivesoftware.openfire.http.HttpBindServlet - Client provided invalid session: 2906e09b. [4.30.25.205]
I am *not* using Punjab (I have an Apache reverse proxy to talk to my OpenFire server). Is there any way to gracefully detach Strophe on page unload? Is there any way to configure OpenFire to not kill my SID when http connection is aborted? What are other people doing in this situation?
Thanks! Logs follow: (Note that I'm using the aborted RID as the first request RID after refresh - I have tried using the sequential next RID instead, but it also gives a 404 error). Firebug shows "NetworkError: 404 Invalid SID. - https://tt-acd03.onstate.net/ChatProxyBOSH/http-bind/"
After refresh: Attempting Strophe connection with saved jid: ceu...@onstate.net/eb543d59 sid: eb543d59 rid: 3570631096 Strophe is attaching... Strophe is attached. SEND: <body rid='3570631096' xmlns='http://jabber.org/protocol/httpbind' sid='eb543d59'/> RECV: <body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='item-not-found'/> Strophe failed to connect. Strophe is disconnecting. LOG: Disconnect was called because: undefined LOG: _sendTerminate was called LOG: _throttledRequestHandler called with 1 requests LOG: request id 2.0 posting LOG: request id 2.0 state changed to 1 LOG: request id 2.0 state changed to 1 SEND: <body rid='3570631097' xmlns='http://jabber.org/protocol/httpbind' sid='eb543d59' type='terminate'><presence xmlns='jabber:client' type='unavailable'/></body> LOG: request id 2.1 state changed to 2 LOG: request id 2.1 state changed to 3 LOG: request id 2.1 state changed to 3 LOG: request id 2.1 state changed to 4 LOG: request errored, status: 404, number of errors: 1 LOG: _onDisconnectTimeout was called LOG: _doDisconnect was called Strophe is disconnected. Re-connecting.
If I use the next sequential RID instead (outstanding poll at refresh time was 2914479752): Attempting Strophe connection with saved jid: ceu...@onstate.net/246f5dd7 sid: 246f5dd7 rid: 2914479753 Strophe is attaching... Strophe is attached. SEND: <body rid='2914479753' xmlns='http://jabber.org/protocol/httpbind' sid='246f5dd7'/> LOG: request id 1.1 error 404 happened LOG: request errored, status: 404, number of errors: 1 Strophe is disconnecting. LOG: _doDisconnect was called Strophe is disconnected. Re-connecting.
Sorry to bump, but I saw Jack M. made a round of the forums and skipped my question. Any chance I can get an answer for this? We are on the brink of dropping Strophe altogether for this project.
On Thursday, June 28, 2012 11:50:43 AM UTC-7, nkeeney wrote:
> I apologize for posting yet another attach / openfire question, but I did > read all of the other ones on the group, and I'll do my best to provide the > necessary logs. I have confirmed that RID incrementing is not the issue!
> If I manually (using Firebug + Firefox 13.0.1) pause(); the connection, > wait until the current outstanding poll returns (< 30 secs), and then > refresh the page - then attach works. RID is correctly sequential, incoming > chats arrived, beautiful.
> However, if I refresh the page (my window onunload handler pauses() the > connection, but the browser necessarily kills the open http connection), > the attach always fails with a "404 Invalid SID". The OpenFire logs are > less than helpful: > org.jivesoftware.openfire.http.HttpBindServlet - Client provided invalid > session: 2906e09b. [4.30.25.205]
> I am *not* using Punjab (I have an Apache reverse proxy to talk to my > OpenFire server). Is there any way to gracefully detach Strophe on page > unload? Is there any way to configure OpenFire to not kill my SID when http > connection is aborted? What are other people doing in this situation?
> Thanks! Logs follow: (Note that I'm using the aborted RID as the first > request RID after refresh - I have tried using the sequential next RID > instead, but it also gives a 404 error). Firebug shows "NetworkError: 404 > Invalid SID. - https://tt-acd03.onstate.net/ChatProxyBOSH/http-bind/"
> After refresh: > Attempting Strophe connection with saved jid: ceu...@onstate.net/eb543d59sid: eb543d59 rid: 3570631096 > Strophe is attaching... > Strophe is attached. > SEND: <body rid='3570631096' xmlns='http://jabber.org/protocol/httpbind' > sid='eb543d59'/> > RECV: <body xmlns='http://jabber.org/protocol/httpbind' type='terminate' > condition='item-not-found'/> > Strophe failed to connect. > Strophe is disconnecting. > LOG: Disconnect was called because: undefined > LOG: _sendTerminate was called > LOG: _throttledRequestHandler called with 1 requests > LOG: request id 2.0 posting > LOG: request id 2.0 state changed to 1 > LOG: request id 2.0 state changed to 1 > SEND: <body rid='3570631097' xmlns='http://jabber.org/protocol/httpbind' > sid='eb543d59' type='terminate'><presence xmlns='jabber:client' > type='unavailable'/></body> > LOG: request id 2.1 state changed to 2 > LOG: request id 2.1 state changed to 3 > LOG: request id 2.1 state changed to 3 > LOG: request id 2.1 state changed to 4 > LOG: request errored, status: 404, number of errors: 1 > LOG: _onDisconnectTimeout was called > LOG: _doDisconnect was called > Strophe is disconnected. Re-connecting.
> If I use the next sequential RID instead (outstanding poll at refresh time > was 2914479752): > Attempting Strophe connection with saved jid: ceu...@onstate.net/246f5dd7sid: 246f5dd7 rid: 2914479753 > Strophe is attaching... > Strophe is attached. > SEND: <body rid='2914479753' xmlns='http://jabber.org/protocol/httpbind' > sid='246f5dd7'/> > LOG: request id 1.1 error 404 happened > LOG: request errored, status: 404, number of errors: 1 > Strophe is disconnecting. > LOG: _doDisconnect was called > Strophe is disconnected. Re-connecting.
> Sorry to bump, but I saw Jack M. made a round of the forums and skipped my
> question. Any chance I can get an answer for this? We are on the brink of
> dropping Strophe altogether for this project.
Sorry that I missed it. It appears your question is just like the
dozens of other Openfire questions. You detach, you do everything you
are supposed to do with the RID, and Openfire disconnects you.
I responded to a previous person pretty in depth on why I think this
happens (my theory was that they are not caching the current RID until
after they've generated a response).
I have no idea why this happens, but I'm pretty sure if you use
another XMPP server (or use Punjab in front of Openfire) it will work
fine. I know several people have tried to contact the Openfire guys to
find out what's going on, but I haven't heard anything resulting from
that.
You might want to put a big bold notice on the Strophe main page so that newbies like myself get a head's up about this attachment issue. It seems pretty widespread.
On Wednesday, July 11, 2012 9:12:04 AM UTC-7, Jack Moffitt wrote:
> > Sorry to bump, but I saw Jack M. made a round of the forums and skipped > my > > question. Any chance I can get an answer for this? We are on the brink > of > > dropping Strophe altogether for this project.
> Sorry that I missed it. It appears your question is just like the > dozens of other Openfire questions. You detach, you do everything you > are supposed to do with the RID, and Openfire disconnects you.
> I responded to a previous person pretty in depth on why I think this > happens (my theory was that they are not caching the current RID until > after they've generated a response).
> I have no idea why this happens, but I'm pretty sure if you use > another XMPP server (or use Punjab in front of Openfire) it will work > fine. I know several people have tried to contact the Openfire guys to > find out what's going on, but I haven't heard anything resulting from > that.
> You might want to put a big bold notice on the Strophe main page so that
> newbies like myself get a head's up about this attachment issue. It seems
> pretty widespread.
It's widespread in that everyone seems to jump onto Openfire as their
first XMPP server. I have no idea why this is.
Is there some reason everyone chooses Openfire over Prosody or
ejabberd or the other options?
Would adding a note to the API docs be helpful instead? I'd like to
put it where people who are attempting to use session attachment are
most likely to see it. Better yet would be to get this fixed in
Openfire so that no one would have any problems at all!
For me, it wasn't a choice: The team responsible for implementing our chat proxies and gateways chose OpenFire for various reasons. We use it for a lot more than just BOSH. I'm the web applications developer, so when choosing libraries to implement a web-based chat interface for our OpenFire solution, I chose Strophe. It would have been useful while reading about Strophe to know that it requires a connection manager to interface correctly with OpenFire in some situations (regardless of whose fault the bug is). Would have saved me about a week had I begun with Punjab.
On Wednesday, July 11, 2012 9:38:45 AM UTC-7, Jack Moffitt wrote:
> > You might want to put a big bold notice on the Strophe main page so that > > newbies like myself get a head's up about this attachment issue. It > seems > > pretty widespread.
> It's widespread in that everyone seems to jump onto Openfire as their > first XMPP server. I have no idea why this is.
> Is there some reason everyone chooses Openfire over Prosody or > ejabberd or the other options?
> Would adding a note to the API docs be helpful instead? I'd like to > put it where people who are attempting to use session attachment are > most likely to see it. Better yet would be to get this fixed in > Openfire so that no one would have any problems at all!
> Is there some reason everyone chooses Openfire over Prosody or
> ejabberd or the other options?
Well, we also took openfire as the first xmpp server. Particularly for the following reasons:
- _very_ easy installation.. A web based setup process is just great
- Webadmin interface is great as well
- Java (more known than erlang/lua)
- Very easy to configure a different data source (database, table and SQL statement) for authentication
These 4 things are very attractive to newbies I think :)
But once you encounter issues, it seems that openfire needs to be replaced everywhere, sadly :(
If you still want a java implementation of an XMPP server, I would highly recommend you to take a look at Tigase (www.tigase.org).
Its rock solid and a very flexible server where you can do your own auth, userdb and a lot of plugins and ad-hoc commands very easy!
There is no webadmin, but a very simple property file which is documented on their site. The installation is to run a jar.
Openfire is good for simple testing when starting to learn the XMPP protocol and how the server works - afterwards most want something else.. because of speed, flexibility and the communities. :-)
Openfire is very closed in its way of communicating and fixing bugs - probably because they have their own product - JIVE...
So if you want production ready systems choose either ejabberd, tigase or prosody.. depending on which module you need to have and if you need clustering etc.
>> Is there some reason everyone chooses Openfire over Prosody or
>> ejabberd or the other options?
> Well, we also took openfire as the first xmpp server. Particularly for the following reasons:
> - _very_ easy installation.. A web based setup process is just great
> - Webadmin interface is great as well
> - Java (more known than erlang/lua)
> - Very easy to configure a different data source (database, table and SQL statement) for authentication
> These 4 things are very attractive to newbies I think :)
> But once you encounter issues, it seems that openfire needs to be replaced everywhere, sadly :(
> -- > You received this message because you are subscribed to the Google Groups "Strophe" group.
> To post to this group, send email to strophe@googlegroups.com.
> To unsubscribe from this group, send email to strophe+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/strophe?hl=en.
On 11/07/12 at 10:38 AM -0600, Jack Moffitt <j...@metajack.im> wrote:
>Is there some reason everyone chooses Openfire over Prosody or
>ejabberd or the other options?
We chose Openfire for the external database integration. Can't recall whether we looked at Prosody; ejabberd was either too difficult to get external database or we had to have to duplicate list of users (can't recall which).
> We chose Openfire for the external database integration. Can't recall
> whether we looked at Prosody; ejabberd was either too difficult to get
> external database or we had to have to duplicate list of users (can't
> recall which).
We had initially chosen Openfire for the exact same reasons. But later we
moved over to ejabberd as
we found it was actually quite easy to configure even with no significant
Erlang knowledge, mainly because the community
is very helpful and also because the main config file is filled with useful
comments for each setting.
> --
> You received this message because you are subscribed to the Google Groups
> "Strophe" group.
> To post to this group, send email to strophe@googlegroups.com.
> To unsubscribe from this group, send email to strophe+unsubscribe@**
> googlegroups.com <strophe%2Bunsubscribe@googlegroups.com>.
> For more options, visit this group at http://groups.google.com/** > group/strophe?hl=en <http://groups.google.com/group/strophe?hl=en>.
You don't have permission to access /doc/display/MESSENGER/Using+ejabberd+with+MySQL+native+driver on this server.
>PS: Your "Duplicate users" point is valid but we could live with it
We *can* live with duplicate users, but decided not since we had alternatives. I've done projects with 'duplicated' users before, and it wasn't *if* they got out of sync; it was a matter of *when*. Really wanted to avoid that this time.
> PS: Your "Duplicate users" point is valid but we could live with it
> We *can* live with duplicate users, but decided not since we had
> alternatives. I've done projects with 'duplicated' users before, and it
> wasn't *if* they got out of sync; it was a matter of *when*. Really wanted
> to avoid that this time.
> Charlie
> --
> Ꮚ Charlie Garrison ♊ <garri...@zeta.org.au>
> --
> You received this message because you are subscribed to the Google Groups
> "Strophe" group.
> To post to this group, send email to strophe@googlegroups.com.
> To unsubscribe from this group, send email to strophe+unsubscribe@**
> googlegroups.com <strophe%2Bunsubscribe@googlegroups.com>.
> For more options, visit this group at http://groups.google.com/** > group/strophe?hl=en <http://groups.google.com/group/strophe?hl=en>.
Thanks for that link. From what I can see that is only for having ejabberd database in mysql, but not using an existing schema for user auth. Can I use our own users table for auth with ejabberd?
I don't think so but you can provide an external auth script (which won't
scale) or you can write a module in erlang which authenticates the users
with your existing users table.
Am 16.07.2012 06:10 schrieb "Charlie Garrison" <garri...@zeta.org.au>:
> Thanks for that link. From what I can see that is only for having ejabberd
> database in mysql, but not using an existing schema for user auth. Can I
> use our own users table for auth with ejabberd?
> Thanks,
> Charlie
> --
> Ꮚ Charlie Garrison ♊ <garri...@zeta.org.au>
> --
> You received this message because you are subscribed to the Google Groups
> "Strophe" group.
> To post to this group, send email to strophe@googlegroups.com.
> To unsubscribe from this group, send email to strophe+unsubscribe@**
> googlegroups.com <strophe%2Bunsubscribe@googlegroups.com>.
> For more options, visit this group at http://groups.google.com/** > group/strophe?hl=en <http://groups.google.com/group/strophe?hl=en>.
<michael.wei...@gmail.com> wrote:
>I don't think so but you can provide an external auth script (which won't
>scale) or you can write a module in erlang which authenticates the users
>with your existing users table.
Hmm, a custom module sounds practical. Since I know zero erlang, how hard would it be to code a custom authentication module? Are there some examples to use as starting points? I've had a look through ejabberd site but couldn't see examples except for external auth.
When I first started with Strophe I wanted to go with ejabberd for the server, but the separate users table made us look at other servers. I'd be quite happy to go back to ejabberd if we can write a custom module for auth against our existing mysql schema.
> Hmm, a custom module sounds practical. Since I know zero erlang, how hard would it be to code a custom authentication module? Are there some examples to use as starting points? I've had a look through ejabberd site but couldn't see examples except for external auth.
Which implements the odbc authentication. Of course you'd need to setup an own connection to your own database and then execute custom SQL statements on top of it.
Maybe you could ask ProcessOne to develop a module where you could define the DB server to connect to, the SQL statements to execute for the various methods you'd need to implement.. (Something like openfire already has with it's custom db auth configuration options).
Yes I would say the same. Choose the XMPP server carefully and choose it in a context of a language that you know, so you easily can expand it.
If you know erlang, go for it.. Its a cool language and a nice scalable server. If you instead know java go for Tigase.. It is very extendable as well. To do a authmodule is just to implement a class.. If you just need to do an external authentication, then you just alter your config and point to a new jdbc url and alter the SQL in the config as well to fetch and auth. your users from your external database.
--Cheers!
/Steffen
On Jul 17, 2012, at 9:38 AM, Michael Weibel wrote:
>> Hmm, a custom module sounds practical. Since I know zero erlang, how hard would it be to code a custom authentication module? Are there some examples to use as starting points? I've had a look through ejabberd site but couldn't see examples except for external auth.
> Which implements the odbc authentication. Of course you'd need to setup an own connection to your own database and then execute custom SQL statements on top of it.
> Maybe you could ask ProcessOne to develop a module where you could define the DB server to connect to, the SQL statements to execute for the various methods you'd need to implement.. (Something like openfire already has with it's custom db auth configuration options).
> - Michael
> -- > You received this message because you are subscribed to the Google Groups "Strophe" group.
> To post to this group, send email to strophe@googlegroups.com.
> To unsubscribe from this group, send email to strophe+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/strophe?hl=en.
Jack, i am using Punjab in front of Openfire.It is working fine in Chrome and FF when page load with attach.
But IE will happen RID SKIPPING cause DISCONNECT after page reload, come with following debug:
> You might want to put a big bold notice on the Strophe main page so that > newbies like myself get a head's up about this attachment issue. It seems > pretty widespread.
> Thanks!
> -Nathan
> On Wednesday, July 11, 2012 9:12:04 AM UTC-7, Jack Moffitt wrote:
>> > Sorry to bump, but I saw Jack M. made a round of the forums and skipped >> my >> > question. Any chance I can get an answer for this? We are on the brink >> of >> > dropping Strophe altogether for this project.
>> Sorry that I missed it. It appears your question is just like the >> dozens of other Openfire questions. You detach, you do everything you >> are supposed to do with the RID, and Openfire disconnects you.
>> I responded to a previous person pretty in depth on why I think this >> happens (my theory was that they are not caching the current RID until >> after they've generated a response).
>> I have no idea why this happens, but I'm pretty sure if you use >> another XMPP server (or use Punjab in front of Openfire) it will work >> fine. I know several people have tried to contact the Openfire guys to >> find out what's going on, but I haven't heard anything resulting from >> that.
Sounds like it's a bug in that plugin perhaps. You can eliminate that
by setting up a reverse proxy so that your javascript and your BOSH
endpoint are on the same host/port pair. Then you can remove the
plugin and retest in IE and see if it is still a problem. This would
at least point you to where the problem is, IE or the XDomain plugin.
On Mon, Nov 5, 2012 at 2:43 AM, Chongde Lin <linchong899...@gmail.com> wrote:
> Jack, i am using Punjab in front of Openfire.It is working fine in Chrome
> and FF when page load with attach.
> But IE will happen RID SKIPPING cause DISCONNECT after page reload, come
> with following debug:
> In order to make cross chat work with xdomainrequest, I use
> https://gist.github.com/767777 js libary with a little modify.
I've gotten that error too, but only on certain machines and only in
certain conditions. I'm completely stumped as to the cause. Anyone who
has experience using Strophe with CORS in MSIE, do you use the same
plugin Chongde linked to above? Or any variant on it? Have you seen
any errors along these lines?
>> You might want to put a big bold notice on the Strophe main page so that
>> newbies like myself get a head's up about this attachment issue. It seems
>> pretty widespread.
>> Thanks!
>> -Nathan
>> On Wednesday, July 11, 2012 9:12:04 AM UTC-7, Jack Moffitt wrote:
>>> > Sorry to bump, but I saw Jack M. made a round of the forums and skipped
>>> > my
>>> > question. Any chance I can get an answer for this? We are on the brink
>>> > of
>>> > dropping Strophe altogether for this project.
>>> Sorry that I missed it. It appears your question is just like the
>>> dozens of other Openfire questions. You detach, you do everything you
>>> are supposed to do with the RID, and Openfire disconnects you.
>>> I responded to a previous person pretty in depth on why I think this
>>> happens (my theory was that they are not caching the current RID until
>>> after they've generated a response).
>>> I have no idea why this happens, but I'm pretty sure if you use
>>> another XMPP server (or use Punjab in front of Openfire) it will work
>>> fine. I know several people have tried to contact the Openfire guys to
>>> find out what's going on, but I haven't heard anything resulting from
>>> that.
> To post to this group, send email to strophe@googlegroups.com.
> To unsubscribe from this group, send email to
> strophe+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/strophe?hl=en.
Your problems sound familar. We had severe issues (dropping connections because of invalid RID's) with OpenFire and using Punjab helped only to a certain level.
We really liked the project because of the simplicity of the configuration and installation, but I have to say you're better off with ejabberd or Prosody. Not only the BOSH implementation was buggy, but it also leaked memory over time. This was one year ago and they might fixed some of the issues though.
On Tuesday, November 6, 2012 12:24:48 AM UTC+1, Daniel Dormont wrote:
> On Mon, Nov 5, 2012 at 2:43 AM, Chongde Lin <linchon...@gmail.com<javascript:>> > wrote: > > Jack, i am using Punjab in front of Openfire.It is working fine in > Chrome > > and FF when page load with attach. > > But IE will happen RID SKIPPING cause DISCONNECT after page reload, come > > with following debug:
> > In order to make cross chat work with xdomainrequest, I use > > https://gist.github.com/767777 js libary with a little modify.
> I've gotten that error too, but only on certain machines and only in > certain conditions. I'm completely stumped as to the cause. Anyone who > has experience using Strophe with CORS in MSIE, do you use the same > plugin Chongde linked to above? Or any variant on it? Have you seen > any errors along these lines?
> dan
> > 在 2012年7月12日星期四UTC+8上午12时22分58秒,nkeeney写道:
> >> Thanks Jack, I'll try Punjab.
> >> You might want to put a big bold notice on the Strophe main page so > that > >> newbies like myself get a head's up about this attachment issue. It > seems > >> pretty widespread.
> >> Thanks! > >> -Nathan
> >> On Wednesday, July 11, 2012 9:12:04 AM UTC-7, Jack Moffitt wrote:
> >>> > Sorry to bump, but I saw Jack M. made a round of the forums and > skipped > >>> > my > >>> > question. Any chance I can get an answer for this? We are on the > brink > >>> > of > >>> > dropping Strophe altogether for this project.
> >>> Sorry that I missed it. It appears your question is just like the > >>> dozens of other Openfire questions. You detach, you do everything you > >>> are supposed to do with the RID, and Openfire disconnects you.
> >>> I responded to a previous person pretty in depth on why I think this > >>> happens (my theory was that they are not caching the current RID until > >>> after they've generated a response).
> >>> I have no idea why this happens, but I'm pretty sure if you use > >>> another XMPP server (or use Punjab in front of Openfire) it will work > >>> fine. I know several people have tried to contact the Openfire guys to > >>> find out what's going on, but I haven't heard anything resulting from > >>> that.
> > To post to this group, send email to str...@googlegroups.com<javascript:>.
> > To unsubscribe from this group, send email to > > strophe+u...@googlegroups.com <javascript:>. > > For more options, visit this group at > > http://groups.google.com/group/strophe?hl=en.