简体   繁体   English

Dropwizard 0.8.2管理端口不起作用

[英]Dropwizard 0.8.2 Admin Port is not working

Does any one know, if there are currently any known bugs for DW admin port?At the moment I can not use admin port, because it it not available. 是否有人知道DW管理员端口当前是否存在任何已知错误?目前无法使用管理员端口,因为它不可用。

INFO  [2015-08-14 10:59:10,428] [] [] [main]: org.eclipse.jetty.server.handler.ContextHandler:?:?- Started i.d.j.MutableServletContextHandler@154bd49b{/,null,AVAILABLE}
INFO  [2015-08-14 10:59:10,432] [] [] [main]: io.dropwizard.setup.AdminEnvironment:?:?- tasks = 

    POST    /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask)
    POST    /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask)

INFO  [2015-08-14 10:59:10,437] [] [] [main]: org.eclipse.jetty.server.handler.ContextHandler:?:?- Started i.d.j.MutableServletContextHandler@1a87b51{/,null,AVAILABLE}
INFO  [2015-08-14 10:59:10,463] [] [] [main]: org.eclipse.jetty.server.ServerConnector:?:?- Started application@6c2d4cc6{HTTP/1.1}{0.0.0.0:80}
INFO  [2015-08-14 10:59:10,472] [] [] [main]: org.eclipse.jetty.server.ServerConnector:?:?- Started admin@30865a90{HTTP/1.1}{0.0.0.0:8080}
INFO  [2015-08-14 10:59:10,472] [] [] [main]: org.eclipse.jetty.server.Server:?:?- Started @3531ms

Try doing POST@localhost:8080/tasks/log-level or @../tasks/gc or @localhost:8080/healtcheck does not workn but it is finished very fast if server is not running and takes some time if server is running. 尝试执行POST @ localhost:8080 / tasks / log-level或@ .. / tasks / gc或@localhost:8080 / healtcheck不起作用,但如果服务器未运行则完成非常快,如果服务器正在运行则需要一些时间。

Does anyone have an idea what could be wrong here? 有谁知道这里可能有什么问题吗? I tried many different port, so this is not the problem. 我尝试了许多不同的端口,所以这不是问题。

The problem here was, that in config there was adminMaxThreads set to 2 by ITO. 这里的问题是,在配置中,ITO将adminMaxThreads设置为2。 Set this to 8 solves the problem. 将此设置为8可解决问题。

Update: With DW 0.8.4 I found another strange admin not working problem. 更新:使用DW 0.8.4,我发现了另一个奇怪的管理员无法正常工作的问题。 The above does not help, but commenting out solves the probem: 上面没有帮助,但是注释掉可以解决该问题:

server:
  rootPath: '/rest/*'
  requestLog:
    timeZone: UTC
    appenders:
     - type: console
       threshold: DEBUG
     - type: file
       currentLogFilename: ./logs/access.log
       threshold: ALL
       archive: true
       archivedLogFilenamePattern: ./logs/access.%d.log.gz
       archivedFileCount: 14
  #adminMinThreads: 12
  #adminMaxThreads: 16
  #maxThreads: 1024
  #minThreads: 12
  #maxQueuedRequests: 1024
  applicationConnectors:
    - type: http
      port: 52131
  adminConnectors:
    - type: http
      port: 52132

I dont know whats wrong with this config, if I remove the commented out lines, but above one works. 我不知道此配置有什么问题,如果我删除注释掉的行,但是上面的行是可行的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM