java 502 bad gateway,Java AWS Server:502 Bad Gateway nginx / 1.8.1

I am getting the 502 bad gateway error after uploading my application via eclipse and I don't understand why its happening?

I created a Sample Application through the AWS Elastic Beanstalk Console. Then I loaded the server in eclipse. Afterwards I published it and got the "Environment update completed successfully." message in the EB Console. However when I go to the url, I get a 502 Bad Gateway error. I looked at the logs to see what went wrong however only thing I found is

"failed (111: Connection refused) while connecting to upstream, client: 172.31.11.136, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:5000/favicon.ico", host: "k*****t.3attvpxcin.us-east-1.elasticbeanstalk.com", referrer: "http://k*****t.3attvpxcin.us-east-1.elasticbeanstalk.com/"

and

"no main manifest attribute, in application.jar"

I don't know what else the error is. Any help will be greatly appreciated

解决方案

When you select Java , as a container then your jar should be an executable jar.

i.e if you run using jar command from your console it should fail there as well.

what you should do to resolve it build it using plugin

e.g

org.springframework.boot

spring-boot-maven-plugin

this will solve the no manifest in jar issue , you can verify by

1. running jar from command propmpt or

2. open jar in winrar or something and see the content of maifest.mf file

the ngix issue is different

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值