FreePBX | Register | Issues | Wiki | Portal | Support

Error while updating ucpnode


#1

FreePBX version: 10.13.66-22
Asterisk Version: 13.23.1
ucpnode module version: 13.0.34.9
kernel version: 2.6.32-642.6.2.el6.i686

Hi all. While executing fwcnonsole ma updateall, I get the following error when ucpnode is being updated from 13.0.34.9 to 13.0.34.10

npm ERR! Linux 2.6.32-642.6.2.el6.i686
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install”
npm ERR! node v0.12.18
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE

npm ERR! node-expat@2.3.17 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat@2.3.17 install script ‘node-gyp rebuild’.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-expat
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR!
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /var/www/html/admin/modules/ucpnode/node/npm-debug.log
[npm-cache] [ERROR] [npm] error running npm install
[npm-cache] [ERROR] error installing dependencies

Failed updating libraries!

After this, ucpnode remains stopped, but I was able to restart it with fwconsole start ucpnode.

I don’t know if this error should be fixed or is just for information.

Any help appreciated.


(Akin) #2

We’ve been having exactly the same problem. I’ve found a dozen a so sources that claim the answer is to uninstall and reinstall ucpnode, which I’ve now done several times. Each time, it crashes on building the node-expat library.

I’ve tried uninstalling and reinstalling nodejs as well, but with no better result.

I’m at a loss as to how to proceed.


(Steven Davison) #3

I’ve got the same issue here on FreePBX13.

the log of the reinstall is here :- https://pastebin.com/rgjTegyX

If I start ucpnode… it seems to start, but UCP doesn’t work. If I refresh the dashboard, the service is down again.

This happened only after I rolled out the latest updates.

Any suggestions?


#4

I’m seeing the same issues when I try to update ucpnode and zulu

FreePBX13 10.13.66-22
Asterisk 13.23.1
ucpnode 13.0.34.10
zulu 13.0.56.4
kernel 2.6.32-642.6.2.el6.i686

npm ERR! node-expat@2.3.17 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat@2.3.17 install script ‘node-gyp rebuild’.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-expat
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR!
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /var/www/html/admin/modules/zulu/node/npm-debug.log

If I try to reinstall ucpnode I get the same error message. I’m also seeing warning messages earlier in the log…
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.

Do I need to update npm???


#5

I have the same problem. I even rolled back all updated modules but it still throws the error when installing ucpnode.

A fwconsole restart throws this error as well:

Starting UCP Node Server...
The command "runuser 'asterisk' -s '/bin/bash' -c 'cd /var/www/html/admin/modules/ucpnode/node && mkdir -p /home/asterisk/.pm2 && mkdir -p /var/www/html/admin/modules/ucpnode/node/logs && export HOME=/home/asterisk && export PM2_HOME=/home/asterisk/.pm2 && export ASTLOGDIR=/var/log/asterisk && export ASTVARLIBDIR=/var/lib/asterisk && export PATH=$HOME/.node/bin:$PATH && export NODE_PATH=$HOME/.node/lib/node_modules:$NODE_PATH && export MANPATH=$HOME/.node/share/man:$MANPATH && /var/www/html/admin/modules/pm2/node/node_modules/pm2/bin/pm2 start /var/www/html/admin/modules/ucpnode/node/index.js  --update-env --name '\''ucpnode'\'' -e '\''/var/log/asterisk/ucpnode_err.log'\'' -o '\''/var/log/asterisk/ucpnode_out.log'\'' --log '\''/dev/null'\'' --merge-logs --log-date-format '\''YYYY-MM-DD HH:mm Z'\'''" failed.

Exit Code: 1(General error)

Working directory: /root

Output:
================
┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬─────┬─────┬──────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
└──────────┴────┴──────┴─────┴────────┴─────────┴────────┴─────┴─────┴──────┴──────────┘
 Use `pm2 show <id|name>` to get more details about an app


