Page MenuHomePhabricator

RESTBase doesn't start - No storage group configured for localhost
Closed, ResolvedPublic

Description

Hey there,

at the moment, I'm trying to install a new RESTBase service for testing purposes. I'm using openSUSE Leap 15.0 (not 15.1) for my environment. The operating system was freshly installed and updates to the latest patch level.

After downloading the RESTBase components over git and installing all necessary packages with "npm install" and running the server with "node server,js" (I've done the same steps as they're documented at the RESTBase article), my system only throws the following error messages over and over again until I kill the RESTBase process:

{"name":"restbase","hostname":"linux-p2rf","pid":134906,"level":60,"err":{"message":"No storage group configured for localhost","name":"Error","stack":"Error: No storage group configured for localhost\n    at DB._resolveStorageGroup (/var/lib/restbase/restbase/node_modules/restbase-mod-table-sqlite/lib/db.js:88:19)\n    at DB._tableName (/var/lib/restbase/restbase/node_modules/restbase-mod-table-sqlite/lib/db.js:96:27)\n    at DB.createTable (/var/lib/restbase/restbase/node_modules/restbase-mod-table-sqlite/lib/db.js:155:43)\n    at RBSQLite.createTable (/var/lib/restbase/restbase/node_modules/restbase-mod-table-sqlite/index.js:37:22)\n    at tryCatcher (/var/lib/restbase/restbase/node_modules/bluebird/js/release/util.js:16:23)\n    at /var/lib/restbase/restbase/node_modules/bluebird/js/release/method.js:15:34\n    at handlerWrapper (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:422:37)\n    at next (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:408:42)\n    at Object.module.exports [as filter] (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/filters/validator.js:272:12)\n    at handlerWrapper (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:420:27)\n    at next (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:408:42)\n    at Object.module.exports [as filter] (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/filters/metrics.js:16:12)\n    at handlerWrapper (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:420:27)\n    at /var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:426:28\n    at P.resolve.then (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:229:24)\n    at tryCatcher (/var/lib/restbase/restbase/node_modules/bluebird/js/release/util.js:16:23)"},"stack":"Error: No storage group configured for localhost\n    at DB._resolveStorageGroup (/var/lib/restbase/restbase/node_modules/restbase-mod-table-sqlite/lib/db.js:88:19)\n    at DB._tableName (/var/lib/restbase/restbase/node_modules/restbase-mod-table-sqlite/lib/db.js:96:27)\n    at DB.createTable (/var/lib/restbase/restbase/node_modules/restbase-mod-table-sqlite/lib/db.js:155:43)\n    at RBSQLite.createTable (/var/lib/restbase/restbase/node_modules/restbase-mod-table-sqlite/index.js:37:22)\n    at tryCatcher (/var/lib/restbase/restbase/node_modules/bluebird/js/release/util.js:16:23)\n    at /var/lib/restbase/restbase/node_modules/bluebird/js/release/method.js:15:34\n    at handlerWrapper (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:422:37)\n    at next (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:408:42)\n    at Object.module.exports [as filter] (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/filters/validator.js:272:12)\n    at handlerWrapper (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:420:27)\n    at next (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:408:42)\n    at Object.module.exports [as filter] (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/filters/metrics.js:16:12)\n    at handlerWrapper (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:420:27)\n    at /var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:426:28\n    at P.resolve.then (/var/lib/restbase/restbase/node_modules/hyperswitch/lib/hyperswitch.js:229:24)\n    at tryCatcher (/var/lib/restbase/restbase/node_modules/bluebird/js/release/util.js:16:23)","levelPath":"fatal/startup","msg":"Message not supplied","time":"2019-06-11T20:44:22.888Z","v":0}

At this point, I've killed the RESTBase process. The error message above loops over and over again.

{"name":"restbase","hostname":"linux-p2rf","pid":134865,"level":30,"levelPath":"info/service-runner/master","msg":"master shutting down, killing workers","time":"2019-06-11T20:44:23.853Z","v":0}

{"name":"restbase","hostname":"linux-p2rf","pid":134865,"level":30,"levelPath":"info/service-runner/master","msg":"Exiting master","time":"2019-06-11T20:44:23.872Z","v":0}

I've used only the default configuration files for my RESTBase setup (cp config.example.yaml config.yaml)

Any ideas?

Event Timeline

mobrovac added a subscriber: mobrovac.

We have recently introduced storage groups for the SQLite back-end but haven't updated the example config, sorry about that! What you need to do is to add the following under the [table configuration](https://github.com/wikimedia/restbase/blob/b03051c088378dc1beeed2e5e4a5f815a0f67628/config.example.yaml#L57):

storage_groups:
  - name: default
    domains: /./

After that, RESTBase should start.

Hey, thanks for your fast reply.

RESTBase works fine now!

Thank you and have a nice day!

Im having the same issue, although adding the 3 lines above doesnt seem to resolve my issue.

table:

  backend: sqlite
  dbname: /root/restbase/db.sqlite3
  pool_idle_timeout: 20000
  retry_delay: 250
  retry_limit: 10
  show_sql: false
storage_groups:
  - name: default
    domains: /./
mobileapps:
  host: https://appservice.wmflabs.org
purged_cache_control: s-maxage=0, max-age=86400
purged_cache_control_client_cache: s-maxage=0, max-age=300

I was able to fix it by adding something like this:

table:
  backend: sqlite
  dbname: /root/restbase/db.sqlite3
  pool_idle_timeout: 20000
  retry_delay: 250
  retry_limit: 10
  show_sql: false
  storage_groups:
    - name: default
      domains: /./
mobileapps:
  host: https://appservice.wmflabs.org
purged_cache_control: s-maxage=0, max-age=86400
purged_cache_control_client_cache: s-maxage=0, max-age=300