2016-07-15 155 views
6

當我試圖在服務器上部署jar文件時,它已成功部署,然後執行startup.sh文件後,彈簧啓動應用程序啓動執行,但在執行後,日誌服務器不再回應。在服務器上啓動後彈簧啓動停止

[2016-07-15 11:01:38.714] boot - 14956 INFO [main] --- TomcatEmbeddedServletContainer: Tomcat started on port(s): 8084 (http) 
[2016-07-15 11:01:38.723] boot - 14956 INFO [main] --- Application: Started Application in 64.717 seconds (JVM running for 67.138) 
[2016-07-15 11:01:44.688] boot - 14956 INFO [Thread-4] --- AnnotationConfigEmbeddedWebApplicationContext: Closing org.springframework.boot[email protected]64375c2a: startup date [Fri Jul 15 11:00:38 EDT 2016]; root of context hierarchy 
[2016-07-15 11:01:44.692] boot - 14956 INFO [Thread-4] --- DefaultLifecycleProcessor: Stopping beans in phase 0 
[2016-07-15 11:01:44.752] boot - 14956 INFO [Thread-4] --- AnnotationMBeanExporter: Unregistering JMX-exposed beans on shutdown 
[2016-07-15 11:01:44.810] boot - 14956 INFO [Thread-4] --- LocalContainerEntityManagerFactoryBean: Closing JPA EntityManagerFactory for persistence unit 'default' 

還附上截圖。

enter image description here

請指導,謝謝 。

+0

使用命令kill -3 進行線程轉儲,因此我們將更清晰地瞭解下面的內容。 –

+2

我猜想這是Linux的內存不足的殺手,正在停止這個過程。這將幫助你找出如果是這樣的情況:http://stackoverflow.com/questions/624857/finding-which-process-was-killed-by-linux-oom-killer#624868 –

回答

3

如果您正在使用Maven添加到您的pom.xml

<dependency> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-starter-web</artifactId> 
</dependency> 

它應該工作。

+0

嗨baris,這種依賴已經在我的pom.xml中。 –

+0

很抱歉。所以也許系統內存造成這種情況。你有多少內存和負載是多少? – 2016-07-25 12:01:21

+0

嗨,最初我使用512MB空間服務器,然後我移動到2GB然後它的工作正常。 –