Error Output:
================
/var/www/html/admin/modules/pm2/node/node_modules/pm2/node_modules/cron/lib/cron.js:239
                                                `Something went wrong. cron reached maximum iterations.
                                                ^
Unexpected token ILLEGAL

#6

Same here.


#7

Anyone from @sangoma ???


(Itzik) #8

It’s been 3 days, others are also reporting the same issue. Why don’t you take it to issues.freepbx.org?


#9

I think I will


(Andrew Nagy) #10

Hello.

This is resolved with: fwconsole ma downloadinstall ucpnode --tag=13.0.34.11

Please understand that you should try to schedule an upgrade away from FreePBX 13 and onto 14 as this will continue to happen as upstream providers start supporting newer products. NodeJS 0.12 in FreePBX 13 has no version locking, unlike NodeJS 8.x in FreePBX 14 that has version locking to prevent this issue.


(Howard) #11

I can confirm this seems to resolve the issue, thanks Andrew…


#12

I confirm that this seems to solve the issue for me. I could install this new version without getting any error messages, ucpnode process was restarted automatically by the install and I can access UCP.

@tm1000 I would really like to update to 14, but since I’m running 13 32bit, I understand there is no upgrade path for me so I would need to do a clean install. And since I already used up my 2 zend resets due to motheboard failure, I’m afraid I might lose my licensed SysAdmin Pro module if something goes wrong with the activation of the new install.


(Steven Davison) #13

Hi,

Another confirmed fix.

I assume that I’ll need to keep an eye out for this updating in the future?

Regards,

Steve


#14

The errors related to ucpnode do seem to be resolved with this update, however the UCP reports “You are working in offline mode” as soon as we try to make a change to the configuration on Device Management or attempt to view call event logs. This was working prior to updated being applied. In the debug console the issea appears to be the URL used to commit the changes. It’s reporting 404 for this url (host name redacted) “https://pbx.domainname.com:4443/undefined?module=endpoint&command=savesettings

When trying to view call event logs also results in offline mode. The console reports 500 (Internal Server Error) for this url:

https://pbx.domainname.com:4443/index.php?quietmode=1&module=cel&command=grid&extension=6965&sort=eventtime&order=desc&limit=10&offset=0

Anyone else have this issue?


(United States) #15

While fwconsole ma downloadinstall ucpnode --tag=13.0.34.11 fixed the UCP issues for me, Zulu is still broken. When trying to reinstall I this is what I get:

fwconsole ma downloadinstall zulu
No repos specified, using: [standard,commercial] from last GUI settings

Starting zulu download..
Processing zulu
Verifying local module download...Verified
Extracting...Done
Module zulu successfully downloaded
Updating tables zulu_interactions_interaction_states, zulu_softphones, zulu_tokens, zulu_interactions_contacts, zulu_interactions_interactions, zulu_interactions_owners, zulu_interactions_members, zulu_interactions_streams, zulu_interactions_stream_bodies, zulu_interactions_stream_links, zulu_interactions_stream_actions, zulu_login_tokens...Done
Installing/Updating Required Libraries. This may take a while...The following messages are ONLY FOR DEBUGGING. Ignore anything that says 'WARN' or is just a warning
Running installation..
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.

> websocket@1.0.28 install /var/www/html/admin/modules/zulu/node/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/var/www/html/admin/modules/zulu/node/node_modules/websocket/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: Leaving directory `/var/www/html/admin/modules/zulu/node/node_modules/websocket/build'

> ws@0.4.31 install /var/www/html/admin/modules/zulu/node/node_modules/ari-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/var/www/html/admin/modules/zulu/node/node_modules/ari-client/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: Leaving directory `/var/www/html/admin/modules/zulu/node/node_modules/ari-client/node_modules/ws/build'

> node-expat@2.3.17 install /var/www/html/admin/modules/zulu/node/node_modules/ltx/node_modules/node-expat
> node-gyp rebuild

make: Entering directory `/var/www/html/admin/modules/zulu/node/node_modules/ltx/node_modules/node-expat/build'
  CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlparse.o
  CC(target) Release/obj.target/expat/deps/libexpat/lib/xmltok.o
  CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlrole.o
  AR(target) Release/obj.target/deps/libexpat/libexpat.a
  COPY Release/libexpat.a
  CXX(target) Release/obj.target/node_expat/node-expat.o
In file included from ../node_modules/nan/nan.h:53,
                 from ../node-expat.cc:1:
/home/asterisk/.node-gyp/0.12.18/include/node/node.h: In function ‘void node::FatalException(const v8::TryCatch&)’:
/home/asterisk/.node-gyp/0.12.18/include/node/node.h:273: warning: ‘void node::FatalException(v8::Isolate*, const v8::TryCatch&)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node.h:270)
/home/asterisk/.node-gyp/0.12.18/include/node/node.h: In function ‘v8::Local<v8::Value> node::Encode(const void*, size_t, node::encoding)’:
/home/asterisk/.node-gyp/0.12.18/include/node/node.h:282: warning: ‘v8::Local<v8::Value> node::Encode(v8::Isolate*, const void*, size_t, node::encoding)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node.h:278)
/home/asterisk/.node-gyp/0.12.18/include/node/node.h: In function ‘ssize_t node::DecodeBytes(v8::Handle<v8::Value>, node::encoding)’:
/home/asterisk/.node-gyp/0.12.18/include/node/node.h:294: warning: ‘ssize_t node::DecodeBytes(v8::Isolate*, v8::Handle<v8::Value>, node::encoding)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node.h:291)
/home/asterisk/.node-gyp/0.12.18/include/node/node.h: In function ‘ssize_t node::DecodeWrite(char*, size_t, v8::Handle<v8::Value>, node::encoding)’:
/home/asterisk/.node-gyp/0.12.18/include/node/node.h:307: warning: ‘ssize_t node::DecodeWrite(v8::Isolate*, char*, size_t, v8::Handle<v8::Value>, node::encoding)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node.h:302)
In file included from ../node_modules/nan/nan.h:54,
                 from ../node-expat.cc:1:
