I’m getting tired of it, the constant issues i’m experiencing with FreePBX, i hope this can be resolved without a reset, this is what the error is when opening my pbx, i’ve tried rebooting, and fwconsole doesnt work.
FreePBX Version is 17 to the latest updates as far as i know, or maybe the automatic updates did something? I can’t see the full version since i can’t get in
This is incomplete! It is missing frames one and two and only has part of the information for frame three (“BX” is part of “FreePBX”!). In particular, it doesn’t include the exception that has been triggered by the failure.
What the code is doing here is read the user name from the configuration, then look up the home directory, using the standard utilities for that, and validate that it is a directory, applying various fallbacks if it isn’t.
I think the exception is deep enough that it has to be in the configuration file lookup, or the the standard get home directory from account name function, but the missing information leaves too many options to consider.
By configuration here, I believe I mean the first level of configuration, which tells it basic things about the system as a whole, rather than the detailed configuration. My guess is that is in a file, or environment variables, not in a database.
This is what the SSH tells, im guessing this happened after a update, this is all i got from SSH, however i can go on the site and send the Whoop error from there
Most terminal programs allow you to scroll backward to text that has disappeared from the screen. You can also use the Unix/Linux “script” utility to capture the terminal session at the remote end.
If you are using the initial FreePBX 17 version of the file, it is on this line
which makes me think that either the Asterisk Web User doesn’t exist as a Linux user (not in /etc/passwd), or AMPASTERISKWEBUSER is wrongly set in the basic configuration.
Is there not a message saying the nature of the exception?
If it is not that exact version, you will need to tell me what is on line 364, in /var/www/html/admin/modules/pm2/Pm2.class.php on your system.
You should check /etc/amportal.conf to make sure that AMPASTERISKWEBUSER is correct (I believe it should be “asterisk”), and if it is present, you should check in /etc/passwd, to see if that user exists there.
At least one possibility is that you have been using a non-standard user name, possibly for security, and and the update has reverted the configuration to the standard name.
Also check that the home directory field is set for that user, in /etc/passwd.
If the source code line is the one that I highlighted in the 17.0 release version, the code hasn’t reached the point of even accessing the meta data for the directory, so the contents of the directory aren’t really relevant.
The code does: read the Asterisk web user from the FreePBX configuration file;
Read the /etc/passwd information for that user.
Trim leading and trailing space from that user.
The next step would be to test that it was actually a directory, but the OP says that his version of the source code file matches the one I referenced, in which case it hasn’t reached that line.
I think I’d expect a warning if the /etc/passwd file line wasn’t there, or didn’t have a directory, but, as far as I can tell from the documentation, I wouldn’t expect an error to be thrown.