xmpp setup

edited October 2010 in General
Hi,

I have both statusnet and openfire running on the same machine. statusnet is configured for xmpp like this:

$config['xmpp']['enabled'] = true;
$config['xmpp']['server'] = 'example.com'; # XMPP server name
$config['xmpp']['host'] = 'xmpp.example.com'; # Only set if different from server
$config['xmpp']['port'] = 5222;
$config['xmpp']['user'] = 'bot'; # set to what ever user name is registered on XMPP server
$config['xmpp']['encryption'] = true;
$config['xmpp']['resource'] = 'xmppbot';
$config['xmpp']['password'] = 'verysecret';
$config['xmpp']['debug'] = false;
$config['queue']['enabled'] = true;

Auth backend for statusnet and openfire is LDAP. The user "bot" exists in the LDAP database. I added bot@example.com to my XMPP buddies. If in statusnet I go to Connect -> IM, I can add my JID, but never get notified from my XMPP client, and statusnet simply says: "Awaiting confirmation on this address. Check your Jabber/GTalk account for a message with further instructions. (Did you add bot@example.com to your buddy list?)"

Any thoughts?

Comments

  • @kampfflunder are you running the xmpp daemons too?
  • @jordanc Yep:

    xmpp:~ # ps ax | grep php
    6434 pts/6 S+ 0:00 grep php
    25426 pts/1 S 9:33 php /srv/www/statusnet-0.9.5/scripts/xmppdaemon.php
    31120 pts/1 S 0:00 php /srv/www/statusnet-0.9.5/scripts/queuedaemon.php
    31121 pts/1 S 16:32 php /srv/www/statusnet-0.9.5/scripts/queuedaemon.php
    31128 pts/1 S 0:00 php /srv/www/statusnet-0.9.5/scripts/xmppdaemon.php
    31131 pts/1 S 9:36 php /srv/www/statusnet-0.9.5/scripts/xmppdaemon.php
    xmpp:~ #
  • @kampfflunder hmm, when you run the daemon with debug true it should spit stuff to stdout, what do you see?

    also you have the daemon running four times, is should only be running once.

    $config['xmpp']['server'] = 'example.com'; # XMPP server name
    $config['xmpp']['host'] = 'xmpp.example.com'; # Only set if different from server

    whats all that about? do you have an xmpp server? I would suggest setting up http://prosody.im its easy and its what we use here at status.net
  • @aric
    Thank you for your comments. I was not aware about how to debug the xmpp part. Anyway, here it is:

    1286527067 [INFO]: Connecting to tcp://xmpp.example.com:5222
    1286527067 [VERBOSE]: Socket is ready; send it.
    1286527067 [VERBOSE]: SENT: <stream:stream to="example.com" xmlns:stream="http://etherx.jabber.org/streams"; xmlns="jabber:client" version="1.0">
    1286527067 [VERBOSE]: Successfully sent 117 bytes.
    1286527067 [VERBOSE]: RECV: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams"; xmlns="jabber:client" from="example.com" id="552a1d0c" xml:lang="en" version="1.0"><stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism></mechanisms></stream:features>
    1286527067 [DEBUG]: Calling features_handler
    1286527067 [INFO]: Attempting Auth...
    1286527067 [VERBOSE]: Socket is ready; send it.
    1286527067 [VERBOSE]: SENT: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>XXX==</auth>
    1286527067 [VERBOSE]: Successfully sent 92 bytes.
    1286527067 [VERBOSE]: RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
    1286527067 [DEBUG]: Calling sasl_success_handler
    1286527067 [INFO]: Auth success!
    1286527067 [VERBOSE]: Socket is ready; send it.
    1286527067 [VERBOSE]: SENT: <stream:stream to="example.com"" xmlns:stream="http://etherx.jabber.org/streams"; xmlns="jabber:client" version="1.0">
    1286527067 [VERBOSE]: Successfully sent 117 bytes.
    1286527067 [VERBOSE]: RECV: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams"; xmlns="jabber:client" from="example.com" id="552a1d0c" xml:lang="en" version="1.0"><stream:features></stream:features>
    1286527067 [DEBUG]: Calling features_handler
    1286527067 [INFO]: Attempting Auth...
    1286527067 [VERBOSE]: Socket is ready; send it.
    1286527067 [VERBOSE]: SENT: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>XXX==</auth>
    1286527067 [VERBOSE]: Successfully sent 92 bytes.
    1286527067 [VERBOSE]: RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
    1286527067 [DEBUG]: Calling sasl_success_handler
    1286527067 [INFO]: Auth success!
    1286527067 [VERBOSE]: Socket is ready; send it.
    1286527067 [VERBOSE]: SENT: <stream:stream to="example.com" xmlns:stream="http://etherx.jabber.org/streams"; xmlns="jabber:client" version="1.0">
    1286527067 [VERBOSE]: Successfully sent 117 bytes.
    1286527067 [VERBOSE]: RECV: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams"; xmlns="jabber:client" from="example.com" id="552a1d0c" xml:lang="en" version="1.0"><stream:features></stream:features>
    1286527067 [DEBUG]: Calling features_handler
    1286527067 [INFO]: Attempting Auth...
    1286527067 [VERBOSE]: Socket is ready; send it.
    1286527067 [VERBOSE]: SENT: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>XXX==</auth>
    1286527067 [VERBOSE]: Successfully sent 92 bytes.
    1286527067 [VERBOSE]: RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
    1286527067 [DEBUG]: Calling sasl_success_handler
    1286527067 [INFO]: Auth success!

    Then, the part from "Attempting auth" until "Calling features_handler" repeats endless.
    Note that my xmpp domain is example.com, while the xmpp server is xmpp.example.com (it is the same machine where status.net is running) Auth backend for both xmpp and status.net is an LDAP server meaning that I do not have any local users.
    In the log, "XXX" replaces a unique string - I do not know if this original string contains sensitive information, therefore I'v replaced it with "XXX".
    The xmpp server software is openfire (http://www.igniterealtime.org/projects/openfire/)

    You say there must be only one running daemon. All these daemons were fired up by scripts/startdaemons.sh - am I doing something wrong here?
  • I'm seeing this same behavior against openfire 3.7.0beta.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID