Topic on Talk:RESTBase

Timeout waiting for config in worker

6
Prh47bridge (talkcontribs)

I'm trying to get RESTBase set up on my wiki. I've downloaded it, run npm install and updated the configuration. However, about 3-4 seconds after startup I get the above error message from node_modules/service-runner/lib/worker.js. In case it is relevant I'm running on Ubuntu 14.04 using SQLite. I expect it is something silly I've missed but any pointers would be much appreciated.

Mobrovac-WMF (talkcontribs)

This means that the worker never received the config from the master process, which is rather unusual. Could you try starting your service with `no_workers: 0` set in your config YAML and see if the service works?

Prh47bridge (talkcontribs)

Thanks for your response. I've tried it and that doesn't seem to make any difference. However, if I put "-n 0" on the command line it exits immediately with the message:

const P = require('bluebird'); ^^^^^ {"name":"restbase","hostname":"XXXXX","pid":31218,"level":60,"err":{"message":"Use of const in strict mode.","name":"SyntaxError","stack":"SyntaxError: Use of const in strict mode.\n at Module._compile (module.js:439:25)\n at Object.Module._extensions..js (module.js:474:10)\n at Module.load (module.js:356:32)\n at Function.Module._load (module.js:312:12)\n at Module.require (module.js:364:17)\n at require (module.js:380:17)\n at Object.<anonymous> (/usr/local/restbase/node_modules/hyperswitch/index.js:3:18)\n at Module._compile (module.js:456:26)\n at Object.Module._extensions..js (module.js:474:10)\n at Module.load (module.js:356:32)\n at Function.Module._load (module.js:312:12)\n at Module.require (module.js:364:17)\n at require (module.js:380:17)\n at Master.BaseService._requireModule (/usr/local/restbase/node_modules/service-runner/lib/base_service.js:309:26)\n at P.map.then.self.serviceReturns (/usr/local/restbase/node_modules/service-runner/lib/worker.js:162:21)\n at tryCatcher (/usr/local/restbase/node_modules/bluebird/js/release/util.js:16:23)","moduleName":"hyperswitch","levelPath":"fatal/service-runner/worker"},"msg":"Use of const in strict mode.","time":"2016-12-24T10:34:40.865Z","v":0}

where XXXXX is the name of my server. There is no other error message.

Without the -n 0 I get:

{"name":"restbase","hostname":"XXXXX","pid":31224,"level":30,"levelPath":"info/service-runner","msg":"master(31224) initializing 4 workers","time":"2016-12-24T10:34:53.531Z","v":0} {"name":"restbase","hostname":"XXXXX","pid":30911,"level":60,"err":{"message":"Object function Object() { [native code] } has no method 'assign'","name":"TypeError","stack":"TypeError: Object function Object() { [native code] } has no method 'assign'\n at /usr/local/restbase/node_modules/service-runner/lib/master.js:207:33\n at Promise._execute (/usr/local/restbase/node_modules/bluebird/js/release/debuggability.js:299:9)\n at Promise._resolveFromExecutor (/usr/local/restbase/node_modules/bluebird/js/release/promise.js:481:18)\n at new Promise (/usr/local/restbase/node_modules/bluebird/js/release/promise.js:77:14)\n at Master._startWorkers (/usr/local/restbase/node_modules/service-runner/lib/master.js:204:16)\n at /usr/local/restbase/node_modules/service-runner/lib/master.js:107:21\n at tryCatcher (/usr/local/restbase/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/usr/local/restbase/node_modules/bluebird/js/release/promise.js:510:31)\n at Promise._settlePromise (/usr/local/restbase/node_modules/bluebird/js/release/promise.js:567:18)\n at Promise._settlePromise0 (/usr/local/restbase/node_modules/bluebird/js/release/promise.js:612:10)\n at Promise._settlePromises (/usr/local/restbase/node_modules/bluebird/js/release/promise.js:691:18)\n at Async._drainQueue (/usr/local/restbase/node_modules/bluebird/js/release/async.js:138:16)\n at Async._drainQueues (/usr/local/restbase/node_modules/bluebird/js/release/async.js:148:10)\n at Async.drainQueues (/usr/local/restbase/node_modules/bluebird/js/release/async.js:17:14)\n at process._tickCallback (node.js:448:13)","levelPath":"fatal/service-runner/unhandled"},"msg":"Object function Object() { [native code] } has no method 'assign'","time":"2016-12-24T10:29:09.261Z","v":0}

The above text is in white and is followed by the error message regarding a timeout in red. My bad - I hadn't looked properly at the white text before and should have reported that. Am I missing a dependency?

Mobrovac-WMF (talkcontribs)

Are you using Node >= 4 ? These messages indicate that you might be running it on an older version. Is that the case? Note that RESTBase needs Node >= 4 in order to run properly.

Prh47bridge (talkcontribs)

That would be the problem then! The README.md file says I need 0.10+ and, since I've got 0.10.37, I assumed that would be ok. Suggest someone updates the README! Thanks for your help.

Mobrovac-WMF (talkcontribs)

Oh, right! Will update, thank you for pointing that out.