sijugeorge87 / jaxl

Automatically exported from code.google.com/p/jaxl
GNU General Public License v3.0
0 stars 0 forks source link

Jaxl Authorization Problem #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. cannot get the authorization.
2.
3.

What is the expected output? What do you see instead?
To run a echobot but not get the authorization part doAuth Function not working.

What version of the product are you using? On what operating system?
linux fedora redhat os.

Linux C0210217 2.6.25-14.fc9.i686 #1 SMP Thu May 1 06:28:41 EDT 2008 i686 i686 
i386 GNU/Linux

jaxl:
abhinavsingh-JAXL-f049d08

Php version:
5.2.9

Apache Version:
Apache/2.2.8 (Fedora) 
Please provide any additional information below.

Original issue reported on code.google.com by premnath...@gmail.com on 3 Jan 2011 at 12:05

Attachments:

GoogleCodeExporter commented 9 years ago
To test a few things out i started by connecting to matrimony.net:5222. But 
seems like it is down and couldn't connect to it.

Further jaxl.log shows that jaxl library sent startTLS packet but a response 
wasn't received. Can you check the server logs if you have access to them.

Finally i would recommend downloading the latest Jaxl from github and test 
using that again. Kindly let me know

Original comment by mailsfor...@gmail.com on 3 Jan 2011 at 3:31

GoogleCodeExporter commented 9 years ago
Thank you for your response .
soon i will check the log files and say about the status .

Original comment by premnath...@gmail.com on 3 Jan 2011 at 4:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Dear abi,
I have installed ejabber server in my localhost machine .Still i am not able to 
get the authentication request.

System Details
***************
vi /etc/sysconfig/network
    HOSTNAME=localhost.localdomain

vi /etc/hosts
127.0.0.1 localhost localhost.localdomain

jaxl Details
=============
/usr/share/php/jaxl/app/echobot/

I have changed the jaxl.ini file

jaxl.ini File Changes 
************************
 // Connecting user credentials
    define('JAXL_USER_NAME', 'marry');
    define('JAXL_USER_PASS', 'password');

    // Connecting jabber server details
    define('JAXL_HOST_NAME', 'localhost');
    define('JAXL_HOST_PORT', 5222);
    define('JAXL_HOST_DOMAIN', 'localhost');

jaxl echobot.php
*****************
[4386] 2011-01-04 16:54:10 - Registering shutdown for SIGH Terms ...
[4386] 2011-01-04 16:54:10 - Openssl enabled ...
[4386] 2011-01-04 16:54:10 - Socket opened to the jabber host localhost:5222 ...
[4386] 2011-01-04 16:59:10 - Memory usage: 0.61 Mb, peak: 0.62 Mb

Network Details
****************
netstat -an | grep -E "5222|5269"
tcp        0      0 0.0.0.0:5222                0.0.0.0:*                   
LISTEN      
tcp        0      0 0.0.0.0:5269                0.0.0.0:*                   
LISTEN      
tcp        0      0 127.0.0.1:5222              127.0.0.1:40685             
FIN_WAIT2   
tcp        0      0 127.0.0.1:40685             127.0.0.1:5222              
CLOSE_WAIT 

I can connect the user (marry) by gajim in my linux system.The same user 
displays online in my ejabber server.

Why jaxl does not make the user into the online status.?

I have enclosed the log files for further verfification.
Kindly check it and revert me.

Did i missed some configuration in jaxl?
Because my ejabber is working fine when i connect the user  in gajim.

Thank you,

Regards,
Prem

Original comment by premnath...@gmail.com on 4 Jan 2011 at 11:49

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Prem,

This is quite strange. Seems like you have downloaded an unstable version of 
the package from github (remember: github repo is for development and MIGHT 
contain unstable code at times)

Your jaxl.log also suggests that used Jaxl version of library is a bit old. 
Kindly help yourself by downloading the latest by clicking this: 
https://github.com/abhinavsingh/JAXL/tarball/master . This version of dev 
branch will also lead to release of Jaxl-2.1.2.

Here is how to test out the echobot.php:
1. Open downloaded /path/to/jaxl/app/echobot.php
2. Configure Jaxl instance by editing this part:

$jaxl = new JAXL(array(
        'user'=>'',
        'pass'=>'',
        'host'=>'talk.google.com',
        'domain'=>'gmail.com',
        'authType'=>'PLAIN',
        'autoSubscribe'=>true,
        'pingInterval'=>60,
        'logLevel'=>4
    ));

3. Optionally you can also just do:

require_once "/path/to/your/jaxl.ini";
require_once "/path/to/jaxl/core/jaxl.class.php";
$jaxl = new JAXL();

and Jaxl core will read your settings from jaxl.ini if not passed via to the 
constructor.

4. Finally run echobot.php as follows:

cd /path/to/jaxl/app/
php echobot.php

NOTE: Running your apps using "jaxl echobot.php" has been deprecated inside 
current version of the dev branch.

Meanwhile i will also download and test the version of Jaxl library you are 
using, to make sure it's just a problem with unstable state of that particular 
dev branch commit.

Kindly let me know.

Original comment by mailsfor...@gmail.com on 4 Jan 2011 at 1:49

GoogleCodeExporter commented 9 years ago
Dear abi,

Thank you for guiding me to the right direction .I have downloaded the files 
but still getting some issues in jaxl. 

File Details 
=============
/env/jaxl.ini

  // Connecting user credentials
    define('JAXL_USER_NAME', 'admin');
    define('JAXL_USER_PASS', 'password');

    // Pre-choose an auth mechanism to be performed
    define('JAXL_AUTH_TYPE', 'DIGEST-MD5');

    // Connecting jabber server details
    define('JAXL_HOST_NAME', 'localhost');
    define('JAXL_HOST_PORT', 5222);
    define('JAXL_HOST_DOMAIN', 'localhost');

Error:
=======
php echobot.php 
PHP Warning:  Call-time pass-by-reference has been deprecated in 
/home/prem/jaxl_test/abhinavsingh-JAXL-af875ce/xmpp/xmpp.class.php on line 293
PHP Warning:  Call-time pass-by-reference has been deprecated in 
/home/prem/jaxl_test/abhinavsingh-JAXL-af875ce/xmpp/xmpp.class.php on line 293
PHP Warning:  Call-time pass-by-reference has been deprecated in 
/home/prem/jaxl_test/abhinavsingh-JAXL-af875ce/xmpp/xmpp.class.php on line 293
PHP Warning:  Call-time pass-by-reference has been deprecated in 
/home/prem/jaxl_test/abhinavsingh-JAXL-af875ce/xmpp/xmpp.class.php on line 384
PHP Warning:  Call-time pass-by-reference has been deprecated in 
/home/prem/jaxl_test/abhinavsingh-JAXL-af875ce/xmpp/xmpp.class.php on line 384
PHP Warning:  Call-time pass-by-reference has been deprecated in 
/home/prem/jaxl_test/abhinavsingh-JAXL-af875ce/xmpp/xmpp.class.php on line 384
[[XMPPGet]] Unable to complete SASL Auth, see logs for detail...

System Details
==============
hostname
localhost.localdomain

vi /etc/hosts/
127.0.0.1       localhost localhost.localdomain 

Users in Ejabber Server
========================
admin@localhost

Here i have attached the log file for jaxl.

Thankyou,

With Regards,
Prem

Original comment by premnath...@gmail.com on 4 Jan 2011 at 3:04

Attachments:

GoogleCodeExporter commented 9 years ago
Did you remove config parameter array from jaxl constructor inside echobot.php 
file? If you want Jaxl core to read your options from jaxl.ini you should only 
do new JAXL(); inside echobot.php, so simply remove the array passed to Jaxl 
constructor if you already haven't. From the log file seems like you have a 
wrong password or username....

For more debug, after new JAXL(); simply do a var_dump($jaxl); to check if Jaxl 
have right options set before calling $jaxl->startCore('stream');

Original comment by mailsfor...@gmail.com on 4 Jan 2011 at 5:58

GoogleCodeExporter commented 9 years ago
Dear abi,

As you said i have commented the gtalk array and included the jaxl.ini file .
It shows that every thing is fine .But could not able to make my id in online.

Which xep will make the jabber id in online .?

Here is the list specified in

var_dump($jaxl)
================

php echobot.php

