Web GUI Broken After Module Update

Hi I’m running distro 4.211.64-7. All was running fine until I was notified to update the sysadmin module. In doing so, the update froze and the GUI timed out. I’ve restarted asterisk, attempted to restart httpd (fails) and finally rebooted. The GUI is gone.

I can tell the web server is still working because I have webmin installed and it’s working.

Below is the httpd error log:

--2013-10-01 16:30:21--  http://mirror1.freepbx.org/modules/release/2.11/sysadmin-2.11.0.19.tgz?installid=9689eb300523005b4a7deac7dd150f51
Resolving mirror1.freepbx.org... 66.243.108.11
Connecting to mirror1.freepbx.org|66.243.108.11|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 165657 (162K) [application/x-gzip]
Saving to: `/var/www/html/admin/modules/_cache/sysadmin-2.11.0.19.tgz'

     0K .......... .......... .......... .......... .......... 30%  252K 0s
    50K .......... .......... .......... .......... .......... 61%  505K 0s
   100K .......... .......... .......... .......... .......... 92%  607K 0s
   150K .......... .                                          100%  818K=0.4s

2013-10-01 16:30:21 (410 KB/s) - `/var/www/html/admin/modules/_cache/sysadmin-2.11.0.19.tgz' saved [165657/165657]

mv: cannot stat `/var/lib/asterisk/agi-bin/license-*.zl': No such file or directory
[Tue Oct 01 16:30:22 2013] [notice] caught SIGTERM, shutting down
[Tue Oct 01 16:30:23 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Oct 01 16:30:23 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Oct 01 16:30:23 2013] [notice] Digest: done
[Tue Oct 01 16:30:23 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 configured -- resuming normal operations
mv: cannot stat `/var/lib/asterisk/agi-bin/license-*.zl': No such file or directory
[Tue Oct 01 16:32:51 2013] [notice] caught SIGTERM, shutting down
[Tue Oct 01 16:32:51 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Oct 01 16:34:51 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Oct 01 16:34:56 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Oct 01 16:35:20 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Oct 01 16:38:37 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Oct 01 16:46:53 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Oct 01 16:49:47 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

Any ideas on where to look?

This is the part of the freepbx.log that I think might be the issue?

Yep etc/freepbx.conf doesn’t match etc/asterisk/manager.conf

Don’t forger amportal restart to reread the settings.

Hi! I have the same problem with same error. Please explane what must be matched in freepbx.conf and manager.conf…?
Sorry for my stupid question :slight_smile: But I never before change some thing manually.

Please look in the files. It should be intuitevely obvious. Just a username and password. Doesn’t change manager.conf make freepbx.conf match the credentials.

I had exactly the same issue yesterday after doing the same update. running ‘service httpd restart’ gave an error about directories not being available. I eventually tracked the problem down to the file etc/httpd/conf.d/schmoozecom.conf that had a file creation date of 1/10/2013. I’m not too familiar with exactly what the file does, but it’s basically defining the listening ports for the web interface. This is what was originally in the file:

Listen 2
<VirtualHost *:2>
DocumentRoot /var/www/html/aastra/

Listen 4
<VirtualHost *:4>
DocumentRoot /var/www/html/restapps/

Listen 5
<VirtualHost *:5>
DocumentRoot /var/www/html/restapi/

Listen 1
<VirtualHost *:1>
DocumentRoot /var/www/html/recordings/

Listen 3
<VirtualHost *:3>
DocumentRoot /tftpboot/


I changed the file as follows, and did a ‘service httpd restart’ and it all started working again:

Listen 80
<VirtualHost *:80>
DocumentRoot /var/www/html/

Listen 4
<VirtualHost *:4>
DocumentRoot /var/www/html/restapps/

Listen 5
<VirtualHost *:5>
DocumentRoot /var/www/html/restapi/

Listen 1
<VirtualHost *:1>
DocumentRoot /var/www/html/recordings/

Listen 3
<VirtualHost *:3>
DocumentRoot /tftpboot/


Not sure if this is a proper fix, but it’s working for me.

I’m not sure which part is supposed to match. I tried matching the AMPDBPASS to the secret in manager.conf without success. The other way around breaks the reload because it doesn’t match the sql password.

This is my current freepbx.conf

[code]<?php
$amp_conf[‘AMPDBUSER’] = ‘freepbxuser’;
$amp_conf[‘AMPDBPASS’] = ‘3Mxmm1dKMfRM’;
$amp_conf[‘AMPDBHOST’] = ‘localhost’;
$amp_conf[‘AMPDBNAME’] = ‘asterisk’;
$amp_conf[‘AMPDBENGINE’] = ‘mysql’;
$amp_conf[‘datasource’] = ‘’; //for sqlite3

require_once(’/var/www/html/admin/bootstrap.php’);
[/code]

and my manager.conf

[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
displayconnects=no ;only effects 1.6+

[admin]
secret = LGgjhksd768YGHjhfgsdy
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
writetimeout = 5000

#include manager_additional.conf
#include manager_custom.conf

Sorry, just realised that my problem was not exactly the same. However, this is possibly because I initiated the update from the command line and not the Web GUI. The end result was the same, though. A complete loss of the Web GUI!

I have no idea what any of that schmoozecom.conf stuff was but I tried it and you fixed it!! I don’t think it mattered how you updated the module, I think it was the same problem.

Ok. I think I’ve found where the real issue is. I believe that lines 127 - 136 of etc/httpd/conf/httpd.conf should look like this:

# # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, in addition to the default. See also the # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) # #Listen 12.34.56.78:80 Listen 80

My config had been changed so that Listen had been prefixed with two extra # comments. Removing these extra #s, and ‘service httpd restart’ works - as long as the schmoozecom.conf I modified earlier is deleted (or restored to the original config).

Its suppose to comment out listen:80 and move to the conf.d include which gets auto setup.

Are these FreePBX Distros or something else?

That “Listen 80” being commented out looks to only be part of the problem. My original schmoozecom.conf file had this:

Listen 1
<VirtualHost *:1>
DocumentRoot /var/www/html/aastra/

Listen 2
<VirtualHost *:2>
DocumentRoot /var/www/html/restapps/

Listen 3
<VirtualHost *:3>
DocumentRoot /var/www/html/restapi/

Listen 2
<VirtualHost *:2>
DocumentRoot /var/www/html/recordings/

Listen 1
<VirtualHost *:1>
DocumentRoot /tftpboot/

My httpd service wouldn’t restart because it’s commanding ports to folders that don’t exist. (aastra, restapps, restapi)

Once I comment out those first three listen commands it works.

Guys

So System Admin module now has port management to let you define apache ports for different web directories.

On migration we comment out the listen port in http.conf and move it to the conf.d include schmoozecom.conf.

Their was a bug in a early version that came out yesterday that we fixed so its important to know when you upgraded sysadmin module. I just tested again on 4 more machines and migration worked perfect. Want to make sure we are not chasing a phantom bug that was already fixed yesterday morning.

Yes, I’m running a FreePBX Distro. Don’t know the exact distro number, but it’s running CentOS6.3 and Asterisk 11.
I upgraded the sysadmin module at approx 10pm on 1st October UK time. It was the only module available for upgrade at the time I looked. All other modules had been successfully updated at an earlier date.
I’m fairly certain the issue I’ve had will be related to the bug you’ve already identified.

If the listen port in httpd.conf is meant to be commented out, and moved to schmoozecom.conf, can you please let me know what the default schmoozecom.conf file should look like, as the one I had (details posted above) didn’t have any listening port 80. Basically, I was left with no listening port 80.

Thanks

For you reference I’m running FreePBX Distro 4.211.64-7 (all modules updated until today October, 3rd) with specifically:

[list]
[]sysadmin 2.11.0.19 updated through CLI (with module_admin) directly from 2.11.0.13 on October, 1st (early morning, CEST).
[
]sysadmin-2.6.1-152 (RPM) updated manually AFTER sysadmin 2.11.0.19 was installed (I know…it’s not good to do that but I thought was good to do so watching at RPMs that were available through [font=Courier]yum list sysadmin*[/font]).
[/list]

And, AFAIK, I’m NOT having any issue with the GUI or with the System Admin Pro module (I saw the new added Port Management feature menu).

Below the result of [font=Courier]cat /var/log/yum.log|grep sysadmin[/font] on my system (just an history timeline):

[font=Courier]Feb 14 14:39:32 Installed: sysadmin-2.6.1-124_centos6.noarch
Mar 15 16:20:12 Updated: sysadmin-2.6.1-125_centos6.noarch
Mar 20 18:24:36 Updated: sysadmin-2.6.1-126_centos6.noarch
May 25 18:57:39 Updated: sysadmin-2.6.1-128_centos6.noarch
Aug 02 08:49:38 Updated: sysadmin-2.6.1-129_centos6.noarch
Aug 08 12:02:44 Updated: sysadmin-2.6.1-130_centos6.noarch
Oct 01 08:50:04 Updated: sysadmin-2.6.1-152_centos6.noarch
[/font]

and the whole content of the configuration file “/etc/httpd/conf.d/schmoozecom.conf” (as it was created 01.10.2013):
Listen 82
<VirtualHost *:82>
DocumentRoot /var/www/html/aastra/

Listen 84
<VirtualHost *:84>
DocumentRoot /var/www/html/restapps/

Listen 85
<VirtualHost *:85>
DocumentRoot /var/www/html/restapi/

Listen 81
<VirtualHost *:81>
DocumentRoot /var/www/html/recordings/

Listen 80
<VirtualHost *:80>
DocumentRoot /var/www/html/

Listen 83
<VirtualHost *:83>
DocumentRoot /tftpboot/

while the /etc/httpd/conf/httpd.conf has this section:
#

#Listen: Allows you to bind Apache to specific IP addresses and/or

ports, in addition to the default. See also the

directive.

Change this to #Listen on specific IP addresses as shown below to

prevent Apache from glomming onto all bound IP addresses (0.0.0.0)

##Listen 12.34.56.78:80
#Listen 80

Just for reference, below a screen shot of the Port Management section as it appears now within the updated FreePBX Sysadmin Pro module.

Hope this info could help.

Thanks parnassus. That’s useful information. I did the yum update before the module_admin update, but I’m not sure that made any fundamental difference.

Looks like the schmoozecom.conf file that was downloaded to my box was corrupt. Looking at your file, it all starts to make a bit more sense now. It appears that each listening port is missing the leading 8x, and for the most important one (80), it doesn’t exist at all (almost as if it tried to exist as listening port 0, but that entry got deleted because it’s an invalid number?).

I’m guessing the schmoozecom.conf file was corrected by the time you carried out your update.

Yes, maybe. I updated the post because I was playing (with small success) with text formatting…it’s a nightmare here.

I don’t know if I was only lucky in updating directly from 2.11.0.13 and not doing a step by step update passing through 2.11.0.18 (I it was out between 2.11.0.13 and 2.11.0.19).

Maybe there isn’t (wasn’t) any relationship with that.

I can also say that my httpd.conf was not touched since September, 30th.

I’m not at my box right now, so I don’t know the exact verion number of the module I’m running. However, I’ve not seen any online update to fix this issue since I did the update which broke the Web GUI. It’s almost as if the file has been corrected and rebundled into the existing update?

Not sure what to tell you but the sysadmin-2.11.0.19.tgz file’s time stamp (which was used to update the System Administration commercial module) reports “2013 September, 30th 20:12” …no matter what mirror I grab.

You may also consider that September, 30th at 17:46 (time stamp), so few hours before, the sysadmin-2.11.0.19.tgz was present.

In the end, if the update procedure was performed after September 30th, it seems impossible to me that sysadmin was corrected and then released once again to mirrors because time stamp states it didn’t happen so (sorry for my English…).

You should watch at your yum.log and at the freepbx.log to see when (and what) exactly happened in terms of updates’ time line.

Kind regards, Davide.