1. 程式人生 > >Server Tomcat v8.5 Server at localhost was unable to start within 45 seconds

Server Tomcat v8.5 Server at localhost was unable to start within 45 seconds

問題: Server Tomcat v8.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor. Java Web專案啟動除錯時,提示此錯誤,如下圖: 在這裡插入圖片描述 這種情況存在兩種可能,一種是專案配置有錯誤(可能是資料庫、Redis之類的配置錯誤,也可能是相關的服務沒有啟動,防火牆之類的);

另一種是專案啟動的確實比較慢,需要更長的時間,解決方法如下:

開啟Server檢視,雙擊Tomcat v8.5 Server 將啟動時間限制改大: 在這裡插入圖片描述

按Ctrl+S儲存,然後再啟動除錯。 如果時間已經改的很大了,還是不能啟動成功,有以下兩種情況:

1、專案配置有問題;

2、tomcat 的 webapps 目錄下還有其它的專案,導致服務啟動失敗了,嘗試刪除其它專案,再啟動除錯看看。 在這裡插入圖片描述