fritzy / SleekXMPP

Python 2.6+/3.1+ XMPP Library
http://groups.google.com/group/sleekxmpp-discussion
Other
1.1k stars 299 forks source link

Random Generated "from" JID #421

Closed dudanogueira closed 6 years ago

dudanogueira commented 8 years ago

Hi there! Thanks for this awesome project. I am facing some weird issue, and would like to know if you can help me.

While using the SendMsgBot example, it was working as expected (the from message from sistemas@spark-chat). For some reason it stopped doing like this and started assigning random generated JID for the FROM. Logging as follow:

teste.py -d -j sistemas@192.0.0.199 -t eduardo@spark-chat -m "Try this" Password: DEBUG Loaded Plugin: RFC 6120: Stream Feature: STARTTLS DEBUG Loaded Plugin: RFC 6120: Stream Feature: Resource Binding DEBUG Loaded Plugin: RFC 3920: Stream Feature: Start Session DEBUG Loaded Plugin: RFC 6121: Stream Feature: Roster Versioning DEBUG Loaded Plugin: RFC 6121: Stream Feature: Subscription Pre-Approval DEBUG Loaded Plugin: RFC 6120: Stream Feature: SASL DEBUG Loaded Plugin: XEP-0030: Service Discovery DEBUG Loaded Plugin: XEP-0199: XMPP Ping DEBUG Connecting to 192.0.0.199:5222 DEBUG Event triggered: connected DEBUG ==== TRANSITION disconnected -> connected DEBUG Starting HANDLER THREAD DEBUG Loading event runner DEBUG SEND (IMMED): DEBUG RECV: DEBUG RECV: PLAINANONYMOUSJIVE-SHAREDSECRETzlib/stream:features DEBUG SEND (IMMED): DEBUG RECV: DEBUG Starting TLS INFO Negotiating TLS INFO Using SSL version: TLS 1.0 DEBUG CERT: -----BEGIN CERTIFICATE----- MIIDEz...... ..... -----END CERTIFICATE-----

DEBUG Event triggered: ssl_cert WARNING Could not find pyasn1 and pyasn1_modules. SSL certificate COULD NOT BE VERIFIED. DEBUG SEND (IMMED): DEBUG RECV: DEBUG RECV: PLAINANONYMOUSJIVE-SHAREDSECRETzlib/stream:features DEBUG SEND (IMMED): AHNpc3RlbWFzAFVuaW1lZFRWMjIy DEBUG RECV: INFO Authentication failed: not-authorized DEBUG Event triggered: failed_auth DEBUG SEND (IMMED): QW5vbnltb3VzLCBTdWVsdGE= DEBUG RECV: DEBUG Event triggered: auth_success DEBUG SEND (IMMED): DEBUG RECV: DEBUG RECV: zlib/stream:features DEBUG Requesting resource: DEBUG SEND (IMMED): DEBUG RECV: jid>68kn5pl0us@spark-chat/68kn5pl0us</jid DEBUG Event triggered: session_bind INFO JID set to: 68kn5pl0us@spark-chat/68kn5pl0us DEBUG SEND (IMMED): DEBUG RECV: DEBUG Established Session DEBUG Event triggered: session_start DEBUG Finished processing stream features. DEBUG Event triggered: stream_negotiated WARNING Could not find pyasn1 and pyasn1_modules. SSL certificate expiration COULD NOT BE VERIFIED. DEBUG Event triggered: sent_presence DEBUG SEND: DEBUG SEND: DEBUG RECV: DEBUG Event triggered: roster_update DEBUG Event triggered: session_end DEBUG SEND: Try this DEBUG SEND (IMMED): /stream:stream INFO Waiting for /stream:stream from server ERROR Error reading from XML stream. DEBUG ==== Could not acquire lock in 2.0 sec: connected -> disconnected Done DEBUG Waiting for 3 threads to exit. DEBUG Threading deadlock prevention! DEBUG Marked event_thread_0 thread as ended due to disconnect() call. 2 threads remain. DEBUG Stopped send thread. 1 threads remain. DEBUG Quitting Scheduler thread DEBUG Stopped scheduler thread. 0 threads remain. DEBUG Event triggered: disconnected DEBUG ==== TRANSITION connected -> disconnected DEBUG Finished exiting event runner thread after early termination from disconnect() call. 0 threads remain.

dudanogueira commented 8 years ago

And today, just as random as the generated JID, it is back to normal... the messages are sent from the sistemas@spark-chat JID :) It is probably a server issue as the code has never changed.

derek-austin commented 7 years ago
WARNING Could not find pyasn1 and pyasn1_modules. SSL certificate COULD NOT BE VERIFIED

try to:

pip install --upgrade pyasn1
dudanogueira commented 7 years ago

Hi there! THanks for the reply! I installed the pyasn1, but it keeps generating random jids :)

dudanogueira commented 6 years ago

Yes! One year and one week after, I coworker of mine was able to solve this mistery. For the posterity and for the sake of souls that have the same problem:

If sleekxmpp (maybe the protocolo?) can't connect on the OpenFire server (this is on my scenario), it will generate a random JID...

We had a problem on AD which cause the password to not work as expected.

The hint is here:

INFO Authentication failed: not-authorized DEBUG Event triggered: failed_auth

:)