Open jiangzhx opened 11 years ago
can you show us your server configuration ?
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
@legastero Thanks! That was very helpful.
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 = <<"<?xml version='1.0'?>
Even i tried adding xmpp['feature_mechanisms'].unencrypted_plain = True
before connect. But still I see same error. Can you please help me out.
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.
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.
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):
DEBUG:sleekxmpp.xmlstream.xmlstream:RECV:
DEBUG:sleekxmpp.xmlstream.xmlstream:RECV: 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