Open the-rocinante opened 3 years ago
Hello,
It probably will work if you use hosts: pubsub.@HOST@
, or if you skip that all together as this is default value. Problem here is that you have two domain, and they both start mod_pubsub module, but they share same name for that service - value you passed in hosts:
, and this fails when second domain tries to setup service with same name. I will try to extend config validator to reject config like this with more meaningful error.
If you want to have two XMPP hosts, but only one PubSub service, displayed in the Service Discovery of both hosts:
hosts:
- hostname.tld
- otherhostname.tld
modules:
# mod_disco: ...
# mod_pubsub: ...
...
append_host_config:
hostname.tld:
modules:
mod_pubsub:
hosts:
- pubsub.hostname.tld
mod_disco: {}
otherhostname.tld:
modules:
mod_disco:
extra_domains:
- pubsub.hostname.tld
The reason I went through this exercise is that I notice in syslog there are numerous entries like the following
[info] Outbound s2s connection started: hostname.tld -> pubsub.stun.hostname.tld
[info] Closing inbound s2s connection hostname.tld -> pubsub.stun.hostname.tld: Stream closed by local host: host-unknown
[warning] Failed to establish outbound s2s connection hostname.tld -> pubsub.stun.hostname.tld: Stream closed by peer: host-unknown; bouncing for 261 seconds
The only place the stun.hostname.tld
is mentioned is in the DNS SRV records for hostname.tld
related to the stun port (nothing to do with pubsub). So somehow this SRV record is triggering a spurious request to a nonexistent subdomain. My thought was that if I simply configure the service to explicitly use pubsub.hostname.tld
, then the above warning would go away, but instead it crashed ejabberd.
I don't necessarily want only one domain to reference a pubsub.
subdomain, since I have multiple different domains which I would like to serve as distinct from each other. Although I could simply have the _stun._udp.
and _stuns._udp.
SRV records point to hostname.tld
rather than stun.hostname.tld
, I would prefer to use the subdomain as I may eventually setup a stand-alone stun service on a separate host. What I'm really trying to achieve is the elimination of the requests for non-existant subdomains showing up as warnings in my syslog. I even went so far as to setup CNAME records for pubsub.stun.hostname.tld
et al, but that didn't seem to have any affect. Anyway, if you can provide some insight about what I'm doing wrong, or how to identify and eliminate whatever this issue is, I'd appreciate it.
@badlop, @prefiks: What do you think about last @the-rocinante comment?
Reading this thread again, it seems a specific setup that has a specific problem. I don't remember any recent fix or issue related to this one, so it may be an obscure bug somewhere, an incompatibility, a misconfiguration... As I don't see an easy way to reproduce the problem in my workbench, and I know very little about pubsub and stun, I won't investigate it. My opinion is that the best place to investigate this behaviour is in the place where it is happening, until some more light is offered, some clue where more people can engage in investigating it. As I have nothing of interest to offer anymore in this issue, I would prefer to shut up, instead of adding spam comments that add nothing.
Environment
Note
All real IP addresses, hostnames, usernames and passwords have been modified to maintain privacy.
Bug description
After adding the
hosts
section tomod_pubsub
as per the following...... and restarting ejabberd, the following crash/error is generated. If the above
hosts
section is removed or commented out, ejabberd starts normally and operates without error.Errors from error.log
Configuration