PHP Warning:  Call-time pass-by-reference has been deprecated in 
/home/prem/jaxl_test/abhinavsingh-JAXL-af875ce/xmpp/xmpp.class.php on line 293
PHP Warning:  Call-time pass-by-reference has been deprecated in 
/home/prem/jaxl_test/abhinavsingh-JAXL-af875ce/xmpp/xmpp.class.php on line 293
PHP Warning:  Call-time pass-by-reference has been deprecated in 
/home/prem/jaxl_test/abhinavsingh-JAXL-af875ce/xmpp/xmpp.class.php on line 293
PHP Warning:  Call-time pass-by-reference has been deprecated in 
/home/prem/jaxl_test/abhinavsingh-JAXL-af875ce/xmpp/xmpp.class.php on line 384
PHP Warning:  Call-time pass-by-reference has been deprecated in 
/home/prem/jaxl_test/abhinavsingh-JAXL-af875ce/xmpp/xmpp.class.php on line 384
PHP Warning:  Call-time pass-by-reference has been deprecated in 
/home/prem/jaxl_test/abhinavsingh-JAXL-af875ce/xmpp/xmpp.class.php on line 384
object(JAXL)#1 (58) {
  ["config"]=>
  array(0) {
  }
  ["user"]=>
  string(5) "admin"
  ["pass"]=>
  string(5) "admin"
  ["host"]=>
  string(9) "localhost"
  ["port"]=>
  int(5222)
  ["jid"]=>
  bool(false)
  ["bareJid"]=>
  string(15) "admin@localhost"
  ["domain"]=>
  string(9) "localhost"
  ["resource"]=>
  string(17) "jaxl.1.1294211484"
  ["roster"]=>
  array(0) {
  }
  ["trackPresence"]=>
  bool(true)
  ["autoSubscribe"]=>
  bool(false)
  ["logLevel"]=>
  int(4)
  ["logRotate"]=>
  bool(false)
  ["logPath"]=>
  string(17) "/var/log/jaxl.log"
  ["pidPath"]=>
  string(17) "/var/run/jaxl.pid"
  ["sigh"]=>
  bool(true)
  ["pid"]=>
  int(11590)
  ["mode"]=>
  string(3) "cli"
  ["authType"]=>
  string(10) "DIGEST-MD5"
  ["dumpStat"]=>
  int(300)
  ["features"]=>
  array(3) {
    [0]=>
    string(37) "http://jabber.org/protocol/disco#info"
    [1]=>
    string(38) "http://jabber.org/protocol/disco#items"
    [2]=>
    string(13) "jabber:x:data"
  }
  ["category"]=>
  string(6) "client"
  ["type"]=>
  string(3) "bot"
  ["lang"]=>
  string(2) "en"
  ["tmpPath"]=>
  string(4) "/tmp"
  ["ip"]=>
  string(9) "127.0.0.1"
  ["openSSL"]=>
  bool(true)
  ["instances"]=>
  array(2) {
    ["xmpp"]=>
    array(1) {
      [0]=>
      object(JAXL)#1 (58) {
        ["config"]=>
        array(0) {
        }
        ["user"]=>
        string(5) "admin"
        ["pass"]=>
        string(5) "admin"
        ["host"]=>
        string(9) "localhost"
        ["port"]=>
        int(5222)
        ["jid"]=>
        bool(false)
        ["bareJid"]=>
        string(15) "admin@localhost"
        ["domain"]=>
        string(9) "localhost"
        ["resource"]=>
        string(17) "jaxl.1.1294211484"
        ["roster"]=>
        array(0) {
        }
        ["trackPresence"]=>
        bool(true)
        ["autoSubscribe"]=>
        bool(false)
        ["logLevel"]=>
        int(4)
        ["logRotate"]=>
        bool(false)
        ["logPath"]=>
        string(17) "/var/log/jaxl.log"
        ["pidPath"]=>
        string(17) "/var/run/jaxl.pid"
        ["sigh"]=>
        bool(true)
        ["pid"]=>
        int(11590)
        ["mode"]=>
        string(3) "cli"
        ["authType"]=>
        string(10) "DIGEST-MD5"
        ["dumpStat"]=>
        int(300)
        ["features"]=>
        array(3) {
          [0]=>
          string(37) "http://jabber.org/protocol/disco#info"
          [1]=>
          string(38) "http://jabber.org/protocol/disco#items"
          [2]=>
          string(13) "jabber:x:data"
        }
        ["category"]=>
        string(6) "client"
        ["type"]=>
        string(3) "bot"
        ["lang"]=>
        string(2) "en"
        ["tmpPath"]=>
        string(4) "/tmp"
        ["ip"]=>
        string(9) "127.0.0.1"
        ["openSSL"]=>
        bool(true)
        ["instances"]=>
        array(2) {
          ["xmpp"]=>
          array(1) {
            [0]=>
            *RECURSION*
          }
          ["http"]=>
          array(0) {
          }
        }
        ["auth"]=>
        bool(false)
        ["sessionRequired"]=>
        bool(false)
        ["secondChallenge"]=>
        bool(false)
        ["lastid"]=>
        int(1)
        ["stream"]=>
        bool(false)
        ["streamId"]=>
        bool(false)
        ["streamHost"]=>
        bool(false)
        ["streamVersion"]=>
        bool(false)
        ["streamENum"]=>
        bool(false)
        ["streamEStr"]=>
        bool(false)
        ["streamTimeout"]=>
        int(20)
        ["streamBlocking"]=>
        int(1)
        ["buffer"]=>
        string(0) ""
        ["obuffer"]=>
        string(0) ""
        ["startTime"]=>
        int(1294211484)
        ["clock"]=>
        int(0)
        ["clocked"]=>
        int(1294211484)
        ["rateLimit"]=>
        bool(true)
        ["lastSendTime"]=>
        bool(false)
        ["sendRate"]=>
        float(0.4)
        ["getPktSize"]=>
        int(4096)
        ["getSelectSecs"]=>
        int(5)
        ["getSelectUsecs"]=>
        int(0)
        ["totalRcvdPkt"]=>
        int(0)
        ["totalRcvdSize"]=>
        int(0)
        ["totalSentPkt"]=>
        int(0)
        ["totalSentSize"]=>
        int(0)
        ["uid"]=>
        int(1)
        ["xml"]=>
        object(XML)#2 (1) {
          ["valid"]=>
          bool(false)
        }
      }
    }
    ["http"]=>
    array(0) {
    }
  }
  ["auth"]=>
  bool(false)
  ["sessionRequired"]=>
  bool(false)
  ["secondChallenge"]=>
  bool(false)
  ["lastid"]=>
  int(1)
  ["stream"]=>
  bool(false)
  ["streamId"]=>
  bool(false)
  ["streamHost"]=>
  bool(false)
  ["streamVersion"]=>
  bool(false)
  ["streamENum"]=>
  bool(false)
  ["streamEStr"]=>
  bool(false)
  ["streamTimeout"]=>
  int(20)
  ["streamBlocking"]=>
  int(1)
  ["buffer"]=>
  string(0) ""
  ["obuffer"]=>
  string(0) ""
  ["startTime"]=>
  int(1294211484)
  ["clock"]=>
  int(0)
  ["clocked"]=>
  int(1294211484)
  ["rateLimit"]=>
  bool(true)
  ["lastSendTime"]=>
  bool(false)
  ["sendRate"]=>
  float(0.4)
  ["getPktSize"]=>
  int(4096)
  ["getSelectSecs"]=>
  int(5)
  ["getSelectUsecs"]=>
  int(0)
  ["totalRcvdPkt"]=>
  int(0)
  ["totalRcvdSize"]=>
  int(0)
  ["totalSentPkt"]=>
  int(0)
  ["totalSentSize"]=>
  int(0)
  ["uid"]=>
  int(1)
  ["xml"]=>
  object(XML)#2 (1) {
    ["valid"]=>
    bool(false)
  }
}

