Can not connect to asterisk

Broadcast message from [email protected] (Wed Oct 24 16:24:30 2018):

Firewall Rules corrupted! Restarting in 5 seconds

More information available in /tmp/firewall.log

Broadcast message from [email protected] (Wed Oct 24 16:24:57 2018):

Firewall service now starting.

Broadcast message from [email protected] (Wed Oct 24 16:25:35 2018):

Firewall Rules corrupted! Restarting in 5 seconds

More information available in /tmp/firewall.log

this started popping up and then I got can not connect to asterisk
can someone help

Did you check the file? What did it say?

Last failed login: Thu Oct 25 04:01:37 UTC 2018 from 192.168.1.244 on ssh:notty
There were 2 failed login attempts since the last successful login.
Last login: Wed Oct 24 16:15:09 2018 from 192.168.1.244
Unable to create lock file: No space left on device
Failed to start up concurrent users module!
Whoops\Exception\ErrorException: file_put_contents(): Only 0 of 96 bytes written, possibly out of free disk space in file /var/www/html/admin/libraries/utility.functions.php on line 153
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/utility.functions.php:153
  2. file_put_contents() /var/www/html/admin/libraries/utility.functions.php:153
  3. freepbx_log() /var/www/html/admin/bootstrap.php:260
  4. require_once() /etc/freepbx.conf:11
  5. include_once() /var/lib/asterisk/bin/fwconsole:12
    zend_mm_heap corrupted
    Unable to create lock file: No space left on device
    Failed to start up concurrent users module!
    Whoops\Exception\ErrorException: file_put_contents(): Only 0 of 96 bytes written, possibly out of free disk space in file /var/www/html/admin/libraries/utility.functions.php on line 153
    Stack trace:
  6. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/utility.functions.php:153
  7. file_put_contents() /var/www/html/admin/libraries/utility.functions.php:153
  8. freepbx_log() /var/www/html/admin/bootstrap.php:260
  9. require_once() /etc/freepbx.conf:11
  10. include_once() /var/lib/asterisk/bin/fwconsole:12
    zend_mm_heap corrupted
    ±-----------------------------------------------------------+
    | Your system is currently up to date! |
    | Your PBX is up to date. |
    | Also 2 Uninstalled modules. |
    ±-----------------------------------------------------------+
    [root@freepbx ~]#

/var/www/html/admin/libraries/utility.functions.php
$log_file = isset($amp_conf[‘FPBX_LOG_FILE’]) ? $amp_conf[‘FPBX_LOG_FILE’] : ‘/tmp/freepbx_pre_install.log’;

            // PHP Throws an error on install running of install_amp because the tiemzone isn't set. This is something that
            // should be done in the php.ini file but we will make an attempt to set it to something if we can't derive it
            // from the date_default_timezone_get() command which goes through heuristics of guessing.
            //
            $tz = date_default_timezone_get();
            if (!$tz) {
                $tz = 'America/Los_Angeles';
            }
            date_default_timezone_set($tz);
            $tstamp = date("Y-M-d H:i:s");

            // Don't append if the file is greater than ~2G since some systems fail
            //
            $size = file_exists($log_file) ? sprintf("%u", filesize($log_file)) + strlen($txt) : 0;
            if ($size < 2000000000) {
                $dn = dirname($log_file);
                if((file_exists($log_file) && is_writable($log_file)) || (!file_exists($log_file) && is_dir($dn) && is_writable($dn))) {
                    file_put_contents($log_file, "[$tstamp] $txt", FILE_APPEND);
                } else {
                    return false;
                }
            }
            break;
    }
}
return true;

}

