SoftInstigate / restheart

Rapid API Development with MongoDB
https://restheart.org
GNU Affero General Public License v3.0
807 stars 171 forks source link

Restheart config file error with docker/mongodb configuration #155

Closed mitchhanks closed 8 years ago

mitchhanks commented 8 years ago

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: image

The command and error that I am getting is: image

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

connection-options:
    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.

ujibang commented 8 years ago

Can you please report the full error log

See docker logs command to know how to get the full container log

ujibang commented 8 years ago

I also noticed that you removed connection-options: before the entries MAX_HEADER_SIZE, MAX_ENTITY_SIZE, etc

in this way you get a yaml parsing exception

direct-buffers: true
connection-options:
    MAX_HEADER_SIZE: 1048576
    MAX_ENTITY_SIZE: -1
    MULTIPART_MAX_ENTITY_SIZE: -1
    IDLE_TIMEOUT: -1
    REQUEST_PARSE_TIMEOUT: -1
...
mitchhanks commented 8 years ago

Thank you for the reply!

Can you please report the full error log

See docker logs command to know how to get the full container log

I have looked at that page and it seems that you need to specify a container to receive the error logs.

I also noticed that you removed connection-options: before the entries MAX_HEADER_SIZE, MAX_ENTITY_SIZE, etc

in this way you get a yaml parsing exception

That was my mistake, with editing the comments out of the file as to make it more readable, that connection options: is actually there I just accidentally removed it on this post. I will edit the post.