Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-20253

Failure to Register Command in SNG7 (v 12.7.6-1904-1.sng7)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 13
    • Fix Version/s: None
    • Component/s: FreePBX Distro
    • Labels:
      None
    • Bug Tracker:
      Customer Issue
    • ToDo:
    • Asterisk Version:
      Asterisk 13.22.0 built by mockbuild @ jenkins7 on a x86_64 running Linux on 2018-07-25 22:30:39 UTC
    • Distro Version:
      12.7.6-1904-1.sng7
    • Distro:
      FreePBX Distro

      Description

      I am using the plain vanilla FreePBX distro provided by FreePBXHosting.  The only change that may be exposing this defect is that I login as a named user (not root), but who has been added to the root, wheel, and asterisk groups.  (I did this because as a policy I like to disable ssh login for root.)

      The specific error code is below.[1]  But, by looking at the stack trace and the source, I can see that the login script is trying to add a fwconsole command using what appears to be a deprecated method.  Here is the code that is called at the start of the unhandled exception's code path:

      {{ \FreePBX::Logger()->log(LOG_WARNING, 'Deprecated way to add Console commands for module '.$rawname.', adding console commands this way can have negative performance impacts. Please use module.xml. See: https://wiki.freepbx.org/display/FOP/Adding+fwconsole+commands');}}

      (from /var/lib/asterisk/bin/fwconsole:137)

      It looks like the Logger()->log() call borked because the "/var/log/asterisk/freepbx.log" could not be opened

      The interesting thing about this failure is that it does not show up if I sudo su -  You can see the output below.[2]

      -Mark

       

      [1]

      {{Last login: Mon Jul 15 04:04:47 2019 from 70.174.203.242
      UnexpectedValueException: The stream or file "/var/log/asterisk/freepbx.log" could not be opened: failed to open stream: Permission denied in file /var/www/html/admin/libraries/Composer/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 107
      Stack trace:
      1. UnexpectedValueException->() /var/www/html/admin/libraries/Composer/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
      2. Monolog\Handler\StreamHandler->write() /var/www/html/admin/libraries/Composer/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:39
      3. Monolog\Handler\AbstractProcessingHandler->handle() /var/www/html/admin/libraries/Composer/vendor/monolog/monolog/src/Monolog/Logger.php:344
      4. Monolog\Logger->addRecord() /var/www/html/admin/libraries/Composer/vendor/monolog/monolog/src/Monolog/Logger.php:637
      5. Monolog\Logger->info() /var/www/html/admin/libraries/BMO/Logger.class.php:146
      6. FreePBX\Logger->driverChannelLogWrite() /var/www/html/admin/libraries/BMO/Logger.class.php:97
      7. FreePBX\Logger->channelLogWrite() /var/www/html/admin/libraries/BMO/Logger.class.php:85
      8. FreePBX\Logger->logWrite() /var/www/html/admin/libraries/BMO/Logger.class.php:39
      9. FreePBX\Logger->log() /var/lib/asterisk/bin/fwconsole:137
      ------------------------------------------------------------

      Your system is currently up to date!
      Your PBX is up to date.
      Also 3 Uninstalled modules.

      ------------------------------------------------------------}}

      [2]

      Last login: Mon Jul 15 02:19:22 UTC 2019 on pts/0
      Last failed login: Mon Jul 15 06:01:03 UTC 2019 from 122.195.200.148 on ssh:notty
      There were 196 failed login attempts since the last successful login.
      ______ ______ ______ __ __

      ___   ___ | ___
      \ / /
        _ _ __ ___ ___   _/ /   _/ / \ V /
      _   '__ / _ \ / _ | __/ ___ \ / \
              __/ __/       _/ // /^\ \
      _
        _ ___ ___ _ ____/ \/ \/Current Network Configuration
      ----------------------------------------------------
      Interface MAC Address IP Addresses

      ----------------------------------------------------

      eth0 00:16:3C:D2:9D:0B 162.255.22.40
          fe80::216:3cff:fed2:9d0b

      ---------------------------+-------------------------+Please note most tasks should be handled through the GUI.
      You can access the GUI by typing one of the above IPs in to your web browser.
      For support please visit:
      http://www.freepbx.org/support-and-professional-services+------------------------------------------------------------+

      Your system is currently up to date!
      Your PBX is up to date.
      Also 3 Uninstalled modules.

      ------------------------------------------------------------

       

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mmoo9154 Mark
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.