/**

  • version_compare that works with FreePBX version numbers
  • @param string $version1 First version number
  • @param string $version2 Second version number
  • @param string $op If you specify the third optional operator argument,
  •               you can test for a particular relationship.
    
  •               The possible operators are:
    
  •               <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.
    
  • @return mixed returns -1 if the first version is lower than the second,
    Arguments
    “file_put_contents(): Only 0 of 96 bytes written, possibly out of free disk space”
    Environment & details:

GET Data empty
POST Data empty
Files empty
Cookies
searchHide
“1”
lang
“en_US”
_ga
“GA1.1.1408735397.1534040968”
_gid
“GA1.1.2042869729.1540248348”
PHPSESSID
“q067epjkocglgocblpv2t7ir96”
io
“1HSgYgaL6il-Jyr4AAAC”
webrtc-silenced
“0”
Session
langdirection
“ltr”
module_name
“sysadmin”
module_page
“sysadmin”
AMP_user
ampuser {}
fwmsg
array:1 [:arrow_forward:]
Server/Request Data
UNIQUE_ID
“W9FBSFfCWcxhy6b6VHrRIAAAAAE”
SCRIPT_URL
“/admin/config.php”
SCRIPT_URI
http://192.168.1.245/admin/config.php
SSLSETUP
“true”
HTACCESS
“on”
HTTP_HOST
“192.168.1.245”
HTTP_ACCEPT
“text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8”
HTTP_UPGRADE_INSECURE_REQUESTS
“1”
HTTP_COOKIE
“searchHide=1; lang=en_US; _ga=GA1.1.1408735397.1534040968; _gid=GA1.1.2042869729.1540248348; PHPSESSID=q067epjkocglgocblpv2t7ir96; io=1HSgYgaL6il-Jyr4AAAC; webr :arrow_forward:
HTTP_USER_AGENT
“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15”
HTTP_ACCEPT_LANGUAGE
“en-us”
HTTP_ACCEPT_ENCODING
“gzip, deflate”
HTTP_CONNECTION
“keep-alive”
PATH
“/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin”
SERVER_SIGNATURE
“”
SERVER_SOFTWARE
“Apache/2.4.6 (Sangoma) OpenSSL/1.0.2k-fips PHP/5.6.36”
SERVER_NAME
“192.168.1.245”
SERVER_ADDR
“192.168.1.245”
SERVER_PORT
“80”
REMOTE_ADDR
“192.168.1.244”
DOCUMENT_ROOT
“/var/www/html”
REQUEST_SCHEME
“http”
CONTEXT_PREFIX
“”
CONTEXT_DOCUMENT_ROOT
“/var/www/html”
SERVER_ADMIN
[email protected]
SCRIPT_FILENAME
“/var/www/html/admin/config.php”
REMOTE_PORT
“56487”
GATEWAY_INTERFACE
“CGI/1.1”
SERVER_PROTOCOL
“HTTP/1.1”
REQUEST_METHOD
“GET”
QUERY_STRING
“”
REQUEST_URI
“/admin/config.php”
SCRIPT_NAME
“/admin/config.php”
PHP_SELF
“/admin/config.php”
REQUEST_TIME_FLOAT
1540440392.83
REQUEST_TIME
1540440392
Environment Variables empty
Registered Handlers
0. Whoops\Handler\PrettyPageHandler

Did you miss the bit that told you your disk was full?

1 Like

I’m trying to understand how did it get full when I just launched it and no one has access. how can I get more room

How big is the harddrive?

Did you set custom partitions?

As Tom asked, whats the disk size?

To find out whats eating storage, run du -sh *

[root@localhost ~]# cd /var
[root@localhost var]# du -sh * 

Source

Hard drive is 250 gb

I did not set custom partitions. which I think I don’t know how to since I’m learning as I go. also I ran it |0|account|
|—|---|
|0|adm|
|521M|cache|
|0|crash|
|8.0K|db|
|0|empty|
|0|ftp|
|0|games|
|0|gopher|
|0|kerberos|
|973M|lib|
|0|local|
|0|lock|
|276M|log|
|0|mail|
|0|nis|
|0|opt|
|0|preserve|
|0|run|
|124K|spool|
|4.0K|tmp|
|968M|www|
|0|yp|

that is what popped up

From the console, try “df” - that will give you insight into your partition structure and what’s full and what isn’t.

/dev/mapper/SangomaVG-root 105420500 105420480 20 100% /
devtmpfs 1848612 0 1848612 0% /dev
tmpfs 1861476 0 1861476 0% /dev/shm
tmpfs 1861476 9008 1852468 1% /run
tmpfs 1861476 0 1861476 0% /sys/fs/cgroup
/dev/sda2 1983056 95620 1768652 6% /boot
/dev/sda1 204580 9956 194624 5% /boot/efi
tmpfs 372296 0 372296 0% /run/user/0
[root@freepbx ~]#

I should have said “df -k” so the report is in 1k blocks instead of 512byte blocks.

Your root drive is full (100m 512-byte blocks, or 50,000,000 1K blocks).

For some reason, you don’t have a ‘/var’ directory (which is where all of your dynamic files should go). Between the two, you don’t have enough space. Without deep-diving into your current drive space, there’s no way for us to know where all your space went, but it looks like you’ve got about 50G used.

du -xh --max-depth=1 /var |sort -h

/var/account

0 /var/adm

0 /var/crash

0 /var/empty

0 /var/ftp

0 /var/games

0 /var/gopher

0 /var/kerberos

0 /var/local

0 /var/nis

0 /var/opt

0 /var/preserve

0 /var/yp

4.0K /var/tmp

8.0K /var/db

124K /var/spool

276M /var/log

521M /var/cache

968M /var/www

973M /var/lib

2.7G /var

then its NOT the usual log file culprit, try

du -xh --max-depth=1 / |sort -h

which should scan the whole / file system

0 /media
0 /mnt
0 /opt
0 /srv
64K /root
63M /etc
121M /home
354M /tftpboot
2.0G /usr
2.7G /var
96G /tmp
101G /

The files in tmp should be deleted after a reboot. That will clear 96Gb. I would start with that.

what cmd do I have to do

before you reboot,

ls -lsrS /tmp

if they are core dumps then you will need to fix that or the same problem will reoccur soon.