jaxl.ini file
=============
   // Connecting user credentials
    define('JAXL_USER_NAME', 'admin');
    define('JAXL_USER_PASS', 'admin');

    // Pre-choose an auth mechanism to be performed
    define('JAXL_AUTH_TYPE', 'DIGEST-MD5');

    // Connecting jabber server details
    define('JAXL_HOST_NAME', 'localhost');
    define('JAXL_HOST_PORT', 5222);
    define('JAXL_HOST_DOMAIN', 'localhost');

The program gets keep on running in my terminal .

But my ejabber server does not make my id in online.If i login the same id in 
gajim it shows in online.

Here i have attached the jaxllog file for more details.

Thank you,

With Regards,
Prem

Original comment by premnath...@gmail.com on 5 Jan 2011 at 12:26

GoogleCodeExporter commented 9 years ago
Hi Premnath,

As per the jaxl.log you sent me via email seems like you have resolved this 
issue. Kindly reopen if the problem still exists.

Original comment by mailsfor...@gmail.com on 18 Jan 2011 at 10:43

GoogleCodeExporter commented 9 years ago
Dear abi,
  The issue 30 is not same as issue 29.Issue 29 is solved .If you want to reopen the issue 29.?

Thank you 

Original comment by premnath...@gmail.com on 18 Jan 2011 at 11:20

GoogleCodeExporter commented 9 years ago
I found what causes the call-time pass-by-reference deprecated errors, they can 
be turned off:
http://forums.kayako.com/threads/php-warning-call-time-pass-by-reference-has-bee
n-deprecated.3839/

Original comment by donjohn....@gmail.com on 16 Jun 2011 at 2:08