UCP Node Server 13.0.33.5 Update

Tonight, I was presented with UCP Node server version 13.0.33.5 update. When updating it, the page went crazy with errors and copies of the programs displayed on the screen. All attempts to install it come back failing. Anyone else seen this yet?

fwconsole ma upgrade framework && fwconsole ma upgradeall

1 Like

2 posts were split to a new topic: Bad permissions on Asterisk logs folder

That didn’t do it. Running that came back with errors as soon as it got to the ucpnode piece.
The culprit was this piece of code in the Ucpnode.class.php file

if(!file_exists($varlibdir.’/ucp’)) {
mkdir($varlibdir.’/ucp’);
}

I was able to comment this out, and get the module to install, I admit I couldn’t figure out where the varlibdir location is, but removing this stopped the error as far as I can tell.

Note: When you do this, you have to be careful to make a copy of this file, run the install, then restore the file, otherwise you will get a security error because it was modified.

If my solution was wrong, please feel free to correct me

I’ll add a “me too” on this one.

Install log gives no good info:
[npm-cache] [INFO] using /home/asterisk/.package_cache as cache directory
[npm-cache] [INFO] [composer] Dependency config file /var/www/html/admin/modules/ucpnode/node/composer.json does not exist. Skipping install
[npm-cache] [INFO] [npm] config file exists
[npm-cache] [INFO] [npm] cli exists
[npm-cache] [INFO] [npm] hash of /var/www/html/admin/modules/ucpnode/node/package.json: 27648d7714f5300b56ca17fc78e5873b
[npm-cache] [INFO] [npm] cache exists
[npm-cache] [INFO] [npm] clearing installed dependencies at /var/www/html/admin/modules/ucpnode/node/node_modules
[npm-cache] [INFO] [npm] …cleared
[npm-cache] [INFO] [npm] retrieving dependencies from /home/asterisk/.package_cache/npm/2.15.11/27648d7714f5300b56ca17fc78e5873b.tar.gz
[npm-cache] [INFO] [bower] Dependency config file /var/www/html/admin/modules/ucpnode/node/bower.json does not exist. Skipping install
[npm-cache] [INFO] [npm] done extracting
[npm-cache] [INFO] successfully installed all dependencies

I don’t know why it’s hitting the mkdir on that either, the /var/lib/asterisk/ucp directory exists on my install and it hits the line 235 mkdir($varlibdir.’/ucp’); as well.

Hi TM1000,

fwconsole ma upgrade framework && fwconsole ma upgradeall

Worked perfectly on numerous FreePBX servers.
Thanks!

1 Like

fwconsole ma upgrade framework && fwconsole ma upgradeall

Fixed it for me. Thanks.

1 Like

fwconsole ma upgrade framework && fwconsole ma upgradeall

Didn’t work for me either. Still getting the same UCP Node Server error.

For anyone having issues listed above you need to properly chown your system

fwconsole chown

Then run the commands above

Since there are different errors in this thread everyone needs to detail their specific errors for clarity. Thanks. Most likely it’s all permissions based and an fwconsole chown will fix it.

chown didn’t do it. Here is the error page:

  1. Whoops\Exception\ErrorException
    /­var/­www/­html/­admin/­modules/­ucpnode/­Ucpnode.class.php228
  2. Whoops\Run handleError
    <#unknown>0
  3. mkdir
    /­var/­www/­html/­admin/­modules/­ucpnode/­Ucpnode.class.php228
  4. FreePBX\modules\Ucpnode install
    /­var/­www/­html/­admin/­libraries/­modulefunctions.class.php2417
  5. module_functions _runscripts
    /­var/­www/­html/­admin/­libraries/­modulefunctions.class.php1974
  6. module_functions install
    /­var/­www/­html/­admin/­page.modules.php284
  7. include
    /­var/­www/­html/­admin/­config.php389

$cert = $this->freepbx->Certman->getDefaultCertDetails();
if(!empty($cert)) {
$this->setDefaultCert($cert);
}

	if(!file_exists($varlibdir.'/ucp')) {
		mkdir($varlibdir.'/ucp');
	}
	//need forever to be executable. it's sooo cutable

Server/Request Data
HTACCESS on
HTTP_HOST 192.168.10.253
HTTP_CONNECTION keep-alive
CONTENT_LENGTH 0
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
HTTP_ORIGIN http://192.168.10.253
HTTP_ACCEPT /
HTTP_DNT 1
HTTP_REFERER http://192.168.10.253/admin/config.php?display=modules
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.8
HTTP_COOKIE lang=en_US; searchHide=1; PHPSESSID=rhnmm2ciianap4f15r4kn5m6g0
PATH /sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE Apache/2.2.15 (CentOS) Server at 192.168.10.253 Port 80
SERVER_SOFTWARE Apache/2.2.15 (CentOS)
SERVER_NAME 192.168.10.253
SERVER_ADDR 192.168.10.253
SERVER_PORT 80
REMOTE_ADDR 192.168.10.100
DOCUMENT_ROOT /var/www/html
SERVER_ADMIN root@localhost
SCRIPT_FILENAME /var/www/html/admin/config.php
REMOTE_PORT 59257
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD POST
QUERY_STRING display=modules&action=process&quietmode=1&online=1&modules%5Bucpnode%5D%5Baction%5D=install&modules%5Bucpnode%5D%5Btrack%5D=stable
REQUEST_URI /admin/config.php?display=modules&action=process&quietmode=1&online=1&modules%5Bucpnode%5D%5Baction%5D=install&modules%5Bucpnode%5D%5Btrack%5D=stable
SCRIPT_NAME /admin/config.php
PHP_SELF /admin/config.php
REQUEST_TIME 1487046715
GET Data
display modules
action process
quietmode 1
online 1
modules Array ( [ucpnode] => Array ( [action] => install [track] => stable ) )
POST Data
empty
Files
empty
Cookies
lang en_US
searchHide 1
PHPSESSID rhnmm2ciianap4f15r4kn5m6g0
Session
langdirection ltr
module_name modules
module_page modules
AMP_user ampuser Object ( [username] => PaulT [id] => [password:ampuser:private] => 0c0df3d930071ca7bc56b37fcf7f4eca1006da1a [extension_high:ampuser:private] => [extension_low:ampuser:private] => [sections:ampuser:private] => Array ( [0] => * ) [mode:ampuser:private] => database [opmode:ampuser:private] => [_lastactivity] => 1487046716 )

Wait. That directory is owned by root. Aren’t you installing as root? It’s nearly impossible to get permission errors as the root user (since you are the master user). The error you posted is a Web based error. I specifically posted cli commands. The commands I posted need to be run from the cli. Not the web. (not sure how you’d run them from the web though).

fwconsole chown properly chowns said directories when the modules are installed. if they are hitting errors then your best bet is to delete the folders causing the errors (see below). This however needs to be done on the cli. Not through the web and not partially through the cli and then partially through the web. Thanks for your understanding.

fwconsole ma upgrade framework
fwconsole stop ucpnode
rm -Rf /var/lib/asterisk/ucp
fwconsole ma upgrade ucpnode
1 Like

Thank you, Andrew. This worked for me.

Thank you Andrew. This worked for me.

Moving forward, will I need to run these commands again or only if one module won’t upgrade via the web page? Also, it appears these commands up grade all modules found in “Module Admin”; is this correct?

Thanks
Michael