ejabberd - Comments for "Extauth not working" https://www.ejabberd.im/node/5436 en hi Apulo, I am facing same https://www.ejabberd.im/node/5436#comment-59589 <p>hi Apulo,</p> <p>I am facing same error. can you tell me how did you solve that.</p> <p>thanks</p> Thu, 11 Apr 2013 15:16:45 +0000 rajan90 comment 59589 at https://www.ejabberd.im I finally got it working. https://www.ejabberd.im/node/5436#comment-58648 <p>I finally got it working. Thanks for your help!</p> Fri, 11 May 2012 14:42:15 +0000 Apulo comment 58648 at https://www.ejabberd.im mikekaganski wrote: Apulo https://www.ejabberd.im/node/5436#comment-58647 <div class="quote-msg"> <div class="quote-author"><em>mikekaganski</em> wrote:</div> <div class="quote-msg"> <div class="quote-author"><em>Apulo</em> wrote:</div> <p>ejabberd.log:</p> <div class="codeblock"><code>...<br />=ERROR REPORT==== 2012-05-10 16:42:34 ===<br />E(&lt;0.561.0&gt;:extauth:133) : extauth call &#039;[&quot;auth&quot;,&quot;apulo&quot;,&quot;gothicwars.org&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;*******&quot;]&#039; didn&#039;t receive response</code></div> <p>Extauth script log:</p> <div class="codeblock"><code>...<br />May 10 16:42:34 server1 pipe-auth: Command : auth:apulo:gothicwars.org:ae9b4c2f45130a43c6182e51301ea61e ==&gt; 1<br />May 10 16:42:34 server1 pipe-auth: RE:<br />May 10 16:42:34 server1 pipe-auth: OUT: 2</code></div> </div> <div class="quote-msg"> <div class="quote-author"><em>check_mysql.php.txt</em> wrote:</div> <div class="codeblock"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function play()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ret = $this-&gt;command(); // play with data !<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;logg(&quot;RE: &quot; . $ret); // this is what WE send.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;out($ret); // send what we reply.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</code></div> <div class="codeblock"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function command()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(strlen($data[0]) &gt; 0 &amp;&amp; strlen($parms) &gt; 0) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;logg(&quot;Command : &quot;.$data[0].&quot;:&quot;.$parms.&quot; ==&gt; &quot;.$return.&quot; &quot;);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return @pack(&quot;nn&quot;, 2, $return);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</code></div> <div class="codeblock"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function out($message)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @fwrite($this-&gt;stdout, $message); // We reply ...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $dump = @unpack(&quot;nn&quot;, $message);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $dump = $dump[&quot;n&quot;];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;logg(&quot;OUT: &quot;. $dump);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</code></div> </div> <p>Your script messed up the returned value. The Command() has the "1" inside it, but it never returned.<br /> You could have figured it out yourself if inspected logs thoughtfully.</p></div> <p>I'm confused. Isn't this command writing the reply back using php://stdout?<br /> <code>@fwrite($this-&gt;stdout, $message); // We reply ..</code></p> <p>You'll have to forgive my level of experience with this. I'm used to PHP browser based scripting, I'm fairly new to using it to write command line scripts.</p> Fri, 11 May 2012 14:23:57 +0000 Apulo comment 58647 at https://www.ejabberd.im Apulo https://www.ejabberd.im/node/5436#comment-58645 <div class="quote-msg"> <div class="quote-author"><em>Apulo</em> wrote:</div> <p>ejabberd.log:</p> <div class="codeblock"><code>...<br />=ERROR REPORT==== 2012-05-10 16:42:34 ===<br />E(&lt;0.561.0&gt;:extauth:133) : extauth call &#039;[&quot;auth&quot;,&quot;apulo&quot;,&quot;gothicwars.org&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;*******&quot;]&#039; didn&#039;t receive response</code></div> <p>Extauth script log:</p> <div class="codeblock"><code>...<br />May 10 16:42:34 server1 pipe-auth: Command : auth:apulo:gothicwars.org:ae9b4c2f45130a43c6182e51301ea61e ==&gt; 1<br />May 10 16:42:34 server1 pipe-auth: RE:<br />May 10 16:42:34 server1 pipe-auth: OUT: 2</code></div> </div> <div class="quote-msg"> <div class="quote-author"><em>check_mysql.php.txt</em> wrote:</div> <div class="codeblock"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function play()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ret = $this-&gt;command(); // play with data !<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;logg(&quot;RE: &quot; . $ret); // this is what WE send.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;out($ret); // send what we reply.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</code></div> <div class="codeblock"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function command()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(strlen($data[0]) &gt; 0 &amp;&amp; strlen($parms) &gt; 0) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;logg(&quot;Command : &quot;.$data[0].&quot;:&quot;.$parms.&quot; ==&gt; &quot;.$return.&quot; &quot;);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return @pack(&quot;nn&quot;, 2, $return);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</code></div> <div class="codeblock"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function out($message)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @fwrite($this-&gt;stdout, $message); // We reply ...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $dump = @unpack(&quot;nn&quot;, $message);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $dump = $dump[&quot;n&quot;];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;logg(&quot;OUT: &quot;. $dump);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</code></div> </div> <p>Your script messed up the returned value. The Command() has the "1" inside it, but it never returned.<br /> You could have figured it out yourself if inspected logs thoughtfully.</p> Fri, 11 May 2012 00:57:49 +0000 mikekaganski comment 58645 at https://www.ejabberd.im Other clients experience the https://www.ejabberd.im/node/5436#comment-58644 <p>Other clients experience the same issue.<br /> I can log in just fine using odbc auth.<br /> I am using the script located here <a href="http://www.ejabberd.im/check_mysql_php" title="http://www.ejabberd.im/check_mysql_php">http://www.ejabberd.im/check_mysql_php</a> with my own additions to hash the password and check it against a MyBB user database (which is working correctly according to the script logs).</p> <p>ejabberd.log:</p> <div class="codeblock"><code>=INFO REPORT==== 2012-05-10 16:42:12 === D(&lt;0.562.0&gt;:ejabberd_receiver:320) : Received XML on stream = <br />&quot;&lt;auth xmlns=&#039;urn:ietf:params:xml:ns:xmpp-sasl&#039; mechanism=&#039;PLAIN&#039;<br />xmlns:ga=&#039;http://www.google.com/talk/protocol/auth&#039; <br />ga:client-uses-full-bind-result=&#039;true&#039;&gt;AGFwdWxvAGIxbnFsZXk=&lt;/auth&gt;&quot; <p>=INFO REPORT==== 2012-05-10 16:42:12 ===<br />D(&lt;0.562.0&gt;:shaper:61) : State: {maxrate,1000,0,1336686132403522}, Size=183<br />M=91.5, I=94.718</p> <p>=ERROR REPORT==== 2012-05-10 16:42:34 ===<br />E(&lt;0.561.0&gt;:extauth:133) : extauth call &#039;[&quot;auth&quot;,&quot;apulo&quot;,&quot;gothicwars.org&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;*******&quot;]&#039; didn&#039;t receive response</p></code></div> <p>Extauth script log:</p> <div class="codeblock"><code>May 10 16:42:34 server1 pipe-auth: Starting pipe-auth ...<br />May 10 16:42:34 server1 pipe-auth: Reading 33 bytes ...<br />May 10 16:42:34 server1 pipe-auth: IN: auth:apulo:gothicwars.org:*******<br />May 10 16:42:34 server1 pipe-auth: GO: auth:apulo:gothicwars.org:*******<br />May 10 16:42:34 server1 pipe-auth: data length is : 33<br />May 10 16:42:34 server1 pipe-auth: MySQL :: Connected<br />May 10 16:42:34 server1 pipe-auth: Command was : auth<br />May 10 16:42:34 server1 pipe-auth: MySQL :: Connected<br />May 10 16:42:34 server1 pipe-auth: Command : auth:apulo:gothicwars.org:ae9b4c2f45130a43c6182e51301ea61e ==&gt; 1<br />May 10 16:42:34 server1 pipe-auth: RE:<br />May 10 16:42:34 server1 pipe-auth: OUT: 2</code></div> Thu, 10 May 2012 22:19:19 +0000 Apulo comment 58644 at https://www.ejabberd.im Could you try to login using https://www.ejabberd.im/node/5436#comment-58643 <p>Could you try to login using another client?<br /> Could you try to login using another auth method (to confirm correct client and server configuration)?<br /> Could you confirm that your extauth script follows the <noindex><a href="https://git.process-one.net/ejabberd/mainline/blobs/raw/2.1.x/doc/dev.html#htoc9" rel="nofollow" >specifications</a></noindex>?<br /> Could you show the relevant excerpt of ejabberd log in debug level?<br /> <noindex><a href="http://www.catb.org/~esr/faqs/smart-questions.html" rel="nofollow" >How To Ask questions The Smart Way</a></noindex></p> Thu, 10 May 2012 21:54:02 +0000 mikekaganski comment 58643 at https://www.ejabberd.im