/home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h: In function ‘v8::Local<v8::Object> node::Buffer::New(v8::Handle<v8::String>, node::encoding)’:
/home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h:55: warning: ‘v8::Local<v8::Object> node::Buffer::New(v8::Isolate*, v8::Handle<v8::String>, node::encoding)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h:52)
/home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h: In function ‘v8::Local<v8::Object> node::Buffer::New(const char*, size_t)’:
/home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h:65: warning: ‘v8::Local<v8::Object> node::Buffer::New(v8::Isolate*, const char*, size_t)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h:62)
/home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h: In function ‘v8::Local<v8::Object> node::Buffer::New(char*, size_t, void (*)(char*, void*), void*)’:
/home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h:75: warning: ‘v8::Local<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t, void (*)(char*, void*), void*)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h:70)
/home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h: In function ‘v8::Local<v8::Object> node::Buffer::Use(char*, uint32_t)’:
/home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h:88: warning: ‘v8::Local<v8::Object> node::Buffer::Use(v8::Isolate*, char*, uint32_t)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h:85)
In file included from ../node_modules/nan/nan_new.h:189,
                 from ../node_modules/nan/nan.h:223,
                 from ../node-expat.cc:1:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::StringObject> Nan::imp::Factory<v8::StringObject>::New(v8::Local<v8::String>)’:
../node_modules/nan/nan_implementation_12_inl.h:353: error: #pragma GCC diagnostic not allowed inside functions
../node_modules/nan/nan_implementation_12_inl.h:354: error: #pragma GCC diagnostic not allowed inside functions
../node_modules/nan/nan_implementation_12_inl.h:358: error: #pragma GCC diagnostic not allowed inside functions
In file included from ../node-expat.cc:1:
../node_modules/nan/nan.h: In function ‘Nan::MaybeLocal<v8::Object> Nan::NewBuffer(char*, size_t, void (*)(char*, void*), void*)’:
../node_modules/nan/nan.h:829: warning: ‘v8::Local<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t, void (*)(char*, void*), void*)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h:70)
../node_modules/nan/nan.h: In function ‘Nan::MaybeLocal<v8::Object> Nan::CopyBuffer(const char*, uint32_t)’:
../node_modules/nan/nan.h:844: warning: ‘v8::Local<v8::Object> node::Buffer::New(v8::Isolate*, const char*, size_t)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h:62)
../node_modules/nan/nan.h: In function ‘Nan::MaybeLocal<v8::Object> Nan::NewBuffer(char*, uint32_t)’:
../node_modules/nan/nan.h:870: warning: ‘v8::Local<v8::Object> node::Buffer::Use(v8::Isolate*, char*, uint32_t)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node_buffer.h:85)
../node_modules/nan/nan.h: In function ‘void Nan::FatalException(const Nan::TryCatch&)’:
../node_modules/nan/nan.h:1023: warning: ‘void node::FatalException(v8::Isolate*, const v8::TryCatch&)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node.h:270)
../node_modules/nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:1090: error: #pragma GCC diagnostic not allowed inside functions
../node_modules/nan/nan.h:1091: error: #pragma GCC diagnostic not allowed inside functions
../node_modules/nan/nan.h:1095: error: #pragma GCC diagnostic not allowed inside functions
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::Encode(const void*, size_t, Nan::Encoding)’:
../node_modules/nan/nan.h:2288: warning: ‘v8::Local<v8::Value> node::Encode(v8::Isolate*, const void*, size_t, node::encoding)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node.h:278)
../node_modules/nan/nan.h: In function ‘ssize_t Nan::DecodeBytes(v8::Local<v8::Value>, Nan::Encoding)’:
../node_modules/nan/nan.h:2304: warning: ‘ssize_t node::DecodeBytes(v8::Isolate*, v8::Handle<v8::Value>, node::encoding)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node.h:291)
../node_modules/nan/nan.h: In function ‘ssize_t Nan::DecodeWrite(char*, size_t, v8::Local<v8::Value>, Nan::Encoding)’:
../node_modules/nan/nan.h:2326: warning: ‘ssize_t node::DecodeWrite(v8::Isolate*, char*, size_t, v8::Handle<v8::Value>, node::encoding)’ is deprecated (declared at /home/asterisk/.node-gyp/0.12.18/include/node/node.h:302)
make: *** [Release/obj.target/node_expat/node-expat.o] Error 1
make: Leaving directory `/var/www/html/admin/modules/zulu/node/node_modules/ltx/node_modules/node-expat/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1078:12)
gyp ERR! System Linux 2.6.32-642.6.2.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/html/admin/modules/zulu/node/node_modules/ltx/node_modules/node-expat
gyp ERR! node -v v0.12.18
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 2.6.32-642.6.2.el6.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v0.12.18
npm ERR! npm  v2.15.11
npm ERR! code ELIFECYCLE

npm ERR! node-expat@2.3.17 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat@2.3.17 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-expat
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls node-expat
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/html/admin/modules/zulu/node/npm-debug.log

Failed updating libraries!
Stopping old running processes...Zulu Server is not running
Done
Migration from XMPP was done previously
Generating CSS...Done
Module zulu successfully installed
Updating Hooks...Done

And Zulu still does not actually start. Any ideas?


(Andrew Nagy) #16

You need to get zulu from EDGE.


(system) closed #17

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.