Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

SleekXMPP connect with my ejabberd server with some error #250

Open
jiangzhx opened this issue Jul 23, 2013 · 6 comments
Open

SleekXMPP connect with my ejabberd server with some error #250

jiangzhx opened this issue Jul 23, 2013 · 6 comments

Comments

@jiangzhx
Copy link

i use code from
https://github.com/fritzy/SleekXMPP#the-sleekxmpp-boilerplate

anyone can give some suggestion?

DEBUG:sleekxmpp.plugins.base:Loaded Plugin: RFC 6120: Stream Feature: STARTTLS
DEBUG:sleekxmpp.plugins.base:Loaded Plugin: RFC 6120: Stream Feature: Resource Binding
DEBUG:sleekxmpp.plugins.base:Loaded Plugin: RFC 3920: Stream Feature: Start Session
DEBUG:sleekxmpp.plugins.base:Loaded Plugin: RFC 6121: Stream Feature: Roster Versioning
DEBUG:sleekxmpp.plugins.base:Loaded Plugin: RFC 6121: Stream Feature: Subscription Pre-Approval
DEBUG:sleekxmpp.plugins.base:Loaded Plugin: RFC 6120: Stream Feature: SASL
DEBUG:sleekxmpp.xmlstream.xmlstream:Connecting to 127.0.0.1:5222
DEBUG:sleekxmpp.thirdparty.statemachine: ==== TRANSITION disconnected -> connected
DEBUG:sleekxmpp.xmlstream.xmlstream:Starting HANDLER THREAD
DEBUG:sleekxmpp.xmlstream.xmlstream:Loading event runner
DEBUG:sleekxmpp.xmlstream.xmlstream:SEND (IMMED): <stream:stream to='localhost' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' xml:lang='en' version='1.0'>
DEBUG:sleekxmpp.xmlstream.xmlstream:RECV: <stream:stream version="1.0" from="localhost" id="3094273301" xml:lang="en">
DEBUG:sleekxmpp.xmlstream.xmlstream:RECV: <stream:features xmlns="http://etherx.jabber.org/streams">PLAIN/stream:features
INFO:sleekxmpp.util.sasl.client:SASL: PLAIN: PLAIN without encryption
ERROR:sleekxmpp.features.feature_mechanisms.mechanisms:No appropriate login method.
DEBUG:sleekxmpp.xmlstream.xmlstream:SEND (IMMED): /stream:stream
INFO:sleekxmpp.xmlstream.xmlstream:Waiting for /stream:stream from server
DEBUG:sleekxmpp.xmlstream.xmlstream:End of stream recieved
DEBUG:sleekxmpp.xmlstream.xmlstream:Waiting for 3 threads to exit.
DEBUG:sleekxmpp.xmlstream.xmlstream:Threading deadlock prevention!
DEBUG:sleekxmpp.xmlstream.xmlstream:Marked event_thread_0 thread as ended due to disconnect() call. 2 threads remain.
DEBUG:sleekxmpp.xmlstream.scheduler:Quitting Scheduler thread
DEBUG:sleekxmpp.xmlstream.xmlstream:Stopped scheduler thread. 1 threads remain.
DEBUG:sleekxmpp.xmlstream.xmlstream:Stopped send thread. 0 threads remain.
DEBUG:sleekxmpp.thirdparty.statemachine: ==== TRANSITION connected -> disconnected
DEBUG:sleekxmpp.clientxmpp:Finished processing stream features.
DEBUG:sleekxmpp.xmlstream.xmlstream:Finished exiting event runner thread after early termination from disconnect() call. 0 threads remain.
DEBUG:sleekxmpp.thirdparty.statemachine:State was not ready

@jpcaruana
Copy link
Contributor

can you show us your server configuration ?

@legastero
Copy link
Collaborator

This is because Sleek does not allow PLAIN authentication over an unencrypted connection, by default.

To allow it, set this before connecting and processing:

xmpp['feature_mechanisms'].unencrypted_plain = True

@noodlebreak
Copy link

@legastero Thanks! That was very helpful.

@sudharsan23
Copy link

Hi,
I am using sleekxmpp to connect and send message to ejabberd. But my xmpp connects with ejabberd with invalid namespace error. Enclosing the error below:

Send XML on stream = <<"<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4823323092473893070' from='xmpp-vsd-sudhar-set1.net' xml:lang='en'>">>
2017-04-20 19:42:36.906 [debug] <0.1846.1>@ejabberd_c2s:send_text:1802 Send XML on stream = <<"stream:error</stream:error>">>

Even i tried adding
xmpp['feature_mechanisms'].unencrypted_plain = True

before connect. But still I see same error. Can you please help me out.

@RameshJangama
Copy link

Hi I am also receiving similar error on latest 17.11 ejabberd:
any suggestion please

DEBUG    Event triggered: ssl_cert
WARNING  Could not find pyasn1 and pyasn1_modules. SSL certificate COULD NOT BE VERIFIED.
DEBUG    SEND (IMMED): <stream:stream to='ec2-34-208-168-55.us-west-2.compute.amazonaws.com' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' xml:lang='en' version='1.0'>
DEBUG    RECV: <stream:stream version="1.0" from="ec2-34-208-168-55.us-west-2.compute.amazonaws.com" id="7547766482003537921" xml:lang="en">
DEBUG    RECV: <stream:features xmlns="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism><mechanism>X-OAUTH2</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
ERROR    No appropriate login method.
DEBUG    Event triggered: no_auth
DEBUG    Event triggered: failed_auth
DEBUG    Event triggered: session_end
DEBUG    SEND (IMMED): </stream:stream>
INFO     Waiting for </stream:stream> from server
DEBUG    End of stream recieved
DEBUG    Waiting for 3 threads to exit. 

@RameshJangama
Copy link

Found the issue - its user/password problem in script. sorry guys.
But when you see this error then please double/triple check both username and password.

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

No branches or pull requests

6 participants