1. Open latest Emacs with latest emacs-jabber (from CVS)
2. Connect to Jabber. It works, you can chat, etc.
3. Disconnect from Jabber.
4. Try to connect again. I get:
Opening TLS connection to `im.SERVER.net'...done
Logon failed: Not authorized
5. You must close Emacs and open it again so that you can connect again.
Here are the logs:
Tue Feb 3 21:11:13 2009: Starting jabber-connection
Tue Feb 3 21:11:13 2009: jabber-connection enters :connecting
Tue Feb 3 21:11:13 2009: Found enter function for :connecting: #[(fsm state-data) "\306…………………" [state-data connection-type connect-function server network-server port plist-get :connection-type jabber-get-connect-function :server :network-server :port nil fsm] 5]
Tue Feb 3 21:11:14 2009: Using data from enter function
Tue Feb 3 21:11:14 2009: Sent :connected to jabber-connection in state :connecting
Tue Feb 3 21:11:14 2009: jabber-connection enters :connected
Tue Feb 3 21:11:14 2009: Found enter function for :connected: #[(fsm state-data) "………………" [fsm *jabber-connected* state-data jabber-send-stream-header t nil] 2]
Tue Feb 3 21:11:14 2009: Using data from enter function
Tue Feb 3 21:11:14 2009: Sent :filter to jabber-connection in state :connected
Tue Feb 3 21:11:14 2009: Sent :stream-start to jabber-connection in state :connected
Tue Feb 3 21:11:14 2009: jabber-connection enters :legacy-auth
Tue Feb 3 21:11:14 2009: Found enter function for :legacy-auth: #[(fsm state-data) "………………………" [fsm state-data jabber-get-auth plist-get :server :session-id nil] 6]
Tue Feb 3 21:11:14 2009: Using data from enter function
Tue Feb 3 21:11:15 2009: Sent :filter to jabber-connection in state :legacy-auth
Tue Feb 3 21:11:15 2009: Sent :filter to jabber-connection in state :legacy-auth
Tue Feb 3 21:11:15 2009: Sent :stanza to jabber-connection in state :legacy-auth
Tue Feb 3 21:11:15 2009: Sent :filter to jabber-connection in state :legacy-auth
Tue Feb 3 21:11:15 2009: Sent :stanza to jabber-connection in state :legacy-auth
Tue Feb 3 21:11:15 2009: Sent :authentication-failure to jabber-connection in state :legacy-auth
Tue Feb 3 21:11:15 2009: jabber-connection enters nil
Tue Feb 3 21:11:15 2009: Found enter function for nil: #[(fsm state-data) "………………………………………………………" [state-data connection process-buffer jabber-debug-keep-process-buffers ever-session-established reason plist-get :connection processp delete-process bufferp kill-buffer plist-put nil jabber-display-roster :disconnection-expected :disconnection-reason :ever-session-established run-hook-with-args jabber-lost-connection-hooks message "%s@%s/%s: connection lost: `%s'" :username :server :resource delq jabber-mode-line-presence-update expected fsm jabber-auto-reconnect jabber-reconnect-delay jabber-connections jabber-mode-line-mode] 8]
Tue Feb 3 21:11:15 2009: Sent :sentinel to jabber-connection in state nil
Tue Feb 3 21:11:15 2009: Warning: event (:sentinel #<process jabber> "killed
") ignored in state jabber-connection/nil
Tue Feb 3 21:11:15 2009: Using data from enter function
And:
sending #("<?xml version='1.0'?><stream:stream to='im.SERVER.net' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
" 40 57 (face nil))
receive "<stream:stream xmlns:stream=\"http://etherx.jabber.org/streams\" xmlns=\"jabber:client\" from=\"im.SERVER.net\" id=\"5d6dc54\" xml:lang=\"en\">"
sending (iq ((to . #("im.SERVER.net" 0 17 (face nil))) (type . "get") (id . "emacs-iq-18824.42210.996045")) (query ((xmlns . "jabber:iq:auth")) (username nil #("dclemente" 0 9 (face nil)))))
receive (iq ((type . "result") (id . "emacs-iq-18824.42210.996045") (from . "im.SERVER.net")) (query ((xmlns . "jabber:iq:auth")) (username nil "dclemente") (password nil) (resource nil)))
sending (iq ((to . #("im.SERVER.net" 0 17 (face nil))) (type . "set") (id . "emacs-iq-18824.42211.54279")) (query ((xmlns . "jabber:iq:auth")) (username nil #("dclemente" 0 9 (face nil))) (password nil "^@^@^@^@^@^@^@^@") (resource nil #("142857" 0 6 (face nil)))))
receive (iq ((type . "error") (id . "emacs-iq-18824.42211.54279") (from . "im.SERVER.net") (to . "im.SERVER.net/5d6dc54")) (query ((xmlns . "jabber:iq:auth")) (username nil "dclemente") (password nil " ") (resource nil "142857")) (error ((code . "401") (type . "auth")) (not-authorized ((xmlns . "urn:ietf:params:xml:ns:xmpp-stanzas")))))
The "^@^@^@^@^@^@^@^@" is made of control characters.
It seems the password is nil.
My account:
("dclemente@im.SERVER.net/142857" (:password . "secret") (:network-server . "im.SERVER.net") (:port . 5223) (:connection-type . ssl) (:disabled . t))
The server:
Name: Openfire
Version: 3.6.2
OS: Java 1.6.0_03
This happens since the first time I used the account.
First of all, you can reset the password without restarting emacs with M-x jabber-uncache-password.
In the first, successful, connection attempt, which you wisely omitted since it contains your password, does jabber.el do SASL authentication? sasl.el is as far as I can see the only piece of code that zeroes the password in that way.
Otherwise, I can't see what might cause this behaviour...
I have: (setq jabber-use-sasl nil)
And it isn't being used:
sending #("<?xml version='1.0'?><stream:stream to='im.SERVER.net' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
" 40 57 (face nil))
receive "<stream:stream xmlns:stream=\"http://etherx.jabber.org/streams\" xmlns=\"jabber:client\" from=\"im.SERVER.net\" id=\"c8e365fe\" xml:lang=\"en\">"
sending (iq ((to . #("im.SERVER.net" 0 17 (face nil))) (type . "get") (id . "emacs-iq-18825.44486.143069")) (query ((xmlns . "jabber:iq:auth")) (username nil #("dclemente" 0 9 (face nil)))))
receive (iq ((type . "result") (id . "emacs-iq-18825.44486.143069") (from . "im.SERVER.net")) (query ((xmlns . "jabber:iq:auth")) (username nil "dclemente") (password nil) (resource nil)))
sending (iq ((to . #("im.SERVER.net" 0 17 (face nil))) (type . "set") (id . "emacs-iq-18825.44486.209273")) (query ((xmlns . "jabber:iq:auth")) (username nil #("dclemente" 0 9 (face nil))) (password nil "secret") (resource nil #("142857" 0 6 (face nil)))))
receive (iq ((type . "result") (id . "emacs-iq-18825.44486.209273") (from . "im.SERVER.net") (to . "dclemente@im.SERVER.net/142857")))
sending (iq ((type . "get") (id . "emacs-iq-18825.44486.257590")) (query ((xmlns . "jabber:iq:roster"))))
receive (iq ((type . "result") (id . "emacs-iq-18825.44486.257590") (to . "dclemente@im.SERVER.net/142857")) (query ((xmlns . "jabber:iq:roster")) (item ((jid . "ar………@im.SERVER.net") (subscription . "both"))) (item ((jid . "sc………@im.SERVER.net") (subscription . "both"))) (item ((jid . "dclemente@im.SERVER.net") (name . "Otra vez yo") (subscription . "both")))))
Also, after a: M-x jabber-uncache-password, it still doesn't work. The error is still the same.
More info. After clearing:
password-data is a variable defined in `password-cache.el'.
Its value is [0 0 0 0 0 0 0]
ELISP> (jabber-password-key "dclemente@im.SERVER.net/142857")
"xmpp:dclemente@im.SERVER.net/142857"
ELISP> (intern-soft "xmpp:dclemente@im.SERVER.net/142857" password-data)
nil
ELISP> (password-read-from-cache "xmpp:dclemente@im.SERVER.net/142857")
nil
ELISP>