[JDEV] JUD having problems loading global.xdb info after server restart. ..

Jason Anderson jason at guanosoft.org
Wed Aug 7 16:06:30 CDT 2002


John,

Your issue sounds familiar, I just answered this question on jadmin.  I 
believe it's because you are running jud in a separate process.  A 
workaround is to run it in-process with your main jabberd.  See my post 
today: http://mailman.jabber.org/pipermail/jadmin/2002-August/006372.html

Of course, fixing it would be great!  I agree with you that x is going 
to be null, but I don't know what this affects unless I look at the 
calling method.  Have you tried commenting out the call to xmlnode.free 
to see if it works?

jason

CROSSWHITE,JOHN (Non-HP-Corvallis,ex1) wrote:
> Hello everyone.  I'm running jabber1.4.2 and jud0.4 on redhat 7.2.
> 
>  
> 
> Here is the behavior I'm experiencing:
> 
>  
> 
> Start jabberd.
> 
> Start a client and connect.
> 
> Register with the jud.
> 
> Perform a search and my jud entry can be found.
> 
> Restart server.
> 
> Start a client and connect.
> 
> Perform a search and my jud entry cannot be found.
> 
>  
> 
> If I reregister, the ./spool/jud/global.xdb file is updated correctly 
> without being overwritten.  However, if I perform a search, I can only 
> find users that have registered since the last server restart.  Even 
> though their entries are still in the global.xdb file.
> 
>  
> 
> So, I went digging into the code.  I think the culprit may be xdb_get 
> and I wanted to see what you guys thought.  In the file xdb.c find the 
> function xdb_get.  It would appear that this function ALWAYS returns 
> null.  And this may be the reason why the information in global.xdb 
> isn't being loaded correctly.
> 
>  
> 
> Here is a copy of what I think the offending code is:
> 
>  
> 
>     /* return the xmlnode inside <xdb>...</xdb>  */
> 
>     for(x = xmlnode_get_firstchild(newx.data); x != NULL && 
> xmlnode_get_type(x) != NTYPE_TAG; x = xmlnode_get_nextsibling(x));
> 
>  
> 
>     /* there were no children (results) to the xdb request, free the 
> packet */
> 
>     if(x == NULL)
> 
>         xmlnode_free(newx.data);
> 
>  
> 
>     return x;
> 
>  
> 
> The for loop will always ensure that x is NULL after it has run.  
> Therefore, the return x statement is always going to return NULL.  Am I 
> incorrect in my interpretation?  Wouldn't this break loading of the 
> global.xdb file?
> 
>  
> 
> Thanks for any information you might be able to provide.  I've been 
> banging my head against this for a few days now.
> 
>  
> 
> John Crosswhite
> 
>  
> 





More information about the JDev mailing list