Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A lot of errors. #74

Closed
maxguzenski opened this issue Jun 22, 2012 · 8 comments
Closed

A lot of errors. #74

maxguzenski opened this issue Jun 22, 2012 · 8 comments

Comments

@maxguzenski
Copy link

Im receiving a lot of errors... any ideia?:

events.js:48
throw arguments[1]; // Unhandled 'error' event
^
Error: socket hang up
at SecurePair.error (tls.js:802:15)
at CleartextStream._done (tls.js:283:17)
at CleartextStream._pull (tls.js:426:12)
at SecurePair.cycle (tls.js:727:20)
at CleartextStream.end (tls.js:256:13)
at Client.onEnd (/root/awesome-im/node_modules/node-xmpp/lib/xmpp/connection.js:279:17)
at Socket. (/root/awesome-im/node_modules/node-xmpp/lib/xmpp/connection.js:56:14)
at Socket.emit (events.js:88:20)
at TCP.onread (net.js:388:51)

@astro
Copy link
Member

astro commented Jun 22, 2012

The socket hung up (connection terminated). We may need to catch that from the SSL layer.

@maxguzenski
Copy link
Author

I'm using prosody... Erro in prosody is: invalid-namespace, closing session.

@astro
Copy link
Member

astro commented Jun 23, 2012

Now that is interesting. Would you please determine which xmlns declaration is the culprit? Are you perhaps trying to connect a Component to a c2s port or vice versa?

@maxguzenski
Copy link
Author

So, I'm trying to make a webchat. Normally, a webchat whould connect to prosody using a BOSH. But, I tried to make my webchat using socket.io, and node/socket.io uses node-xmpp to real connect to prosody... it not working ;)

Into development everthing works just fine... but in production, with more then 300 users online, this issue happen all the time (and node server restart).

At production, node-xmpp reconnect all the time as well. (when "reconnect: true" is setted)

I'll try to find more information about this issue.

@maxguzenski
Copy link
Author

I looked at prosody source, when it call 'cb_error(session, "no-stream");' is where invalid-namespace happen

      if not stanza then --if we are not currently inside a stanza
        if session.notopen then
            if tagname == stream_tag then
                non_streamns_depth = 0;
                if cb_streamopened then
                    cb_streamopened(session, attr);
                end
            else
                -- Garbage before stream?
                cb_error(session, "no-stream");
            end
            return;
        end
        if curr_ns == "jabber:client" and name ~= "iq" and name ~= "presence" and name ~= "message" then
            cb_error(session, "invalid-top-level-element");
        end

        stanza = st.stanza(name, attr);
    else -- we are inside a stanza, so add a tag
        stanza:tag(name, attr);
    end

@maxguzenski
Copy link
Author

Is what I said possible? Use node-xmpp between socket.io and a xmpp server? to controll more then 300 connections?

@astro
Copy link
Member

astro commented Jul 7, 2012

Sure, that sounds like a proxy server to me. Take a look at node-xmpp-bosh for example, they do something quite similar.

Did you resolve that invalid-namespace error by now? Can we close this bug?

@maxguzenski
Copy link
Author

Now, I dont using node-xmpp as a proxy anymore... but I'll try again. For now, we can close this issue. I re open it in future, if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants