-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth and debug fail #2
Comments
So I changed up the logging path to /tmp/xmpp.log and I'm getting:
When I use the same username and password (as configured in cPanel) in Adium, I can connect no issue. |
So I was able to get around the auth issues by changing:
To:
....to avoid SASL issues. Still getting:
...the number of which those Error: lines occur is directly related to the number of recipients specified |
Sorry for not seeing this one a when it was initially filed. Maybe my email filtering is too aggressive. Will try to investigate this soon. |
No worries - if it helps we are trying to auth through to our ejabberd servers... |
My server is also running ejabberd. I saw similar issues while building this related to not initially passing in the 'component name', which is why I added that as an option. You'll get mysterious auth failures in Net::XMPP when not passing in a component name that matches what ejabberd thinks the node's hostname is. The only way I got reliable debugging info to realize this was by upping the loglevel in ejabberd then tailing the log on the server (Net::XMPP's debugging is next to useless). Oddly, for me there wasn't even any misconfiguration on the server side -- Net::XMPP just wasn't sending in the correct hostname without also sending in the component name. Supposedly this doesn't happen with other XMPP servers, but who knows? Anyways, let me know if that helps. Otherwise, is this a public XMPP server (can I register an account there so that I can send messages to myself and further debug the issue)? |
It is a private server but its federated. Updated my primary XMPP.pm to the latest and enabled debugging which now does give some further details:
I've set component name to the FQDN of the host... SRV are good we are fully federated |
ejabberd side:
|
and cpanel side debug level 2:
I know for a fact my auth is correct, ive used the credentials to login via adium |
Definitely seems like I'm on the right track RE the component name issue I referenced since the server side seemed to indicate 'host-unknown'. There just has to be some other piece of the puzzle that causes these failures that I'm missing. Hopefully the additional details here should allow me to tweak my testing ejabberd server to simulate the failures and work on a fix, probably this weekend. |
Just as a note, if I leave component blank, I no longer get host unknowns, I just get auth failures. My last reply with level 2 debugging is with the plugin using SRV records (no hardcoded component) What version of ejabberd are you running (we're on ejabberd-16.09) and perhaps what necessary config do you have? |
16.09-4 is my ejabberd version. As to the "necessary" configuration, I wouldn't know. I use c2s with starttls on port 5222, but I'd figure that's pretty standard. My auth method is set to 'internal'. Nothing I'd figure that is out of the ordinary. |
Thats all the same here as well... I'll keep an eye on the project, maybe something silly... Thanks for the feedback, if you're on IRC (I'm on freenode) we could collab a bit |
I can successfully reproduce the issue now after fiddling with things a bit. Not quite sure what I did yet, but I should be able to get to the bottom of it and push a fix up soon :D |
Whatever this is, it appears to end with a socket error after which my Jabber server restarts (had to set loglevel to '5' to get this): Otherwise, I've corrected the error handling -- it at least properly gives you the less nonsensical error message of 'not-authorized' now. From what I can tell, it is getting a request for auth , which the server responds with and we send , which seems right, but then it repeats a challenge a second time, which we issue a blank to. At that point the server returns a failure notice. Ugh. Will continue investigation this weekend. |
Apparently the systemd service definition I had for ejabberd was acting up and sending SIGTERM to it over and over again. Was a red herring. Real issue seems to be related to it preferring to use DIGEST-MD5 even though it's obsolete. Since I'm preferring STARTTLS anyways, using PLAIN or SCRAM would be fine, I think... though Net::XMPP doesn't appear to have any accessors for indicating your preference there. Gonna have to dig through Authen::SASL a bit I think. |
Confirmed that this is a bug, though I can't be sure whether it is with Net::XMPP or ejabberd. In any case, when Net::XMPP encounters failures from an auth method, it does not attempt to use any of the other advertised login methods (like PLAIN), as setting 'disable_sasl_mechanisms: "DIGEST-MD5"' in my ejabberd.yml configuration file fixes the issue on my server. The way I intend to handle this is to rewrite the symbols in Net::XMPP local to the _send function in order to have it fall back to using PLAIN when it fails. From what I can tell, libpurple issues a self-terminating XML tag as the second part of the challenge asked for here: https://wiki.xmpp.org/web/SASLandDIGEST-MD5 Whereas Net::XMPP issues a tag that is simply bereft of content on the interior. Either one of these should be OK to do, but it is the only visible difference in what gets sent to the server from libpurple versus Net::XMPP. This could be a parsing bug in ejabberd, not sure. |
Also adds notice to readme about current known incompatibility
I enabled debug to see why I wasn't receiving notifications and the following is the result when I create a dummy account to fire off a notification:
Edit: make test and make install worked without incident when installing
The text was updated successfully, but these errors were encountered: