我在服务器上运行Dropwizard jar。罐子停止后,罐子可以顺利运行几天。我必须一次又一次地重新部署它们。我很困惑它是一个码头错误还是我的代码错误。
日志: -
DEBUG [2017-10-23 07:30:15,682] org.eclipse.jetty.io.SelectChannelEndPoint: changeInterests p=false 0->1 for SelectChannelEndPoint@2bd26a7e{/103.75.33.58:49395<->8443,Open,in,out,FI,-,1/30000,SslConnection@31c57c5c}{io=0/1,kio=0,kro=1}
DEBUG [2017-10-23 07:30:15,682] org.eclipse.jetty.io.ManagedSelector: Queued change SelectChannelEndPoint@2bd26a7e{/103.75.33.58:49395<->8443,Open,in,out,FI,-,2/30000,SslConnection@31c57c5c}{io=0/1,kio=0,kro=1}:runUpdateKey on org.eclipse.jetty.io.ManagedSelector@34923f7f id=0 keys=4 selected=0
DEBUG [2017-10-23 07:30:15,682] org.eclipse.jetty.io.ManagedSelector: Selector loop woken up from select, 0/4 selected
DEBUG [2017-10-23 07:30:15,682] org.eclipse.jetty.io.ManagedSelector: Running change SelectChannelEndPoint@2bd26a7e{/103.75.33.58:49395<->8443,Open,in,out,FI,-,2/30000,SslConnection@31c57c5c}{io=0/1,kio=0,kro=1}:runUpdateKey
DEBUG [2017-10-23 07:30:15,682] org.eclipse.jetty.io.SelectChannelEndPoint: Key interests updated 0 -> 1 on SelectChannelEndPoint@2bd26a7e{/103.75.33.58:49395<->8443,Open,in,out,FI,-,2/30000,SslConnection@31c57c5c}{io=1/1,kio=1,kro=1}
DEBUG [2017-10-23 07:30:15,682] org.eclipse.jetty.io.ManagedSelector: Selector loop waiting on select
DEBUG [2017-10-23 07:30:15,682] org.eclipse.jetty.server.HttpConnection: HttpConnection@45813d2[DecryptedEndPoint@182fb3f8{/103.75.33.58:49395<->8443,Open,in,out,FI,-,3/30000,HttpConnection@45813d2}->SelectChannelEndPoint@2bd26a7e{/103.75.33.58:49395<->8443,Open,in,out,FI,-,2/30000,SslConnection@31c57c5c}{io=1/1,kio=1,kro=1}][p=HttpParser{s=START,0 of -1},g=HttpGenerator@5490b545{s=START},c=HttpChannelOverHttp@39ed3eb2{r=1,c=false,a=IDLE,uri=null}] onFillable exit HttpChannelState@2096bb19{s=IDLE a=NOT_ASYNC i=true r=!P!U w=false} null
DEBUG [2017-10-23 07:30:15,683] org.eclipse.jetty.io.ssl.SslConnection: onFillable exit DecryptedEndPoint@182fb3f8{/103.75.33.58:49395<->8443,Open,in,out,FI,-,4/30000,HttpConnection@45813d2}->SelectChannelEndPoint@2bd26a7e{/103.75.33.58:49395<->8443,Open,in,out,FI,-,3/30000,SslConnection@31c57c5c}{io=1/1,kio=1,kro=1}
DEBUG [2017-10-23 07:30:15,683] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Prod/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@1c7aefd3 ran SelectChannelEndPoint@2bd26a7e{/103.75.33.58:49395<->8443,Open,in,out,FI,-,3/30000,SslConnection@31c57c5c}{io=1/1,kio=1,kro=1}:runFillable
DEBUG [2017-10-23 07:30:15,683] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Prod/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@1c7aefd3 produce exit
DEBUG [2017-10-23 07:30:15,683] org.eclipse.jetty.util.thread.QueuedThreadPool: ran EPC Prod/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@1c7aefd3
DEBUG [2017-10-23 07:30:35,170] org.eclipse.jetty.io.IdleTimeout: SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,out,FI,-,29533/30000,SslConnection@6175e609}{io=1/1,kio=1,kro=1} idle timeout check, elapsed: 29513 ms, remaining: 487 ms
DEBUG [2017-10-23 07:30:35,662] org.eclipse.jetty.io.IdleTimeout: SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,out,FI,-,30025/30000,SslConnection@6175e609}{io=1/1,kio=1,kro=1} idle timeout check, elapsed: 30024 ms, remaining: -24 ms
DEBUG [2017-10-23 07:30:35,678] org.eclipse.jetty.io.IdleTimeout: SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,out,FI,-,30025/30000,SslConnection@6175e609}{io=1/1,kio=1,kro=1} idle timeout expired
DEBUG [2017-10-23 07:30:35,687] org.eclipse.jetty.http.HttpParser: close HttpParser{s=START,0 of -1}
DEBUG [2017-10-23 07:30:35,688] org.eclipse.jetty.http.HttpParser: START --> CLOSE
DEBUG [2017-10-23 07:30:35,797] org.eclipse.jetty.io.AbstractConnection: HttpConnection@566609d2[DecryptedEndPoint@236362d{/103.75.33.58:49389<->8443,Open,in,out,-,-,30059/30000,HttpConnection@566609d2}->SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,out,-,-,30053/30000,SslConnection@6175e609}{io=1/1,kio=1,kro=1}][p=HttpParser{s=CLOSE,0 of -1},g=HttpGenerator@52413532{s=START},c=HttpChannelOverHttp@72cecda9{r=1,c=false,a=IDLE,uri=null}] onFillInterestedFailed {}
DEBUG [2017-10-23 07:30:35,820] org.eclipse.jetty.io.ssl.SslConnection: SslConnection@6175e609{NOT_HANDSHAKING,eio=-1/-1,di=-1} -> HttpConnection@566609d2[DecryptedEndPoint@236362d{/103.75.33.58:49389<->8443,Open,in,out,-,-,30178/30000,HttpConnection@566609d2}->SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,out,-,-,30178/30000,SslConnection@6175e609}{io=1/1,kio=1,kro=1}][p=HttpParser{s=CLOSE,0 of -1},g=HttpGenerator@52413532{s=START},c=HttpChannelOverHttp@72cecda9{r=1,c=false,a=IDLE,uri=null}] shutdownOutput: oshut=false, ishut=false
DEBUG [2017-10-23 07:30:35,856] org.eclipse.jetty.io.ssl.SslConnection: SslConnection@6175e609{NEED_WRAP,eio=-1/-1,di=-1} -> HttpConnection@566609d2[DecryptedEndPoint@236362d{/103.75.33.58:49389<->8443,Open,in,out,-,-,30219/30000,HttpConnection@566609d2}->SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,out,-,-,30215/30000,SslConnection@6175e609}{io=1/1,kio=1,kro=1}][p=HttpParser{s=CLOSE,0 of -1},g=HttpGenerator@52413532{s=START},c=HttpChannelOverHttp@72cecda9{r=1,c=false,a=IDLE,uri=null}] flush b[0]=
DEBUG [2017-10-23 07:30:36,091] org.eclipse.jetty.io.ssl.SslConnection: SslConnection@6175e609{NEED_UNWRAP,eio=-1/69,di=-1} -> HttpConnection@566609d2[DecryptedEndPoint@236362d{/103.75.33.58:49389<->8443,Open,in,OSHUT,-,-,30230/30000,HttpConnection@566609d2}->SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,out,-,-,30226/30000,SslConnection@6175e609}{io=1/1,kio=1,kro=1}][p=HttpParser{s=CLOSE,0 of -1},g=HttpGenerator@52413532{s=START},c=HttpChannelOverHttp@72cecda9{r=1,c=false,a=IDLE,uri=null}] wrap Status = CLOSED HandshakeStatus = NEED_UNWRAP bytesConsumed = 0 bytesProduced = 69
DEBUG [2017-10-23 07:30:36,210] org.eclipse.jetty.io.ManagedSelector: Selector loop woken up from select, 1/3 selected
DEBUG [2017-10-23 07:30:36,216] org.eclipse.jetty.io.ChannelEndPoint: flushed 69 SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,out,-,-,30579/30000,SslConnection@6175e609}{io=1/0,kio=1,kro=1}
DEBUG [2017-10-23 07:30:36,217] org.eclipse.jetty.io.SelectChannelEndPoint: onSelected 1->0 r=true w=false for SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,out,-,-,1/30000,SslConnection@6175e609}{io=1/0,kio=1,kro=1}
DEBUG [2017-10-23 07:30:36,738] org.eclipse.jetty.io.ChannelEndPoint: oshut SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,out,-,-,0/30000,SslConnection@6175e609}{io=1/0,kio=1,kro=1}
DEBUG [2017-10-23 07:30:37,106] org.eclipse.jetty.io.SelectChannelEndPoint: task SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,OSHUT,-,-,787/30000,SslConnection@6175e609}{io=1/0,kio=1,kro=1}:runFillable
DEBUG [2017-10-23 07:30:37,488] org.eclipse.jetty.io.ManagedSelector: Selector loop woken up from select, 1/4 selected
DEBUG [2017-10-23 07:30:37,713] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Prod/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@2a296f34 produced SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,OSHUT,-,-,1497/30000,SslConnection@6175e609}{io=1/0,kio=1,kro=1}:runFillable
DEBUG [2017-10-23 07:30:37,714] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Pend/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@2a296f34 dispatch
DEBUG [2017-10-23 07:30:37,714] org.eclipse.jetty.util.thread.QueuedThreadPool: queue EPC Pend/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@2a296f34
DEBUG [2017-10-23 07:30:37,715] org.eclipse.jetty.util.thread.QueuedThreadPool: run EPC Pend/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@2a296f34
DEBUG [2017-10-23 07:30:37,715] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Pend/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@2a296f34 run
DEBUG [2017-10-23 07:30:37,715] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Prod/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@2a296f34 produce enter
DEBUG [2017-10-23 07:30:37,715] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Prod/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@2a296f34 producing
DEBUG [2017-10-23 07:30:37,715] org.eclipse.jetty.io.SelectChannelEndPoint: Key interests updated 1 -> 0 on SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,OSHUT,-,-,1499/30000,SslConnection@6175e609}{io=0/0,kio=0,kro=1}
DEBUG [2017-10-23 07:30:37,715] org.eclipse.jetty.io.ManagedSelector: Selector loop waiting on select
DEBUG [2017-10-23 07:30:37,715] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Prod/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@2a296f34 run SelectChannelEndPoint@324c5af{/103.75.33.58:49389<->8443,Open,in,OSHUT,-,-,1499/30000,SslConnection@6175e609}{io=0/0,kio=0,kro=1}:runFillable
DEBUG [2017-10-23 07:30:37,715] org.eclipse.jetty.io.FillInterest: FillInterest@74419a0e{false,null} fillable null
DEBUG [2017-10-23 07:30:37,812] org.eclipse.jetty.io.ManagedSelector: Selector loop woken up from select, 2/3 selected
DEBUG [2017-10-23 07:30:37,902] org.eclipse.jetty.io.SelectChannelEndPoint: onSelected 1->0 r=true w=false for SelectChannelEndPoint@20a688a1{/103.75.33.58:49391<->8443,Open,in,out,FI,-,29094/30000,SslConnection@43bf0072}{io=1/0,kio=1,kro=1}
DEBUG [2017-10-23 07:30:37,908] org.eclipse.jetty.io.SelectChannelEndPoint: task SelectChannelEndPoint@20a688a1{/103.75.33.58:49391<->8443,Open,in,out,FI,-,29094/30000,SslConnection@43bf0072}{io=1/0,kio=1,kro=1}:runFillable
DEBUG [2017-10-23 07:30:37,911] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Prod/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@1c7aefd3 produced SelectChannelEndPoint@20a688a1{/103.75.33.58:49391<->8443,Open,in,out,FI,-,29103/30000,SslConnection@43bf0072}{io=1/0,kio=1,kro=1}:runFillable
DEBUG [2017-10-23 07:30:37,912] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Pend/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@1c7aefd3 dispatch
DEBUG [2017-10-23 07:30:37,912] org.eclipse.jetty.util.thread.QueuedThreadPool: queue EPC Pend/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@1c7aefd3
DEBUG [2017-10-23 07:30:37,917] org.eclipse.jetty.util.thread.QueuedThreadPool: run EPC Pend/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@1c7aefd3
DEBUG [2017-10-23 07:30:37,917] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Pend/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@1c7aefd3 run
DEBUG [2017-10-23 07:30:37,917] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Prod/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@1c7aefd3 produce enter
DEBUG [2017-10-23 07:30:37,917] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Prod/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@1c7aefd3 producing
DEBUG [2017-10-23 07:30:37,919] org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume: EPC Pend/org.eclipse.jetty.io.ManagedSelector$SelectorProducer@1c7aefd3 run SelectChannelEndPoint@20a688a1{/103.75.33.58:49391<->8443,Open,in,out,FI,-,29111/30000,SslConnection@43bf0072}{io=0/0,kio=1,kro=1}:runFillable
和yaml配置
日志记录:
#所有记录器的默认级别。可以是OFF,ERROR,WARN,INFO,DEBUG,TRACE或ALL。 级别:DEBUG
追加程序:
- 类型:控制台
门槛:DEBUG
目标:stderr
- 类型:文件
门槛:DEBUG
logFormat:“%-6level [%d {HH:mm:ss.SSS}] [%t]%logger {5} - %X {code}%msg%n”“
currentLogFilename:target / application.log
存档:真实
archivedLogFilenamePattern:target / application-%d {yyyy-MM-dd} .log.gz
archivedFileCount:7
timeZone:UTC
招摇:
模式:
键入:https
resourcePackage:com.abc.tms.resource
服务器:
applicationContextPath:/
adminConnectors:
- 输入:http
港口:8086
applicationConnectors:
- 输入:http
港口:8984
#HTTP Config ----
- 键入:https
港口:8943
keyStorePath:/root/abc/truststore.jks
keyStorePassword:“abc”
keyStoreType:jks
validateCerts:false
validatePeers:false
bindHost: 0.0.0.0 # only bind to loopback
headerCacheSize: 512 bytes
outputBufferSize: 32KiB
maxRequestHeaderSize: 8KiB
maxResponseHeaderSize: 8KiB
inputBufferSize: 8KiB
idleTimeout: 30 seconds
minBufferPoolSize: 64 bytes
bufferPoolIncrement: 1KiB
maxBufferPoolSize: 64KiB
acceptorThreads: 1
selectorThreads: 2
acceptQueueSize: 1024
reuseAddress: true
soLingerTime: 345s
useServerHeader: false
useDateHeader: true
useForwardedHeaders: true
我已检查过服务器免费ram free -ht: - 总可用的免费共享缓存/缓存 内存:992M 766M 87M 10M 137M 57M 交换:0B 0B 0B 总计:992M 766M 87M
JVM堆大小: -
java -XX:+ PrintFlagsFinal -version | grep -iE
'HeapSize | PermSize | ThreadStackSize'
intx CompilerThreadStackSize = 0
{pd product}
uintx ErgoHeapSizeLimit = 0
{product}
uintx HeapSizePerGCThread = 87241520
{product}
uintx InitialHeapSize:= 16777216
{product}
uintx LargePageHeapSizeThreshold = 134217728
{product}
uintx MaxHeapSize:= 262144000
{product}
intx ThreadStackSize = 1024
{pd product}
intx VMThreadStackSize = 1024
{pd product}