Tomcat應用報錯:Unable to proxy method

當時的部署步驟如下:

  1. 安裝部署了tomcat應用

  2. 開了應用端口號,保存

  3. 在nginx服務器配置文件$nginx/conf/nginx.conf上添加了新增的應用服務器

  4. 重啓nginx:../sbin/nginx   -s   reload

查看新增的tomcat應用日誌,發現有以下警告:

2019-08-22 16:56:35,491 [localhost-startStop-1] WARN  org.springframework.aop.framework.CglibAopProxy - Unable to proxy method [public final java.lang.Object com.tmri.app.web.ctrl.AppLshpCtrl.uploadPhoto(org.springframework.web.multipart.MultipartHttpServletRequest,com.tmri.bus.bean.sys.NetSysLog) throws java.io.IOException] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.


經檢查,原來是在第3步修改配置文件的新增的應用服務器的端口號寫錯了,原本是7116,複製粘貼別處配置內容時,只改了IP,大意沒改端口號

upstream  app_server{

#舊

server 192.168.1.99 : 7116   max_fails=1  fail_timeout = 30s;

#新增

server 192.168.1.100 : 7226   max_fails=1  fail_timeout = 30s;

server 192.168.1.101 : 7226   max_fails=1  fail_timeout = 30s

}


修改配置端口號後,重啓nginx服務,檢查新部署應用log,無以上警告,正常工作了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章