pump-io / pump.io

Social server with an ActivityStreams API
http://pump.io/
Apache License 2.0
2.21k stars 332 forks source link

HTTP Error 401: Unable to get host-meta or host-meta.json #600

Closed danwdart closed 11 years ago

danwdart commented 11 years ago

Whilst trying to access: https://pump.megworld.co.uk/main/remote

oauth logging in, I got:

Error: HTTP Error 401: Unable to get host-meta or host-meta.json at Function.Credentials.register (/home/pump/pump.io/lib/model/credentials.js:161:23) at next (/home/pump/pump.io/node_modules/step/lib/step.js:51:23) at IncomingMessage.DialbackClient.post (/home/pump/pump.io/node_modules/dialback-client/lib/dialbackclient.js:208:21) at IncomingMessage.EventEmitter.emit (events.js:126:20) at IncomingMessage._emitEnd (http.js:366:10) at HTTPParser.parserOnMessageComplete as onMessageComplete at Socket.socketOnData as ondata at TCP.onread (net.js:404:27)

evanp commented 11 years ago
  1. That's a terrible error message. Blech! We should really never dump a stack track to the browser.
  2. I was able to log into Tsyesika's site from e14n.com OK.
  3. I was unable to initiate login using madeup@thoughts.dandart.co.uk.
  4. If I try to login with that address on e14n.com, it spins for a long time and eventually comes up.
  5. I can fetch http://thoughts.dandart.co.uk/.well-known/host-meta.json just fine, though.
  6. But https://thoughts.dandart.co.uk/.well-known/host-meta.json spins for a while.

I think the problem is the HTTPS interface on that server. By default, the Webfinger handling in pump.io tries to get the HTTPS version of the Hostmeta file first, then falls back to HTTP. It looks like something weird is going on with your HTTPS.

danwdart commented 11 years ago

For certain, https://thoughts.dandart.co.uk shouldn't be running a https server at the moment, as it has just been span up.

So you're saying that Tsyesika's site crashed whilst trying to receive this file from my server, assuming that https was the way to go - when there was no https server running but 443 was NOT rejected did it simply time out without trying http?

Certainly I ought to have tls but I don't have a cert for it at the moment. so I'll just hijack dandart.co.uk (which I do have a cert for) fairly soon and put it on there since that's not doing anything useful besides inventing a new HTTP status code.

I'll try again making sure https is not running and see if that helps for this test case.

It looks like https isn't required in the spec but if it is then I obviously tripped up there.

danwdart commented 11 years ago

Just rejecting connections on port 443 and now Tsyesika's server responds with the same error message, only quicker.

danwdart commented 11 years ago

Appears I can however log into https://pumprock.net/ using dan@thoughts.dandart.co.uk

But being a novice at this software I can't find anyone's posts.

evanp commented 11 years ago

If you have an identi.ca account try logging into pump2status.net. That will help you find your identi.ca and statusnet friends on the pump network.

michaelbrunnbauer commented 11 years ago

Got this stack trace in the browser today when trying to follow a user on a different server. It seems that it was caused by a self signed certificate. The error was gone after using an official certificate.