0

I've tried to set up my prosody xmpp-server (more exactly: I migrated from a different machine with some really outdated version)

Most stuff works fine. Apart from mod_http_file_share that is.

If I open it in my browser, anything looks okay.

Looking over the config, I now have removed pretty much anything that could have posed problems.

But it just doesn't connect - most clients don't even detect some timeout or similar (it just wait's in "transmitting" until the server connection is closed).

I've tried to watch the XML-console in gajim, to find the source of the problem, but all I'm ever encountering is some call to retrieve the "slot"-identifier for that upload. That never get's some response, so the actual upload isn't even started.

Couldn't find any documentation apart from the prosody-page for that module, so I'm pretty sure there shouldn't be anything to activate/enable besides

VirtualHost "g33ky.de"
disco_items = {
    { "chat.g33ky.de", "file sharing service" },
}
Component "chat.g33ky.de" "http_file_share"
http_file_share_size_limit = 31 * 24 * 60 * 60
http_file_share_daily_quota = 100*1024*1024

well, that and adding some certs (I got those from certbot/letsencrypt, via NGinx - but that only responds on ports 80/443 and forwards https-trafic to 5281)

2 Answers2

0

The issue is probably that your clients are unable to discover the upload service because it is on a different domain. Prosody will automatically advertise services on direct subdomains to clients (e.g. upload.chat.g33ky.de would automatically be advertised on chat.g33ky.de) so clients can discover available services.

When you have a service on an entirely different domain, you need to tell Prosody that you want to link to it from your main domain. This is done using the disco_items option.

It looks like your configuration is already close to correct, except that you listed "chat.g33ky.de" as an item of itself. Simply change this to "upload.example.org" to tell clients the correct domain for your upload service.

Corrected example:

VirtualHost "chat.g33ky.de"
  disco_items = {
    { "upload.example.org", "file sharing service" },
  }

Component "upload.example.org" "http_file_share"
  http_file_share_size_limit = 31 * 24 * 60 * 60
  http_file_share_daily_quota = 100*1024*1024
MattJ
  • 91
  • 1
  • 5
  • yeah, sorry - that was just me messing up the example code. (edited now) Clients actually do discover the service and read the file-share-size-limit correclty. – Dr. Azrael Tod Jan 12 '23 at 10:20
  • Looks like the config in your is still slightly wrong ("upload.g33ky.de" vs "chat.g33ky.de"). – MattJ Jan 12 '23 at 10:26
  • yes, it was - I noticed it too, right while you were typing that :D There's no upload.g33ky.de ever in my real config – Dr. Azrael Tod Jan 12 '23 at 10:32
0

okay, there actually was like half a dozen problems at once

the main ones were:

  1. I was migrating from some really old prosody-version, with slightly different db-layout
  2. db was some sqlite-file I copied from my old server
  3. prosody couldn't write some things to that sqlite file, because while the file itself was writeable, the folder it was placed in, wasn't
  4. one of those things that did give write errors, was something needed to get file-transmission started

I should have read the logs more carefully - there were actual write errors in there.

Thanks to MattJ and Menel‎ (from the prosody muc) for helping me figure that out