QUIRK XiVO ISO / IncrediblePBX installer issues on systems with PTR records

Kinjo

New Member
Joined
Dec 1, 2015
Messages
10
Reaction score
3
In attempt to help others with the same DNS environment I wanted to share:

I found that the current installer - http://incrediblepbx.com/IncrediblePBX13-XiVO.sh with a XiVO ISO base doesn't change the hostname correctly if that system has a PTR record in DNS.

It would appear that somewhere in the base ISO install it does a reverse lookup and writes the FQDN to /etc/hosts in addition to the default XiVO hostname. Then when the IncrediblePBX script attempts to change the hostname it stays as the default "xivo" - which results in a failed install.

My work around was to manually edit /etc/hostname with the corrected FQDN and then remove the extra xivo entry from /etc/hosts, before running the IncrediblePBX installer.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,220
DNS is admittedly not our strong suit, and the XiVO install procedure is unusual. If you have suggestions on how to identify the issue you've raised and address it programmatically, we would be most appreciative.
 

Kinjo

New Member
Joined
Dec 1, 2015
Messages
10
Reaction score
3
Unfortunately scripting is not my forte so I won't be much help on troubleshooting the hostname change logic in the IncrediblePBX installer.

The good news is it is easy to replicate the issue without creating a PTR record in DNS. After a base XiVO ISO install edit the /etc/hosts and replace the unassigned:
Code:
127.0.0.1    localhost
127.0.1.1    unassigned.unassigned    unassigned
127.0.0.1    xivo

With a non-xivo FQDN and assoicated system hostname as noted below:
Code:
127.0.0.1    localhost
127.0.1.1    pbx.local.net    pbx
127.0.0.1    xivo

Then proceed with the IncrediblePBX installer. Once you get to the hostname change, this is what you'll see:
Code:
Adjusting hostname to FQDN...
New hostname: xivo.incrediblepbx.com
To continue with installation, press ENTER. Or press Ctrl-C to abort.

Configuring XiVO. Please wait...
Login to web interface as root with web password.
Traceback (most recent call last):
  File "./wizard.py", line 47, in <module>
    c.wizard.create(wizard)
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/commands/wizard.py", line 28, in create
    response = self.session.post(url, body, timeout=timeout)
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/session.py", line 70, in post
    self.check_response(response, check_response)
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/session.py", line 47, in check_response
    response.raise_for_status()
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 825, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Unexpected error: sysconfd error: status 500 - <head>
<title>Error response</title>
</head>
<body>
<h1>Error response</h1>
<p>Error code 500.
<p>Message: <pre>
Waiting for services to start successfully...
    starting xivo-auth ... OK
    starting xivo-dxtora ... OK
    starting xivo-provd ...Job for xivo-provd.service failed. See 'systemctl status xivo-provd.service' and 'journalctl -xn' for details.
NOK
Opening port 5060.
</pre>
.
<p>Error code explanation: 500 = Server got itself in trouble.
</body>

Please verify no errors shown above in XiVO configuration step.

To continue with installation, press ENTER. Or press Ctrl-C to abort.

After breaking out of the script at this point, I confirmed that both the /etc/hosts and /etc/hostname were untouched. However running "hostname" showed xivo.incrediblepbx.com but running "hostname -f" showed unassigned. Then on a reboot it reverts back to the default xivo hostname.

I suspect the script is expecting one of the following hostname conditions:
  • xvio with no FQDN entries
  • FQDN entries with no xvio entries

However in a case with PTRs - it's going to have both xvio and non-matching xvio FQDN entries as described above.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,220
Thanks. Part of the problem is that every single cloud provider sets this up a different way, and I'm still unclear why it should matter to XiVO in the first place.
 

Kinjo

New Member
Joined
Dec 1, 2015
Messages
10
Reaction score
3
My pleasure sir and that is a good question. Being my first XiVO install I didn't know what to expect either.

It be nice if they could let us specify the hostname during the base install.
 

Members online

Forum statistics

Threads
25,811
Messages
167,759
Members
19,240
Latest member
nikko
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top