Docker Community Forums

Share and learn in the Docker community.

Restheart config file error with docker/mongodb configuration


(Mitchhanks) #1

Hi,

I’m having an issue with setting up/updating my restheart/mongodb container to take the changes that I have made to the restheart.yml file (changing requests-limit from 1000 for more data)

My current set up is:

The command is:
docker run --rm -i -t -p 80:8080 -v restheart.yml:/Users/mitch/Downloads/restheart-2.0.2/restheart-2.0.2/etc/resthear
t.yml:ro --name restheartlink2 --link mongodb:mongodb softinstigate/restheart:2.0.1 restheart.yml

Error is:
Exception in thread “main” java.lang.NullPointerException
at org.restheart.Bootstrapper.main(Bootstrapper.java:122)

Config file is:

https-listener: true
https-host: 0.0.0.0
https-port: 4443

http-listener: true
http-host: 0.0.0.0
http-port: 8080

ajp-listener: false
ajp-host: 0.0.0.0
ajp-port: 8009

instance-name: restheartlinked

use-embedded-keystore: true

mongo-uri: mongodb://user:pass@127.0.0.1?authSource=authdb

mongo-mounts:
    - what: "*"
      where: /

static-resources-mounts:
    - what: browser
      where: /browser
      welcome-file: browser.html
      secured: false
      embedded: true

application-logic-mounts:
    - what: org.restheart.handlers.applicationlogic.PingHandler
      where: /ping
      secured: false
      args:
          msg: "greetings from the restheart team"
    - what: org.restheart.handlers.applicationlogic.GetRoleHandler
      where: /roles
      secured: false
      args:
          url: /_logic/roles

metadata-named-singletons:

    - group: checkers
      interface: org.restheart.hal.metadata.singletons.Checker
      singletons:
        - name: checkContent
          class: org.restheart.hal.metadata.singletons.SimpleContentChecker
        - name: checkContentSize
          class: org.restheart.hal.metadata.singletons.ContentSizeChecker
        - name: stringsToOids
          class: org.restheart.hal.metadata.singletons.ValidOidsStringsAsOidsTransformer
        - name: oidsToStrings
          class: org.restheart.hal.metadata.singletons.OidsAsStringsTransformer


    - group: transformers
      interface: org.restheart.hal.metadata.singletons.Transformer
      singletons:
        - name: addRequestProperties
          class: org.restheart.hal.metadata.singletons.RequestPropsInjecterTransformer
        - name: filterProperties
          class: org.restheart.hal.metadata.singletons.FilterTransformer


idm:
    implementation-class: org.restheart.security.impl.SimpleFileIdentityManager
    conf-file: ./etc/security.yml
access-manager:
    implementation-class: org.restheart.security.impl.SimpleAccessManager
    conf-file: ./etc/security.yml

auth-token-enabled: true
auth-token-ttl: 15

enable-log-file: true
log-file-path: /var/log/restheart.log
enable-log-console: true
log-level: DEBUG
requests-log-level: 1

etag-check-policy:
    db: REQUIRED
    coll: REQUIRED_FOR_DELETE
    doc: OPTIONAL

eager-cursor-allocation-pool-size: 100

eager-cursor-allocation-linear-slice-width: 1000
eager-cursor-allocation-linear-slice-delta: 100
eager-cursor-allocation-linear-slice-heights: [ 4, 2, 1 ]
eager-cursor-allocation-random-max-cursors: 20
eager-cursor-allocation-random-slice-min-width: 1000


local-cache-enabled: true
local-cache-ttl: 1000
requests-limit: 10000
io-threads: 2
worker-threads: 8
buffer-size: 16384
buffers-per-region: 20
direct-buffers: true
    MAX_HEADER_SIZE: 1048576
    MAX_ENTITY_SIZE: -1
    MULTIPART_MAX_ENTITY_SIZE: -1
    IDLE_TIMEOUT: -1
    REQUEST_PARSE_TIMEOUT: -1
    NO_REQUEST_TIMEOUT: -1
    MAX_PARAMETERS: 1000
    MAX_HEADERS: 200
    MAX_COOKIES: 200
    URL_CHARSET: UTF-8
    ALWAYS_SET_KEEP_ALIVE: true
    ALWAYS_SET_DATE: true

Any help would be much appreciated, thanks.