[英]Getting 502 Bad Gateway (Nginx) while accessing Java application deployed on kubernetes pod
[英]Getting 502 Bad Gateway while calling an end point configured in spring boot application deployed in GCP
我已經在Google Cloud Platform中部署了Spring Boot應用程序。 嘗試呼叫端點時,瀏覽器顯示502錯誤網關。
我可以在日志中看到以下錯誤:
2019-03-31 11:14:12.000 MDT [錯誤] 33#33:* 613 connect()在連接到上游時失敗(111:連接被拒絕),客戶端:2607:f8b0:400f:806 :: 2014,服務器: ,請求:“ GET / HTTP / 1.1”,上游:“ http://172.17.0.1:8080/ ”,主機:“ cricket-scorer.appspot.com”
以下是app.yaml文件中的內容:
env: flex
handlers:
- url: /.*
script: this field is required, but ignored"
拒絕連接錯誤表示您在“ http://172.17.0.1:8080/ ”中沒有監聽任何內容,或者防火牆阻止了該連接。
您發布的是整個app.yaml? 應該是這樣的:
runtime: java
env: flex
handlers:
- url: /.*
script: this field is required, but ignored
還要查看活動的防火牆規則。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.