pyxmpp.exceptions.HostMismatch when forwarding to new hosts.
This is a migration of Redmine issue #6163.
Original Description (2018-06-22):
I encountered this issue when using a cname to forward traffic from (for example) lvalert.ligo.org to lvalert.cgca.ligo.org:
[alexander.pace@ldas-pcdev10 ~]$ lvalert_admin -a alexander.pace -s lvalert.ligo.org -m -v connecting... *** State changed: resolving srv (u'lvalert.ligo.org', 'xmpp-client') *** *** State changed: resolving u'lvalert.ligo.org' *** *** State changed: connecting ('129.89.61.153', 5222) *** *** State changed: connected ('129.89.61.153', 5222) *** build pubsub stanza... Getting nodes sending message... Traceback (most recent call last): File "/bin/lvalert_admin", line 299, in <module> s.loop(1) File "/usr/lib64/python2.7/site-packages/pyxmpp/client.py", line 242, in loop act=stream.loop_iter(timeout) File "/usr/lib64/python2.7/site-packages/pyxmpp/streambase.py", line 598, in loop_iter return self._loop_iter(timeout) File "/usr/lib64/python2.7/site-packages/pyxmpp/streambase.py", line 616, in _loop_iter self._process() File "/usr/lib64/python2.7/site-packages/pyxmpp/streamtls.py", line 179, in _process StreamBase._process(self) File "/usr/lib64/python2.7/site-packages/pyxmpp/streambase.py", line 637, in _process self._read() File "/usr/lib64/python2.7/site-packages/pyxmpp/streamtls.py", line 174, in _read StreamBase._read(self) File "/usr/lib64/python2.7/site-packages/pyxmpp/streambase.py", line 661, in _read self._feed_reader(r) File "/usr/lib64/python2.7/site-packages/pyxmpp/streambase.py", line 677, in _feed_reader r=self._reader.feed(data) File "/usr/lib64/python2.7/site-packages/pyxmpp/xmlextra.py", line 537, in feed return self.reader.feed(s) File "/usr/lib64/python2.7/site-packages/pyxmpp/xmlextra.py", line 46, in _stream_start self.stream_start(doc) File "/usr/lib64/python2.7/site-packages/pyxmpp/streambase.py", line 366, in stream_start raise HostMismatch pyxmpp.exceptions.HostMismatch It also occurred when using an A Record to forward traffic from *.cgca.ligo.org to *.ligo.uwm.edu.
Unfortunately, this makes the server upgrade/transition not as seamless as I would have hoped. I think the course of action should be to: * Take down the LVAlert servers for an extended period on Tuesday (June 26) * Change the DNS entries to so that *.cgca.uwm.edu point to the new server's IP's. * Ensure the system hostname and puppet configuration are consistent with the new domain.
After that, when I do a final database override with the old server's openfire database, the xmpp.fqdn and xmpp.hostname should be reset to the old value, and should be consistent with the (now) current hostname, and openfire should work.
After the MDC, I can modify the client software to relax this exception as we transition servers and domains.
As a side note, when the new domains get stood up, their .netrc files will have to be modified to reflect the change. (put here as more of a mental reminder to myself).
Update:
Leaving this ticket open, since it will eventually become an issue once LVAlert gets fully migrated to the *.ligo.uwm.edu domain.