Activation / existing Deployment Number won't activate


I’ve been playing with Freepbx 13. If I blow out an existing instance and reinstall, I run into problems activating it using an existing deployment number. I get a screen that will tell me that an existing deployment number was found and when I hit activate, i receive “Failed to restart apache.” . I’ve manually restarted apache, reboooted the machine, etc and still no go. If I treat it as a new deployment, it will activate fine. Is there a workaround?

(Rob Thomas) #2

Thank you for this!

I’m actually spending a LOT of time in Sysadmin in 13 (As you would have noticed by the massive numbers of new packages appearing and bugs being fixed), so I’ll add this to my list to investigate, hopefully today!

Feel free to open a bug about this on if you want, and I’ll update it there, or, if I remember, I’ll reply here when I figure out what the problem is!


i will open a bug on this… i wasn’t sure if it was appropriate to do so there … thought maybe it was just something that I was doing wrong.

(Rob Thomas) #4

I found and fixed a problem in 12 sysadmin, but I can’t duplicate it in 13’s sysadmin. Hmm.


strange. I tried a different browser just to be sure.

Are there any logs that we could look at that might shed some light? I’ve reloaded from scratch multiple times.

(Rob Thomas) #6

OK, I shall look harder! You sure you’re using the latest sysadmin for 13?

No. It’s REALLY simple. It installs the licence in /etc/schmooze and then restarts apache. I managed to get my 12 machine to install the licence file, but not restart apache (As the error said)…


Yep, i am.

(Rob Thomas) #8

Well I guess the next thing to try is see if the restarter is broken. Try running this as root:

/var/www/html/admin/modules/sysadmin/hooks/restart-apache. This is what I see:
[[email protected] ~]# pwd
[[email protected] ~]# /var/www/html/admin/modules/sysadmin/hooks/restart-apache
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server’s fully qualified domain name, using for ServerName
[ OK ]
[[email protected] ~]#


i think you’re on to something…

here’s my output:
[[email protected] ~]# /var/www/html/admin/modules/sysadmin/hooks/restart-apache
-bash: /var/www/html/admin/modules/sysadmin/hooks/restart-apache: Permission denied


oh i think i found the issue…

we’re missing the x attribute…

(Rob Thomas) #11

Ok, so a ‘fwconsole chown’ will fix that. I just don’t know how your machine got into that state. BEFORE YOU RUN THAT COMMAND, can you please paste the output of this:

ls -al /var/www/html/admin/modules/sysadmin/hooks/

If you wrap it in <code> and </code> it’ll appear formatted properly here.


I did a chmod 744 restart-apache and now it works.

[[email protected] hooks]# ls -al /var/www/html/admin/modules/sysadmin/hooks/ total 84 drwxr-xr-x 2 asterisk asterisk 4096 Jul 30 17:17 . drwxr-xr-x 11 asterisk asterisk 4096 Jul 30 17:17 .. -rw-r--r-- 1 asterisk asterisk 102 Jul 30 17:17 dump-iptables -rw-r--r-- 1 asterisk asterisk 4071 Jul 30 17:17 fail2ban-generate -rw-r--r-- 1 asterisk asterisk 1533 Jul 30 17:17 fail2ban-getbanned -rw-r--r-- 1 asterisk asterisk 74 Jul 30 17:17 fail2ban-start -rw-r--r-- 1 asterisk asterisk 71 Jul 30 17:17 fail2ban-stop -rw-r--r-- 1 asterisk asterisk 1287 Jul 30 17:17 install-sslkeys -rw-r--r-- 1 asterisk asterisk 28 Jul 30 17:17 poweroff -rw-r--r-- 1 asterisk asterisk 27 Jul 30 17:17 reboot -rwxr--r-- 1 asterisk asterisk 35 Jul 30 17:17 restart-apache -rw-r--r-- 1 asterisk asterisk 363 Jul 30 17:17 toggle-sshkeys-rpm -rw-r--r-- 1 asterisk asterisk 2400 Jul 30 17:17 update-dns -rw-r--r-- 1 asterisk asterisk 3763 Jul 30 17:17 update-ftp -rw-r--r-- 1 asterisk asterisk 2309 Jul 30 17:17 update-hostname -rw-r--r-- 1 asterisk asterisk 4225 Jul 30 17:17 update-interface -rw-r--r-- 1 asterisk asterisk 2401 Jul 30 17:17 update-ports -rw-r--r-- 1 asterisk asterisk 2959 Jul 30 17:17 update-sslconf -rw-r--r-- 1 asterisk asterisk 2076 Jul 30 17:17 update-timezone -rw-r--r-- 1 asterisk asterisk 3672 Jul 30 17:17 update-ups

(Rob Thomas) #14

Wow, yep, that’s 100% wrong. I don’t know how that happened 8-\

If you run ‘fwconsole chown’, that’ll fix all of them to the correct permissions.


yes it did the trick. I’m going to try another install from scratch and see if it happens again. I swear this has happened the last 3 times. Unless i’m dreaming.


Okay, i was able to make it happen again. Here are the steps:

install Freepbx Distro on VirtualBox 5.0 VM
BETA – 10.13.66 64 bit, Asterisk 13, normal install
server reboots
freepbx 13 installs
login to freepbx13 and install syadmin module
apply config
files in /var/www/html/admin/modules/sysadmin/hooks/ show 644 permissions as mentioned above.
rebooted just for fun. no change to permissions in the hooks directory…

run fwconsole chown and permissions are then set properly.

(Rob Thomas) #17

Is the sysadmin module NOT already installed for some reason? Or did you mean upgrade?

Edit: I’m downloading the latest ISO to see if I can duplicate it here. It sounds pretty trivial to duplicate so I should be able to fix it tomorrow.

For the moment, however, we’re going to go for a ride before it gets dark!



The sysadmin module was NOT installed at all. I had to install it. I checked for the existance of /var/www/html/admin/modules/sysadmin after installing from the ISO and it didn’t exist. Freepbx module admin showed “Not Installed (Available Online)”.

(Rob Thomas) #22

Well… I’ve confirmed this, and I’m chasing up why it’s happening. Sorry about that! I don’t know if it’s an ISO issue, or something we can fix without making you download another ISO, but I’m caring about it 8-\

Thank you! I’ll update again when I figure out what’s going on.

Edit: Fixed! Was a bad RPM. Reinstalling now and everything installs properly!


(Jason Black) #23

I found that it’s because of SSL that it’s not restarting. It’s trying to load the SSL service twice.

SSH into the box as root as first step.

[[email protected] ~]# /var/www/html/admin/modules/sysadmin/hooks/restart-apache
[Fri Apr 13 20:32:02.475174 2018] [so:warn] [pid 8927] AH01574: module ssl_module is already loaded, skipping

edit the following:
vi /etc/httpd/conf.d/ssl.conf

comment out this line and save:
LoadModule ssl_module modules/

apparently that gets loaded somewhere else already, as SSL works fine with it not loaded here.

I always do the following after editing files manually on freepbx.
fwconsole chown

restart apache, you should get no error now and Activation should succeed.

I hope this help someone