Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to configure sendxmpp on my ubuntu server 12.04 LTS to use it to send notification from Munin/monitoring to Gtalk.

Installed the app with the following:

$ sudo apt-get install sendxmpp

try to do some test/chat, but its failed to do some with some error below:

$ echo "This is a gtalk test" | sendxmpp -t -u user1 -o gmail.com -p pa55word user2@gmail.com

Use of uninitialized value $args{"file"} in lc at /usr/share/perl5/Net/XMPP/Debug.pm line 154.

I dont have any clue what actually the error is about:

"Use of uninitialized value $args{"file"} in lc at /usr/share/perl5/Net/XMPP/Debug.pm line 154."

Even execute help command shown this error:

$ sendxmpp --help

Use of uninitialized value $args{"file"} in lc at /usr/share/perl5/Net/XMPP/Debug.pm line 154.
sendxmpp version 1.22
Copyright (c) 2004 - 2005 Dirk-Jan C. Binnema
Copyright (c) 2006 - 2007 Lubomir Host 'rajo'
usage: sendxmpp [options] <recipient1> [<recipient2> ...]
or refer to the the sendxmpp manpage

Possibly some kind of bug?

share|improve this question
    
That looks like a non-fatal warning. I'm assuming that the message doesn't get delivered? Has user1 been added to user2's roster? –  mgorven Jul 13 '12 at 4:57
    
its already added, but still no message :( –  Ludwig Jul 13 '12 at 7:07
add comment

1 Answer

up vote 3 down vote accepted

The "uninitialized value" message is a harmless warning; you can ignore it.

It seems that sendxmpp doesn't look at SRV records, and so you need to explicitly tell it to connect to talk.google.com. You also need to make sure that user1 is in user2's roster (i.e. you've sent and accepted a contact request).

It's also better to store the password in the configuration file instead of specifying it on the command line. Enter the following in ~/.sendxmpprc and chmod the file 600:

user1@gmail.com;talk.google.com     pa55word    gmail.com

You should then be able to send messages with sendxmpp -t user2@gmail.com.

share|improve this answer
    
Ok, got it, its working now. Thanks –  Ludwig Jul 13 '12 at 7:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.