Asterisk freezes after freepbx 2.5 upgrade

Hi,
I have two asterisk servers which runs two small call centers and one of them keeps freezing after I upgraded freepbx version to 2.5. Both servers are Dell PowerEdge 1950s and both have got exactly the same OS and software versions. (Ubuntu 8.04.1, Asterisk 1.4.22, Freepbx 2.5.0.1).

Eventhough, both servers are identical, when I look at the processes table I can see asterisk runs two different ways on two servers.
This is what I get when i do a ps -aux

(On the server which runs normally)
root 27646 0.3 0.4 566892 19148 ? Ssl Oct09 17:25 /usr/sbin/asterisk

(On the server which keeps failing every couple of hours)
root 5609 0.0 0.0 17404 744 ? S 08:12 0:00 /bin/bash /usr/sbin/safe_asterisk -U asterisk -G asterisk
asterisk 5614 8.1 0.4 507764 18920 ? Sl 08:12 2:25 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c

When the asterisk service is frozen I cannot restart the service or even kill the process. The only possible way to get the service up is a system reboot.

Any help will be highly appreciated.

Thanks

Pete

both servers are not identical, as you can see from your own analysis. The one that is working is running as root, that is bad. The one that is failing is running as user asterisk, that is good. Why it is failing though will take a much deeper look at the system, it may be permission related or something else but you will have to start digging through the logs to find out what it is complaining about.

There is nothing in 2.5 that comes to mind that would have effected asterisk in that way. Trying running “amportal chown” to get all your permissions straightened out as a starting point.

Hi Philippe,
Thanks a lot for the reply.
This server has a lot of time conditions configured and I just found that the service freezes when a destination is changed according to a time condition. (Ex: Service was stuck @ 8 AM for past 3 days when a destination is changed from ring group to a queue).

I couldn’t find any specific errors on logs but I found this warning on /var/log/messages

/var/lib/asterisk/agi-bin/phpagi-asmanager.php[731]: date(): It is not safe to rely on the system’s timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Europe/London’ for ‘BST/1.0/DST’ instead.

I tried to get rid of this warning by adding the line date.timezone = ‘Europe/London’ to /etc/php5/apache2/php.ini but it didn’t stop the warning.

Do you think does this warning has something to do with the fault I’m having on this server?

Thanks a lot

Pete

I would not expect a timezone issue to get Asterisk to lockup. But I would address the issue, the easiest way would be by setting the TZ in the default profile to the proper zone.

I have rebuilt the server assuming that is a kernel issue. It was running fine for 4 days and freezed again same as before. I couldn’t do anything other than restarting the whole server.
One thing I found this time is if I start the service and let it run for a few hours, asterisk cannot be stopped using “amportal stop”. It outputs the message asterisk stopped but the process is still there and I can even log into the asterisk console but I can’t make any calls. when this happens I can’t even kill the asterisk process which runs with the user asterisk, however i can kill the safe_asterisk process which runs by root.
The same thing happens when the asterisk freezes or if i run amportal stop or restart. The only way to resolve is a system reboot.

Any thoughts will be really appreciated.

I was getting 7+ second delays on inbound calls because dialparties.agi was complaining about TZ not being set. Dozens of complaints was apparently the cause of the delay. I edited /etc/php.ini and did this:

[Date]
; Defines the default timezone used by the date functions
date.timezone = EST5EDT
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (added the above line)