Score:0

Prosody never calls http_file_share

tc flag

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)

Score:0
jp flag

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
Dr. Azrael Tod avatar
tc flag
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.
MattJ avatar
jp flag
Looks like the config in your is still slightly wrong ("upload.g33ky.de" vs "chat.g33ky.de").
Dr. Azrael Tod avatar
tc flag
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
Score:0
tc flag

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

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.