Can't use FreePBX anymore

fwconsole in general doesnt work anymore, whatever i do, it throws that stack trace right at my face.

if ur willing to see for yourself, i can send u the url.

depending on your OS, is yum update possible? Or on newer Debian OS apt update && apt upgrade -y ?

Whoops\Exception\ErrorException: Trying to access array offset on value of type bool in file /var/www/html/admin/modules/pm2/Pm2.class.php on line 364

and then the stack trace, forgot to add it i guess.

ill try.

nothing got updated, everything was latest version

That will be because posix_getpwnam is returning false. The documentation says that is because it has failed, but doesn’t say what causes a failure. However, it seems most likely that it is because it thinks the user doesn’t exist. However, you claim that the user referenced in the amportal.conf file does exist, so I don’t understand why it is failing. but can definitely say its is failing before the directory contents, or even that it was a directory, came into play.

It looks like the underlying libc call could fail as the result of sever resource starvation, but that sounds unlikely so early in the startup.

I’d have to wonder if your system had been compromised, although I can’t think why it would be done in a way that caused this failure.

Another basic check of the home directory look up mechanism would be to type

echo ~asterisk

at the shell prompt. That should display the name of the asterisk home directory. If something else, e.g. the uninterpreted string, is output, the lookup is failing.

You should also check that /etc/amportal.conf is readable from the account being used. You might want to check both files for excessive permissions, as sometimes programs will refuse to use files that aren’t adequately protected, as well as those that are over protected.

echo ~asterisk returns only /home/asterisk

/etc/amportal.conf should be able to be read by the users

That shows that /etc/passwd and libc are good.

Are you sure the Asterisk web user line in amportal.conf is valid, e.g. no non-printing characters? Is the Asterisk user something you entered, or are you using a default?

im using default everything, i haven’t touched the file at all

It sounds like the code has been corrupted. Unfortunately it also sounds like there isn’t enough of the system working to check the signatures in the normal way, which would leave you with checking them from first principles, or simply refreshing everything.

Also consider running a memory test,

What hardware do you use? Is it old? Is the system accessible from outside?

What the **** is it with FreePBX? I keep getting issues, over and over and over. Do any of you recommend an alternative as this is just getting worse.

Not really old, just a DigitalOcean Droplet, overpriced for what it offers honestly..

I have 6 freePBX servers in use…version 15 &16…no issues at all…for years!
Either it is your setup/hardware/cloud or it is a 17 bug (=unlikely).

EDIT:…or your system is compromised!

Hi mate, I am running a ted complex FreePBX v16.x.x with a number of trunks and connected devices around the globe since a few years without any hassle at all. However, before i do even small plugin update, a complete disk image of the whole system (dd) is a must. When something fu**cks up, which does happen occasionally, re-installation of the working disk image gets me back to the working stage without wasting time fiddling around with funny error messages :smiley:

p.s. don’t trust updates entirely and have always a fallback ready when needed, saves headaches,and gives more time for the pints and redwines… :face_savoring_food:

What are the specs ? RAM / CPU / Disk ?

From the CLI run getent passwd asterisk and you should end up with:

root@fpbx17-dev:~# getent passwd asterisk
asterisk:x:999:995::/home/asterisk:/bin/bash

Also run php -m | grep posix to make sure that is installed right

4 GB Memory / 2 Intel vCPUs / 120 GB Disk / AMS3 - Debian 12 x64