Http 307 redirect fails for Put Post calls - jetty

I am noticing 307 redirect working only for Get calls in jetty httpclient.
For Post/Put redirection are not happening when body present with request.
We are using jetty-client:11.0.11
Update 1
I did poc code to try out the put post calls with httpclient over http2 and was getting response properly.
As in my actual use case we are using Spring webclient + httpclient over http2 , I need to check if that is somehow causing the problem. As of this point no issue with httpclient library.
Update 2
I was able to recreate the issue with Spring Webclient + jetty httpclient
and getting below exception
Multiple subscriptions not supported on AsyncRequestContent
Also this exception is not coming if we are not sending body with the POST/PUT request.
Code snippets below
build.gradle dependencies added
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'com.darylteo.gradle:javassist-plugin:0.4.1'
implementation 'commons-codec:commons-codec'
implementation 'org.eclipse.jetty:jetty-http:11.0.11'
implementation 'org.eclipse.jetty.http2:http2-http-client-transport:11.0.11'
implementation 'org.eclipse.jetty:jetty-client:11.0.11'
implementation 'org.eclipse.jetty.http2:http2-client:11.0.11'
implementation 'org.eclipse.jetty:jetty-alpn-client:11.0.11'
implementation 'org.eclipse.jetty:jetty-io:11.0.11'
implementation 'org.eclipse.jetty:jetty-util:11.0.11'
implementation 'org.eclipse.jetty:jetty-alpn-java-client:11.0.11'
implementation 'org.eclipse.jetty.http2:http2-common:11.0.11'
implementation 'org.eclipse.jetty.http2:http2-hpack:11.0.11'
implementation 'org.eclipse.jetty:jetty-reactive-httpclient:3.0.6'
HttpClient over http2transport
private HttpClient httpClient;
#PostConstruct
public HttpClient jettyClient(){
SslContextFactory.Client sslClient = new SslContextFactory.Client(true);
ClientConnector connector = new ClientConnector();
connector.setSslContextFactory(sslClient);
HTTP2Client http2Client = new HTTP2Client(connector);
HttpClientTransportOverHTTP2 transportOverHTTP2 = new HttpClientTransportOverHTTP2(http2Client);
httpClient = new HttpClient(transportOverHTTP2);
httpClient.setFollowRedirects(true);
try {
httpClient.start();
} catch (Exception e) {
e.printStackTrace();
}
return httpClient;
}
public HttpClient getHttpClient() {return httpClient;}
RestController
#Value("${sleepTime}")
long sleep;
#Value("${errorCode}")
int errorCode;
#Autowired
Http2Client http2Client;
#RequestMapping("**")
public ResponseEntity<byte[]> post_greet(RequestEntity<byte[]> requestEntity) throws InterruptedException{
System.out.println("Inside Post greet****");
HttpHeaders httpHeaders = requestEntity.getHeaders();
System.out.println("uri:"+ requestEntity.getUrl());
System.out.println("content-type:" + httpHeaders.getContentType());
System.out.println("content-length:" + httpHeaders.getContentLength());
MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
headers.addAll(requestEntity.getHeaders());
Thread.sleep(sleep);
headers.remove("accept-encoding");
headers.remove("user-agent");
headers.remove("accept");
headers.remove("content-length");
System.out.println("Exit Post greet****");
return new ResponseEntity<byte[]>(requestEntity.getBody(),headers,HttpStatus.OK);
}
#RequestMapping(value = "/redirect")
public Mono<ResponseEntity<byte[]>> redirect(RequestEntity<byte[]> requestEntity){
System.out.println("Got request now redirecting****");
MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
headers.add("Location", "http://localhost:8787/redirect-url");
return Mono.just(new ResponseEntity<>(headers,HttpStatus.TEMPORARY_REDIRECT));
}
#GetMapping(value = "/start")
public Mono<ResponseEntity<byte[]>> start(RequestEntity<byte[]> requestEntity)
throws InterruptedException, TimeoutException, ExecutionException{
System.out.println("JettyClient start call****");
ClientHttpConnector clientConnector =
new JettyClientHttpConnector(http2Client.getHttpClient());
WebClient webClient = WebClient.builder()
.clientConnector(clientConnector)
.build();
Mono<ResponseEntity<byte[]>> monoResponse = webClient
.method(HttpMethod.POST)
.uri("http://localhost:8787/redirect")
.headers(hdrs->hdrs.add("Content-Type", "application/json"))
.body(BodyInserters.fromValue("\"greetings\":\"Hello Mr Andersen\""))
.exchange()
.flatMap(clientResponse->{
System.out.println("WebClient response code :: " +clientResponse.statusCode());
return clientResponse.toEntity(byte[].class);
})
.onErrorResume(WebClientException.class,clientResponse->{
System.out.println("Exception is :: " + clientResponse.getLocalizedMessage());
ResponseEntity<byte[]> response = new ResponseEntity<byte[]>("Exception occured".getBytes(StandardCharsets.UTF_8),HttpStatus.INTERNAL_SERVER_ERROR);
return Mono.just(response);
})
.doOnCancel(()->System.out.println("Request was cancelled"));
MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
headers.addAll(requestEntity.getHeaders());
headers.remove("accept-encoding");
headers.remove("user-agent");
headers.remove("accept");
headers.remove("content-length");
System.out.println("JettyClient start end****");
return monoResponse;
}
Logs attached below
2022-10-20 09:28:02.149 INFO 7992 --- [ main] com.example.demo.StubserverApplication : Started StubserverApplication in 1.829 seconds (JVM running for 2.198)
JettyClient start call****
JettyClient start end****
Got request now redirecting****
Exception is :: Multiple subscriptions not supported on
AsyncRequestContent#49b1a991[demand=0,stalled=true,chunks=0]; nested
exception is java.lang.IllegalStateException: Multiple subscriptions not
supported on
AsyncRequestContent#49b1a991[demand=0,stalled=true,chunks=0]
Flows working
Httpclient only (reactive)
Request request = http2Client.getClient().newRequest("http://localhost:8787/redirect").method(HttpMethod.POST);
request.body(new StringRequestContent("\"greetings\":\"Hello Mr Andersen\"")).headers(s->s.add(HttpHeader.CONTENT_TYPE, "application/json"));
ReactiveRequest reactiveRequest = ReactiveRequest.newBuilder(request).build();
Publisher<ReactiveResponse> publisher = reactiveRequest.response();
Httpclient only (non reactive)
ContentResponse response =
http2Client.getClient().POST("http://localhost:8787/redirect"). content(new
StringContentProvider("\"greetings\":\"Hello Mr Andersen\""),
"application/json").send();
Flow not working
Httpclient with Spring webclient reactive
ClientHttpConnector clientConnector =
new JettyClientHttpConnector(http2Client.getHttpClient());
WebClient webClient = WebClient.builder()
.clientConnector(clientConnector)
.build();
Mono<ResponseEntity<byte[]>> monoResponse = webClient
.method(HttpMethod.POST)...
LOGS
2022-10-26 22:33:52.715 DEBUG 10808 --- [ctor-http-nio-3] o.s.w.s.adapter.HttpWebHandlerAdapter : [5d46ae80/1-2] HTTP POST "/redirect"
2022-10-26 22:33:52.722 DEBUG 10808 --- [ctor-http-nio-3] s.w.r.r.m.a.RequestMappingHandlerMapping : [5d46ae80/1-2] Mapped to com.example.demo.ServerController#redirect(RequestEntity)
2022-10-26 22:33:52.722 DEBUG 10808 --- [ctor-http-nio-3] r.r.m.a.HttpEntityMethodArgumentResolver : [5d46ae80/1-2] Content-Type:application/json
2022-10-26 22:33:52.722 DEBUG 10808 --- [ctor-http-nio-3] r.r.m.a.HttpEntityMethodArgumentResolver : [5d46ae80/1-2] 0..1 [byte[]]
2022-10-26 22:33:52.726 DEBUG 10808 --- [ctor-http-nio-3] o.s.core.codec.ByteArrayDecoder : [5d46ae80/1-2] Read 31 bytes
2022-10-26 22:33:52.730 DEBUG 10808 --- [ctor-http-nio-3] o.s.w.s.adapter.HttpWebHandlerAdapter : [5d46ae80/1-2] Completed 307 TEMPORARY_REDIRECT
2022-10-26 22:33:52.739 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.io.ManagedSelector : Selector sun.nio.ch.WEPollSelectorImpl#2962d398 woken up from select, 1/1/1 selected
2022-10-26 22:33:52.739 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.io.ManagedSelector : Selector sun.nio.ch.WEPollSelectorImpl#2962d398 processing 1 keys, 0 updates
2022-10-26 22:33:52.740 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.io.ManagedSelector : selected 1 channel=java.nio.channels.SocketChannel[connected local=/127.0.0.1:62033 remote=localhost/127.0.0.1:8787], selector=sun.nio.ch.WEPollSelectorImpl#2962d398, interestOps=1, readyOps=1 SocketChannelEndPoint#321dd779[{l=/127.0.0.1:62033,r=localhost/127.0.0.1:8787,OPEN,fill=FI,flush=-,to=44/30000}{io=1/1,kio=1,kro=1}]->[HTTP2ClientConnection#2a930f0e]
2022-10-26 22:33:52.741 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.io.SelectableChannelEndPoint : onSelected 1->0 r=true w=false for SocketChannelEndPoint#321dd779[{l=/127.0.0.1:62033,r=localhost/127.0.0.1:8787,OPEN,fill=FI,flush=-,to=45/30000}{io=1/0,kio=1,kro=1}]->[HTTP2ClientConnection#2a930f0e]
2022-10-26 22:33:52.741 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.io.SelectableChannelEndPoint : task SocketChannelEndPoint#321dd779[{l=/127.0.0.1:62033,r=localhost/127.0.0.1:8787,OPEN,fill=FI,flush=-,to=45/30000}{io=1/0,kio=1,kro=1}]->[HTTP2ClientConnection#2a930f0e]:runFillable:EITHER
2022-10-26 22:33:52.741 DEBUG 10808 --- [ient#eadd4fb-20] o.e.j.u.thread.ReservedThreadExecutor : ReservedThreadExecutor#3688eb5b{reserved=0/4,pending=0} tryExecute org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy$$Lambda$482/0x0000000800f16ca0#1424c3b3
2022-10-26 22:33:52.742 DEBUG 10808 --- [ient#eadd4fb-20] o.e.j.u.thread.ReservedThreadExecutor : ReservedThreadExecutor#3688eb5b{reserved=0/4,pending=1} startReservedThread p=1
2022-10-26 22:33:52.742 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.util.thread.QueuedThreadPool : queue ReservedThread#7abbbb35{PENDING,thread=null} startThread=0
2022-10-26 22:33:52.742 DEBUG 10808 --- [ient#eadd4fb-20] o.e.j.u.t.s.AdaptiveExecutionStrategy : ss=PRODUCE_INVOKE_CONSUME t=SocketChannelEndPoint#321dd779[{l=/127.0.0.1:62033,r=localhost/127.0.0.1:8787,OPEN,fill=FI,flush=-,to=47/30000}{io=1/0,kio=1,kro=1}]->[HTTP2ClientConnection#2a930f0e]:runFillable:EITHER/EITHER AdaptiveExecutionStrategy#1b75c2e3/SelectorProducer#1984b1f/PRODUCING/p=false/QueuedThreadPool[HttpClient#eadd4fb]#f1da57d{STARTED,8<=8<=200,i=6,r=-1,q=0}[ReservedThreadExecutor#3688eb5b{reserved=0/4,pending=1}][pc=0,pic=0,pec=0,epc=0]#2022-10-26T22:33:52.7434704+05:30
2022-10-26 22:33:52.742 DEBUG 10808 --- [ient#eadd4fb-22] o.e.jetty.util.thread.QueuedThreadPool : run ReservedThread#7abbbb35{PENDING,thread=null} in QueuedThreadPool[HttpClient#eadd4fb]#f1da57d{STARTED,8<=8<=200,i=6,r=-1,q=0}[ReservedThreadExecutor#3688eb5b{reserved=0/4,pending=1}]
2022-10-26 22:33:52.743 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.io.FillInterest : fillable FillInterest#36fdedce{org.eclipse.jetty.http2.HTTP2Connection$FillableCallback#60296b33}
2022-10-26 22:33:52.745 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.http2.HTTP2Connection : HTTP2 onFillable HTTP2ClientConnection#2a930f0e::SocketChannelEndPoint#321dd779[{l=/127.0.0.1:62033,r=localhost/127.0.0.1:8787,OPEN,fill=-,flush=-,to=49/30000}{io=1/0,kio=1,kro=1}]->[HTTP2ClientConnection#2a930f0e]
2022-10-26 22:33:52.745 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.http2.HTTP2Connection : HTTP2 produce HTTP2ClientConnection#2a930f0e::SocketChannelEndPoint#321dd779[{l=/127.0.0.1:62033,r=localhost/127.0.0.1:8787,OPEN,fill=-,flush=-,to=49/30000}{io=1/0,kio=1,kro=1}]->[HTTP2ClientConnection#2a930f0e]
2022-10-26 22:33:52.746 DEBUG 10808 --- [ient#eadd4fb-20] o.e.j.u.t.s.AdaptiveExecutionStrategy : AdaptiveExecutionStrategy#17f16706/HTTP2Producer#480486a2/IDLE/p=false/QueuedThreadPool[HttpClient#eadd4fb]#f1da57d{STARTED,8<=8<=200,i=6,r=-1,q=0}[ReservedThreadExecutor#3688eb5b{reserved=1/4,pending=0}][pc=0,pic=0,pec=0,epc=0]#2022-10-26T22:33:52.7460585+05:30 tryProduce false
2022-10-26 22:33:52.746 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.http2.HTTP2Connection : Dequeued task null
2022-10-26 22:33:52.746 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.http2.HTTP2Connection : Acquired org.eclipse.jetty.http2.HTTP2Connection$NetworkBuffer#4830c68a
2022-10-26 22:33:52.747 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.io.SocketChannelEndPoint : filled 53 DirectByteBuffer#771ad687[p=0,l=53,c=16384,r=53]={<<<\x00\x00,\x01\x05\x00\x00\x00\x01H\x03307n"http://lo...st:8787/redirect-url\\\x010>>>\r\x82d?S\x83\xF9c\xE7...\x00\x00\x00\x00\x00\x00\x00}
2022-10-26 22:33:52.745 DEBUG 10808 --- [ient#eadd4fb-22] o.e.j.u.thread.ReservedThreadExecutor : ReservedThread#7abbbb35{PENDING,thread=Thread[HttpClient#eadd4fb-22,5,main]} was=PENDING next=RESERVED size=0+1 capacity=4
2022-10-26 22:33:52.751 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.http2.HTTP2Connection : Filled 53 bytes in org.eclipse.jetty.http2.HTTP2Connection$NetworkBuffer#4830c68a
2022-10-26 22:33:52.752 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.http2.parser.Parser : Parsed [HEADERS|44|5|1] frame header from java.nio.DirectByteBuffer[pos=9 lim=53 cap=16384]#d81b37ff
2022-10-26 22:33:52.752 DEBUG 10808 --- [ient#eadd4fb-22] o.e.j.u.thread.ReservedThreadExecutor : ReservedThread#7abbbb35{RESERVED,thread=Thread[HttpClient#eadd4fb-22,5,main]} waiting ReservedThreadExecutor#3688eb5b{reserved=1/4,pending=0}
2022-10-26 22:33:52.754 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackDecoder : CtxTbl[ee9c664] decoding 44 octets
2022-10-26 22:33:52.754 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackDecoder : decode 48033330376e22687474703a2f2f6c6f63616c686f73743a383738372f72656469726563742d75726c5c0130
2022-10-26 22:33:52.755 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackDecoder : decoded ':status: 307' by IdxName/LitVal/Idx
2022-10-26 22:33:52.756 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackContext : HdrTbl[ee9c664] added {D,0,:status: 307,44a38f23}
2022-10-26 22:33:52.756 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackContext : HdrTbl[ee9c664] entries=1, size=42, max=4096
2022-10-26 22:33:52.757 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackDecoder : decode 6e22687474703a2f2f6c6f63616c686f73743a383738372f72656469726563742d75726c5c0130
2022-10-26 22:33:52.757 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackDecoder : decoded 'location: http://localhost:8787/redirect-url' by IdxName/LitVal/Idx
2022-10-26 22:33:52.757 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackContext : HdrTbl[ee9c664] added {D,1,location: http://localhost:8787/redirect-url,247b2db0}
2022-10-26 22:33:52.758 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackContext : HdrTbl[ee9c664] entries=2, size=116, max=4096
2022-10-26 22:33:52.758 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackDecoder : decode 5c0130
2022-10-26 22:33:52.758 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackDecoder : decoded 'Content-Length: 0' by IdxName/LitVal/Idx
2022-10-26 22:33:52.758 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackContext : HdrTbl[ee9c664] added {D,2,Content-Length: 0,5ee2c293}
2022-10-26 22:33:52.759 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.http2.hpack.HpackContext : HdrTbl[ee9c664] entries=3, size=163, max=4096
2022-10-26 22:33:52.759 DEBUG 10808 --- [ient#eadd4fb-20] o.eclipse.jetty.http2.parser.BodyParser : Parsed HEADERS frame hpack from java.nio.DirectByteBuffer[pos=53 lim=53 cap=16384]
2022-10-26 22:33:52.759 DEBUG 10808 --- [ient#eadd4fb-20] o.e.j.http2.client.HTTP2ClientSession : Received HeadersFrame#43014c4d#1{end=true}
2022-10-26 22:33:52.760 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.http2.HTTP2Stream : Update close for HTTP2Stream#54bc89e6#1#6384107{sendWindow=65504,recvWindow=8388608,demand=0,reset=false/false,LOCALLY_CLOSED,age=106,attachment=HttpReceiverOverHTTP2#88410f7(rsp=IDLE,failure=null)} update=true event=RECEIVED
2022-10-26 22:33:52.760 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.http2.HTTP2Session : Removed local HTTP2Stream#54bc89e6#1#6384107{sendWindow=65504,recvWindow=8388608,demand=0,reset=false/false,CLOSED,age=107,attachment=HttpReceiverOverHTTP2#88410f7(rsp=IDLE,failure=null)} from HTTP2ClientSession#6384107{local:/127.0.0.1:62033,remote:localhost/127.0.0.1:8787,sendWindow=65504,recvWindow=16777216,state=[streams=1,NOT_CLOSED,goAwayRecv=null,goAwaySent=null,failure=null]}
2022-10-26 22:33:52.760 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.http2.HTTP2Session : Closed stream HTTP2Stream#54bc89e6#1#6384107{sendWindow=65504,recvWindow=8388608,demand=0,reset=false/false,CLOSED,age=107,attachment=HttpReceiverOverHTTP2#88410f7(rsp=IDLE,failure=null)} for HTTP2ClientSession#6384107{local:/127.0.0.1:62033,remote:localhost/127.0.0.1:8787,sendWindow=65504,recvWindow=16777216,state=[streams=1,NOT_CLOSED,goAwayRecv=null,goAwaySent=null,failure=null]}
2022-10-26 22:33:52.761 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.http2.HTTP2Session : Destroyed stream #1 for HTTP2ClientSession#6384107{local:/127.0.0.1:62033,remote:localhost/127.0.0.1:8787,sendWindow=65504,recvWindow=16777216,state=[streams=1,NOT_CLOSED,goAwayRecv=null,goAwaySent=null,failure=null]}
2022-10-26 22:33:52.769 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpReceiver : Response HttpResponse[HTTP/2.0 307 null]#79d6a430 found protocol handler org.eclipse.jetty.client.RedirectProtocolHandler#3e6aef30
2022-10-26 22:33:52.769 DEBUG 10808 --- [ient#eadd4fb-20] o.eclipse.jetty.client.HttpConversation : Exchanges in conversation 1, override=org.eclipse.jetty.client.RedirectProtocolHandler#3e6aef30, listeners=[org.eclipse.jetty.client.RedirectProtocolHandler#3e6aef30]
2022-10-26 22:33:52.770 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpReceiver : Response begin HttpResponse[HTTP/2.0 307 null]#79d6a430
2022-10-26 22:33:52.772 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpReceiver : Response headers HttpResponse[HTTP/2.0 307 null]#79d6a430
2022-10-26 22:33:52.773 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpReceiver : Response demand=1/1, resume=false
2022-10-26 22:33:52.773 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpReceiver : Response headers hasDemand=true HttpResponse[HTTP/2.0 307 null]#79d6a430
2022-10-26 22:33:52.774 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpReceiver : Response success HttpResponse[HTTP/2.0 307 null]#79d6a430
2022-10-26 22:33:52.775 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpExchange : Terminated response for HttpExchange#40d70396{req=HttpRequest[POST /redirect HTTP/2.0]#7e536042[TERMINATED/null] res=HttpResponse[HTTP/2.0 307 null]#79d6a430[TERMINATED/null]}, result: Result[HttpRequest[POST /redirect HTTP/2.0]#7e536042 > HttpResponse[HTTP/2.0 307 null]#79d6a430] null
2022-10-26 22:33:52.775 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpReceiver : Response complete HttpResponse[HTTP/2.0 307 null]#79d6a430, result: Result[HttpRequest[POST /redirect HTTP/2.0]#7e536042 > HttpResponse[HTTP/2.0 307 null]#79d6a430] null
2022-10-26 22:33:52.776 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpChannel : HttpExchange#40d70396{req=HttpRequest[POST /redirect HTTP/2.0]#7e536042[TERMINATED/null] res=HttpResponse[HTTP/2.0 307 null]#79d6a430[TERMINATED/null]} disassociated true from HttpChannelOverHTTP2#7a176a5e(exchange=null)[send=HttpSenderOverHTTP2#7fca75e4(req=QUEUED,failure=null),recv=HttpReceiverOverHTTP2#88410f7(rsp=IDLE,failure=null)]
2022-10-26 22:33:52.776 DEBUG 10808 --- [ient#eadd4fb-20] o.e.j.h.c.http.HttpChannelOverHTTP2 : exchange terminated Result[HttpRequest[POST /redirect HTTP/2.0]#7e536042 > HttpResponse[HTTP/2.0 307 null]#79d6a430] null HTTP2Stream#54bc89e6#1#6384107{sendWindow=65504,recvWindow=8388608,demand=0,reset=false/false,CLOSED,age=123,attachment=HttpReceiverOverHTTP2#88410f7(rsp=IDLE,failure=null)}
2022-10-26 22:33:52.776 DEBUG 10808 --- [ient#eadd4fb-20] o.e.j.h.c.http.HttpConnectionOverHTTP2 : Released HttpChannelOverHTTP2#7a176a5e(exchange=null)[send=HttpSenderOverHTTP2#7fca75e4(req=QUEUED,failure=null),recv=HttpReceiverOverHTTP2#88410f7(rsp=IDLE,failure=null)]
2022-10-26 22:33:52.777 DEBUG 10808 --- [ient#eadd4fb-20] o.e.j.h.c.http.HttpChannelOverHTTP2 : released channel? true HttpChannelOverHTTP2#7a176a5e(exchange=null)[send=HttpSenderOverHTTP2#7fca75e4(req=QUEUED,failure=null),recv=HttpReceiverOverHTTP2#88410f7(rsp=IDLE,failure=null)]
2022-10-26 22:33:52.777 DEBUG 10808 --- [ient#eadd4fb-20] o.eclipse.jetty.client.HttpDestination : Released HttpConnectionOverHTTP2#3ee779f7(closed=false)[HTTP2ClientSession#6384107{local:/127.0.0.1:62033,remote:localhost/127.0.0.1:8787,sendWindow=65504,recvWindow=16777216,state=[streams=0,NOT_CLOSED,goAwayRecv=null,goAwaySent=null,failure=null]}]
2022-10-26 22:33:52.777 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.client.AbstractConnectionPool : Released (true) MultiEntry#66ffcba0{IDLE,usage=1,multiplex=0,pooled=HttpConnectionOverHTTP2#3ee779f7(closed=false)[HTTP2ClientSession#6384107{local:/127.0.0.1:62033,remote:localhost/127.0.0.1:8787,sendWindow=65504,recvWindow=16777216,state=[streams=0,NOT_CLOSED,goAwayRecv=null,goAwaySent=null,failure=null]}]} #66ab6845[inUse=0,size=1,max=64,closed=false]
2022-10-26 22:33:52.778 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpReceiver : Request/Response succeeded: Result[HttpRequest[POST /redirect HTTP/2.0]#7e536042 > HttpResponse[HTTP/2.0 307 null]#79d6a430] null, notifying [org.eclipse.jetty.client.RedirectProtocolHandler#3e6aef30]
2022-10-26 22:33:52.778 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpRedirector : Redirecting to http://localhost:8787/redirect-url (Location: http://localhost:8787/redirect-url)
2022-10-26 22:33:52.779 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpClient : Resolved HttpDestination[Origin#d3c73938[http://localhost:8787,tag=null,protocol=Protocol#301a9e[proto=[h2c],nego=false]]]#c02e444,queue=0,pool=MultiplexConnectionPool#2ac1c8a2[c=0/1/64,a=0,i=1,q=0] for HttpRequest[POST /redirect-url HTTP/2.0]#5b096284
2022-10-26 22:33:52.779 DEBUG 10808 --- [ient#eadd4fb-20] o.eclipse.jetty.client.HttpConversation : Exchanges in conversation 2, override=null, listeners=[org.eclipse.jetty.client.HttpRequest$8#7e7a4c19, org.eclipse.jetty.client.HttpRequest$8#1c010dcb, org.eclipse.jetty.client.HttpRequest$10#7b322008, org.eclipse.jetty.client.HttpRequest$13#4ebbf3c, org.eclipse.jetty.client.HttpRequest$14#285d313c, org.eclipse.jetty.client.HttpRequest$15#3c260ea9, org.eclipse.jetty.client.HttpRequest$16#567e5b45, ResponseListenerProcessor#5ab8943f[Reactive[HttpRequest[POST /redirect HTTP/2.0]#7e536042]]]
2022-10-26 22:33:52.780 DEBUG 10808 --- [ient#eadd4fb-20] o.eclipse.jetty.client.HttpDestination : Queued HttpRequest[POST /redirect-url HTTP/2.0]#5b096284 for HttpDestination[Origin#d3c73938[http://localhost:8787,tag=null,protocol=Protocol#301a9e[proto=[h2c],nego=false]]]#c02e444,queue=1,pool=MultiplexConnectionPool#2ac1c8a2[c=0/1/64,a=0,i=1,q=1]
2022-10-26 22:33:52.780 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.client.AbstractConnectionPool : Acquiring create=true on MultiplexConnectionPool#2ac1c8a2[c=0/1/64,a=0,i=1,q=1]
2022-10-26 22:33:52.780 DEBUG 10808 --- [ient#eadd4fb-20] o.e.jetty.client.AbstractConnectionPool : Activated MultiEntry#66ffcba0{ACTIVE,usage=2,multiplex=1,pooled=HttpConnectionOverHTTP2#3ee779f7(closed=false)[HTTP2ClientSession#6384107{local:/127.0.0.1:62033,remote:localhost/127.0.0.1:8787,sendWindow=65504,recvWindow=16777216,state=[streams=0,NOT_CLOSED,goAwayRecv=null,goAwaySent=null,failure=null]}]} #66ab6845[inUse=1,size=1,max=64,closed=false]
2022-10-26 22:33:52.781 DEBUG 10808 --- [ient#eadd4fb-20] o.eclipse.jetty.client.HttpDestination : Processing exchange HttpExchange#3586e5e5{req=HttpRequest[POST /redirect-url HTTP/2.0]#5b096284[PENDING/null] res=HttpResponse[null 0 null]#64221408[PENDING/null]} on HttpConnectionOverHTTP2#3ee779f7(closed=false)[HTTP2ClientSession#6384107{local:/127.0.0.1:62033,remote:localhost/127.0.0.1:8787,sendWindow=65504,recvWindow=16777216,state=[streams=0,NOT_CLOSED,goAwayRecv=null,goAwaySent=null,failure=null]}] of HttpDestination[Origin#d3c73938[http://localhost:8787,tag=null,protocol=Protocol#301a9e[proto=[h2c],nego=false]]]#c02e444,queue=0,pool=MultiplexConnectionPool#2ac1c8a2[c=0/1/64,a=1,i=0,q=0]
2022-10-26 22:33:52.781 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpConnection : Normalizing true HttpRequest[POST /redirect-url HTTP/2.0]#5b096284
2022-10-26 22:33:52.782 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpChannel : HttpExchange#3586e5e5{req=HttpRequest[POST /redirect-url HTTP/2.0]#5b096284[PENDING/null] res=HttpResponse[null 0 null]#64221408[PENDING/null]} associated true to HttpChannelOverHTTP2#7a176a5e(exchange=HttpExchange#3586e5e5{req=HttpRequest[POST /redirect-url HTTP/2.0]#5b096284[PENDING/null] res=HttpResponse[null 0 null]#64221408[PENDING/null]})[send=HttpSenderOverHTTP2#7fca75e4(req=QUEUED,failure=null),recv=HttpReceiverOverHTTP2#88410f7(rsp=IDLE,failure=null)]
2022-10-26 22:33:52.782 DEBUG 10808 --- [ient#eadd4fb-20] org.eclipse.jetty.client.HttpSender : Request begin HttpRequest[POST /redirect-url HTTP/2.0]#5b096284
2022-10-26 22:33:52.783 DEBUG 10808 --- [ient#eadd4fb-20] o.eclipse.jetty.client.HttpConversation : Exchanges in conversation 2, override=null, listeners=[org.eclipse.jetty.client.HttpRequest$8#7e7a4c19, org.eclipse.jetty.client.HttpRequest$8#1c010dcb, org.eclipse.jetty.client.HttpRequest$10#7b322008, org.eclipse.jetty.client.HttpRequest$13#4ebbf3c, org.eclipse.jetty.client.HttpRequest$14#285d313c, org.eclipse.jetty.client.HttpRequest$15#3c260ea9, org.eclipse.jetty.client.HttpRequest$16#567e5b45, ResponseListenerProcessor#5ab8943f[Reactive[HttpRequest[POST /redirect HTTP/2.0]#7e536042]]]
2022-10-26 22:33:52.787 DEBUG 10808 --- [ient#eadd4fb-20] o.e.j.r.c.i.ResponseListenerProcessor : response failure HttpResponse[HTTP/2.0 307 null]#79d6a430 on ResponseListenerProcessor#5ab8943f[Reactive[HttpRequest[POST /redirect HTTP/2.0]#7e536042]]
java.lang.IllegalStateException: Multiple subscriptions not supported on AsyncRequestContent#289f2284[demand=0,stalled=true,chunks=0]
at org.eclipse.jetty.client.util.AsyncRequestContent.subscribe(AsyncRequestContent.java:83) ~[jetty-client-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.reactive.client.internal.PublisherRequestContent.subscribe(PublisherRequestContent.java:47) ~[jetty-reactive-httpclient-3.0.6.jar!/:na]
at org.eclipse.jetty.client.HttpSender.queuedToBegin(HttpSender.java:106) ~[jetty-client-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.client.HttpSender.send(HttpSender.java:77) ~[jetty-client-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.http2.client.http.HttpChannelOverHTTP2.send(HttpChannelOverHTTP2.java:102) ~[http2-http-client-transport-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.client.HttpChannel.send(HttpChannel.java:122) ~[jetty-client-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.client.HttpConnection.send(HttpConnection.java:110) ~[jetty-client-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.http2.client.http.HttpConnectionOverHTTP2.send(HttpConnectionOverHTTP2.java:104) ~[http2-http-client-transport-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:382) ~[jetty-client-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.client.HttpDestination.process(HttpDestination.java:358) ~[jetty-client-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.client.HttpDestination.process(HttpDestination.java:313) ~[jetty-client-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:296) ~[jetty-client-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:290) ~[jetty-client-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:267) ~[jetty-client-11.0.11.jar!/:11.0.11]
at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:247) ~[jetty-client-11.0.11.jar!/:11.0.11]

Related

111: Connection refused on elastic beanstalk

I built a jar file with JAVA Springboot on my computer and upload it to AWS elastic-beanstalk.
I could run it on my computer but it showed errors when I open the link of beanstalk:
2020/08/26 06:40:20 [error] 3143#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 125.121.75.33, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:5000/favicon.ico", host: "xxxxxx-env.eba-4gp64tmr.us-east-1.elasticbeanstalk.com", referrer: "http://xxxxx-env.eba-4gp64tmr.us-east-1.elasticbeanstalk.com/"
However, the web log looks fine:
-------------------------------------
/var/log/web-1.log
-------------------------------------
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.4.BUILD-SNAPSHOT)
2020-08-26 06:39:42.667 INFO 3167 --- [ main] c.b.restservice.RestServiceApplication : Starting RestServiceApplication v0.0.1-SNAPSHOT on ip-171-21-39-87 with PID 3167 (/var/app/current/application.jar started by webapp in /var/app/current)
2020-08-26 06:39:42.678 INFO 3167 --- [ main] c.b.restservice.RestServiceApplication : No active profile set, falling back to default profiles: default
2020-08-26 06:39:46.929 INFO 3167 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2020-08-26 06:39:46.966 INFO 3167 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-08-26 06:39:46.967 INFO 3167 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.37]
2020-08-26 06:39:47.199 INFO 3167 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-08-26 06:39:47.204 INFO 3167 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 4295 ms
2020-08-26 06:39:49.410 INFO 3167 --- [ main] pertySourcedRequestMappingHandlerMapping : Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)]
2020-08-26 06:39:49.636 INFO 3167 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-08-26 06:39:50.201 INFO 3167 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2020-08-26 06:39:50.203 INFO 3167 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed
2020-08-26 06:39:50.252 INFO 3167 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s)
2020-08-26 06:39:50.349 INFO 3167 --- [ main] s.d.s.w.s.ApiListingReferenceScanner : Scanning for api listing references
2020-08-26 06:39:50.401 INFO 3167 --- [ main] c.b.restservice.RestServiceApplication : Started RestServiceApplication in 9.6 seconds (JVM running for 12.522)
I set the SERVER_PORT to 8080 in Environment properties.
How should I handle this error? If you need any additional information just let me know.
Thank you for #Marcin reminder!
I set SERVER_PORT to 5000 this question has been solved!
Because Elastic Beanstalk will listen to 5000 default.

Unable to start embedded Tomcat whe all Report Services are deployed on AWS FARGATE ECS Containers

I am using AWS FARGATE ECS to host Report Portal. We have hosted Postgres in AWS RDS. Out of 11 services, we able to deploy 10 services in ECS. Last remaining service is API . To deploy these, we have created Cluster, Task Definitions with containers. The, we create Tasks and start them.
Getting error as unable to start embedded tomcat.
API Service: 5.1.0
Built with ♡ by EPAM Systems
Spring Boot (v2.2.5.RELEASE)
2020-05-02 02:22:16.755 INFO 11 --- [ main] c.e.t.r.core.configs.ReportPortalApp : Starting ReportPortalApp on ip-10-0-1-59.ap-south-1.compute.internal with PID 11 (/service-api-5.1.0-exec.jar started by root in /)
2020-05-02 02:22:16.836 INFO 11 --- [ main] c.e.t.r.core.configs.ReportPortalApp : The following profiles are active: default
2020-05-02 02:22:25.338 INFO 11 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2020-05-02 02:22:26.647 INFO 11 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 1299ms. Found 30 JPA repository interfaces.
2020-05-02 02:22:37.056 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:37.145 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:37.150 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler#1cc9cfb2' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:37.157 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'userRoleHierarchy' of type [com.epam.ta.reportportal.auth.UserRoleHierarchy] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:37.160 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'securityConfiguration' of type [com.epam.ta.reportportal.core.configs.SecurityConfiguration$$EnhancerBySpringCGLIB$$2bca0c92] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:37.238 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'permissionEvaluator' of type [com.epam.ta.reportportal.auth.permissions.PermissionEvaluatorFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:37.340 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'projectManagerPermission' of type [com.epam.ta.reportportal.auth.permissions.ProjectManagerPermission] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:37.450 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'dataSourceConfig' of type [com.epam.ta.reportportal.config.DataSourceConfig$$EnhancerBySpringCGLIB$$7b53bf4d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:37.654 INFO 11 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2020-05-02 02:22:39.056 INFO 11 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2020-05-02 02:22:39.058 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'dataSource' of type [com.zaxxer.hikari.HikariDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:39.260 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:39.452 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:39.535 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'ACLContext' of type [com.epam.ta.reportportal.core.configs.ACLContext$$EnhancerBySpringCGLIB$$6e333ceb] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:39.852 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'coffeinCache' of type [org.springframework.cache.caffeine.CaffeineCache] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:39.948 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'permissionGrantingStrategy' of type [org.springframework.security.acls.domain.DefaultPermissionGrantingStrategy] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:39.955 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'aclAuthorizationStrategy' of type [com.epam.ta.reportportal.auth.acl.ReportPortalAclAuthorizationStrategyImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:39.957 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'aclCache' of type [org.springframework.security.acls.domain.SpringCacheBasedAclCache] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:40.046 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'lookupStrategy' of type [org.springframework.security.acls.jdbc.BasicLookupStrategy] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:40.059 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'aclService' of type [com.epam.ta.reportportal.auth.acl.ReportPortalAclService] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:40.147 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'aclPermissionEvaluator' of type [org.springframework.security.acls.AclPermissionEvaluator] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:40.151 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'aclFullPermission' of type [com.epam.ta.reportportal.auth.permissions.AclFullPermission] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:40.236 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'aclReadPermission' of type [com.epam.ta.reportportal.auth.permissions.AclReadPermission] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:40.243 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'assignedToProjectPermission' of type [com.epam.ta.reportportal.auth.permissions.AssignedToProjectPermission] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:40.250 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'notCustomerPermission' of type [com.epam.ta.reportportal.auth.permissions.NotCustomerPermission] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:40.252 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'reporterPermission' of type [com.epam.ta.reportportal.auth.permissions.ReporterPermission] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:40.255 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'permissionEvaluator' of type [com.epam.ta.reportportal.auth.permissions.ReportPortalPermissionEvaluator] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:40.256 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'securityConfiguration.MethodSecurityConfig' of type [com.epam.ta.reportportal.core.configs.SecurityConfiguration$MethodSecurityConfig$$EnhancerBySpringCGLIB$$998bc8f7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:40.437 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:40.560 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'jacksonConfiguration' of type [com.epam.ta.reportportal.core.configs.JacksonConfiguration$$EnhancerBySpringCGLIB$$3275d909] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:42.437 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'objectMapper' of type [com.fasterxml.jackson.databind.ObjectMapper] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:43.139 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'jsonConverter' of type [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:43.158 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'stringConverter' of type [org.springframework.http.converter.StringHttpMessageConverter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:43.242 INFO 11 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'mvcConfig' of type [com.epam.ta.reportportal.core.configs.MvcConfig$$EnhancerBySpringCGLIB$$fe4171f8] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-02 02:22:47.353 INFO 11 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8585 (http)
2020-05-02 02:22:47.448 INFO 11 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-05-02 02:22:47.448 INFO 11 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.31]
2020-05-02 02:22:47.849 INFO 11 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-05-02 02:22:47.849 INFO 11 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 30799 ms
2020-05-02 02:22:52.435 INFO 11 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2020-05-02 02:22:53.036 INFO 11 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.12.Final
2020-05-02 02:22:54.335 INFO 11 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-05-02 02:22:58.444 INFO 11 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: com.epam.ta.reportportal.commons.JsonbAwarePostgresDialect
2020-05-02 02:23:09.639 INFO 11 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-05-02 02:23:09.650 INFO 11 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-05-02 02:23:10.151 INFO 11 --- [ main] org.quartz.impl.StdSchedulerFactory : Using default implementation for ThreadExecutor
2020-05-02 02:23:10.243 INFO 11 --- [ main] org.quartz.core.SchedulerSignalerImpl : Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
2020-05-02 02:23:10.244 INFO 11 --- [ main] org.quartz.core.QuartzScheduler : Quartz Scheduler v.2.3.2 created.
2020-05-02 02:23:10.256 INFO 11 --- [ main] o.s.s.quartz.LocalDataSourceJobStore : Using db table-based data access locking (synchronization).
2020-05-02 02:23:10.258 INFO 11 --- [ main] o.s.s.quartz.LocalDataSourceJobStore : JobStoreCMT initialized.
2020-05-02 02:23:10.258 INFO 11 --- [ main] org.quartz.core.QuartzScheduler : Scheduler meta-data: Quartz Scheduler (v2.3.2) 'reportportal' with instanceId 'api:3d399a8ccb9a8c7800a1c62f702319d1'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads.
Using job-store 'org.springframework.scheduling.quartz.LocalDataSourceJobStore' - which supports persistence. and is clustered.
2020-05-02 02:23:10.258 INFO 11 --- [ main] org.quartz.impl.StdSchedulerFactory : Quartz scheduler 'reportportal' initialized from an externally provided properties instance.
2020-05-02 02:23:10.258 INFO 11 --- [ main] org.quartz.impl.StdSchedulerFactory : Quartz scheduler version: 2.3.2
2020-05-02 02:23:10.258 INFO 11 --- [ main] org.quartz.core.QuartzScheduler : JobFactory set to: com.epam.ta.reportportal.core.configs.SchedulerConfiguration$1#3c20e9d6
2020-05-02 02:25:22.440 ERROR 11 --- [ main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'infoEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/info/InfoEndpointAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.info.InfoEndpoint]: Factory method 'infoEndpoint' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'infoContributorComposite' defined in URL [jar:file:/service-api-5.1.0-exec.jar!/BOOT-INF/classes!/com/epam/ta/reportportal/info/InfoContributorComposite.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'analyzerInfoContributor' defined in URL [jar:file:/service-api-5.1.0-exec.jar!/BOOT-INF/classes!/com/epam/ta/reportportal/info/AnalyzerInfoContributor.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'managementTemplate' defined in class path resource [com/epam/ta/reportportal/core/configs/rabbit/AnalyzerRabbitMqConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.epam.ta.reportportal.core.analyzer.auto.client.RabbitMqManagementClient]: Factory method 'managementTemplate' threw exception; nested exception is org.springframework.web.client.ResourceAccessException: I/O error on PUT request for "http://15.206.28.47:15672/api/vhosts/analyzer": Connect to 15.206.28.47:15672 [/15.206.28.47] failed: Connection timed out (Connection timed out); nested exception is org.apache.http.conn.HttpHostConnectException: Connect to 15.206.28.47:15672 [/15.206.28.47] failed: Connection timed out (Connection timed out)
2020-05-02 02:25:22.548 INFO 11 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-05-02 02:25:22.635 WARN 11 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2020-05-02 02:25:22.635 INFO 11 --- [ main] o.s.s.quartz.SchedulerFactoryBean : Shutting down Quartz Scheduler
2020-05-02 02:25:22.635 INFO 11 --- [ main] org.quartz.core.QuartzScheduler : Scheduler reportportal_$_api:3d399a8ccb9a8c7800a1c62f702319d1 shutting down.
2020-05-02 02:25:22.635 INFO 11 --- [ main] org.quartz.core.QuartzScheduler : Scheduler reportportal_$_api:3d399a8ccb9a8c7800a1c62f702319d1 paused.
2020-05-02 02:25:22.753 INFO 11 --- [ main] org.quartz.core.QuartzScheduler : Scheduler reportportal_$_api:3d399a8ccb9a8c7800a1c62f702319d1 shutdown complete.
2020-05-02 02:25:22.762 INFO 11 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2020-05-02 02:25:22.834 INFO 11 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
2020-05-02 02:25:22.943 INFO 11 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-05-02 02:25:22.950 ERROR 11 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at com.epam.ta.reportportal.core.configs.ReportPortalApp.main(ReportPortalApp.java:37)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:51)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
Based on the error:
Exception: I/O error on PUT request for
"http://15.206.28.47:15672/api/vhosts/analyzer":
Connect to 15.206.28.47:15672 [/15.206.28.47] failed: Connection timed out
(Connection timed out);
your RabbitMQ instance is not accessible or VHOST analyzer is not created.
It looks like the problem is that it can't connect to 15.206.28.47 during startup.

AWS problem accessing Spring cloud eureka server

I am migrating my spring cloud eureka application to AWS ECS and currently having some trouble doing so.
I have an ECS cluster on AWS in which an EC2 service of eureka-server
is running on it. in this service, there is a task running
My problem is that:
For my Eureka-server task, it suppose to run on External Link 18.136.147.71:8761 , but it isn't.This 18.136.147.71 is an auto assigned IP by AWS. the only setting i made was allocating an Elastic IP via EC2 Panel.
Although from CloudWatch log i can see that the service is running normal, i am unable to access the link as it always gives this error
This site can’t be reached. 18.136.147.71:8761 took too long to respond.
what are some possible errors that might have lead to this problem?
there is no problem with the docker image because i am able to run it locally on my computer.
below are my CloudWatch Log. This log is exactly the same as my local terminal output when i run the docker image locally:
2018-11-21 04:10:13.567 INFO 1 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#1376c05c: startup date [Wed Nov 21 04:10:13 GMT 2018]; root of context hierarchy
2018-11-21 04:10:15.178 INFO 1 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-11-21 04:10:15.366 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$7e4594e4] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.2.RELEASE)
2018-11-21 04:10:18.870 INFO 1 --- [ main] eureka.server.ServerApplication : No active profile set, falling back to default profiles: default
2018-11-21 04:10:18.972 INFO 1 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#735b5592: startup date [Wed Nov 21 04:10:18 GMT 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext#1376c05c
2018-11-21 04:10:24.655 INFO 1 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=1ce1cdc0-5c4b-3c0c-ae18-58ba57b52bb6
2018-11-21 04:10:24.681 INFO 1 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-11-21 04:10:25.164 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.netflix.metrics.MetricsInterceptorConfiguration$MetricsRestTemplateConfiguration' of type [org.springframework.cloud.netflix.metrics.MetricsInterceptorConfiguration$MetricsRestTemplateConfiguration$$EnhancerBySpringCGLIB$$94583828] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-11-21 04:10:25.179 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$7e4594e4] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-11-21 04:10:26.276 INFO 1 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8761 (http)
2018-11-21 04:10:26.370 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2018-11-21 04:10:26.371 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.11
2018-11-21 04:10:26.775 INFO 1 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2018-11-21 04:10:26.775 INFO 1 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 7803 ms
2018-11-21 04:10:29.661 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'metricsFilter' to: [/*]
2018-11-21 04:10:29.662 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-11-21 04:10:29.662 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-11-21 04:10:29.662 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-11-21 04:10:29.662 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2018-11-21 04:10:29.664 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webRequestTraceFilter' to: [/*]
2018-11-21 04:10:29.664 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'servletContainer' to urls: [/eureka/*]
2018-11-21 04:10:29.664 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'applicationContextIdFilter' to: [/*]
2018-11-21 04:10:29.665 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2018-11-21 04:10:30.190 INFO 1 --- [ost-startStop-1] c.s.j.s.i.a.WebApplicationImpl : Initiating Jersey application, version 'Jersey: 1.19.1 03/11/2016 02:08 PM'
2018-11-21 04:10:30.676 INFO 1 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2018-11-21 04:10:30.677 INFO 1 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2018-11-21 04:10:31.261 INFO 1 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2018-11-21 04:10:31.262 INFO 1 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2018-11-21 04:10:34.871 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#735b5592: startup date [Wed Nov 21 04:10:18 GMT 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext#1376c05c
2018-11-21 04:10:35.375 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-11-21 04:10:35.376 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-11-21 04:10:35.380 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/lastn],methods=[GET]}" onto public java.lang.String org.springframework.cloud.netflix.eureka.server.EurekaController.lastn(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.Object>)
2018-11-21 04:10:35.380 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/],methods=[GET]}" onto public java.lang.String org.springframework.cloud.netflix.eureka.server.EurekaController.status(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.Object>)
2018-11-21 04:10:35.482 INFO 1 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-11-21 04:10:35.482 INFO 1 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-11-21 04:10:35.758 INFO 1 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-11-21 04:10:38.472 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/autoconfig || /autoconfig.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-11-21 04:10:38.473 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/mappings || /mappings.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-11-21 04:10:38.474 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/configprops || /configprops.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-11-21 04:10:38.475 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/restart || /restart.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.context.restart.RestartMvcEndpoint.invoke()
2018-11-21 04:10:38.475 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/archaius || /archaius.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-11-21 04:10:38.476 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/dump || /dump.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-11-21 04:10:38.479 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/loggers/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.LoggersMvcEndpoint.get(java.lang.String)
2018-11-21 04:10:38.556 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/loggers/{name:.*}],methods=[POST],consumes=[application/vnd.spring-boot.actuator.v1+json || application/json],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.LoggersMvcEndpoint.set(java.lang.String,java.util.Map<java.lang.String, java.lang.String>)
2018-11-21 04:10:38.556 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/loggers || /loggers.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-11-21 04:10:38.557 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/refresh || /refresh.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2018-11-21 04:10:38.557 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/resume || /resume.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2018-11-21 04:10:38.558 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/auditevents || /auditevents.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public org.springframework.http.ResponseEntity<?> org.springframework.boot.actuate.endpoint.mvc.AuditEventsMvcEndpoint.findByPrincipalAndAfterAndType(java.lang.String,java.util.Date,java.lang.String)
2018-11-21 04:10:38.559 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/info || /info.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-11-21 04:10:38.559 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.value(java.util.Map<java.lang.String, java.lang.String>)
2018-11-21 04:10:38.560 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env/reset],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.reset()
2018-11-21 04:10:38.560 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/health || /health.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(javax.servlet.http.HttpServletRequest,java.security.Principal)
2018-11-21 04:10:38.565 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/heapdump || /heapdump.json],methods=[GET],produces=[application/octet-stream]}" onto public void org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException
2018-11-21 04:10:38.565 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/beans || /beans.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-11-21 04:10:38.568 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2018-11-21 04:10:38.568 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics || /metrics.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-11-21 04:10:38.568 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/features || /features.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-11-21 04:10:38.569 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
2018-11-21 04:10:38.569 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env || /env.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-11-21 04:10:38.570 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/trace || /trace.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-11-21 04:10:38.570 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/pause || /pause.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2018-11-21 04:10:38.570 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/service-registry/instance-status],methods=[GET]}" onto public org.springframework.http.ResponseEntity org.springframework.cloud.client.serviceregistry.endpoint.ServiceRegistryEndpoint.getStatus()
2018-11-21 04:10:38.570 INFO 1 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/service-registry/instance-status],methods=[POST]}" onto public org.springframework.http.ResponseEntity<?> org.springframework.cloud.client.serviceregistry.endpoint.ServiceRegistryEndpoint.setStatus(java.lang.String)
2018-11-21 04:10:38.989 INFO 1 --- [ main] o.s.ui.freemarker.SpringTemplateLoader : SpringTemplateLoader for FreeMarker: using resource loader [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#735b5592: startup date [Wed Nov 21 04:10:18 GMT 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext#1376c05c] and template loader path [classpath:/templates/]
2018-11-21 04:10:38.990 INFO 1 --- [ main] o.s.w.s.v.f.FreeMarkerConfigurer : ClassTemplateLoader for Spring macros added to FreeMarker configuration
2018-11-21 04:10:39.462 WARN 1 --- [ main] o.s.c.n.a.ArchaiusAutoConfiguration : No spring.application.name found, defaulting to 'application'
2018-11-21 04:10:39.470 WARN 1 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2018-11-21 04:10:39.471 INFO 1 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2018-11-21 04:10:39.486 WARN 1 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2018-11-21 04:10:39.555 INFO 1 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2018-11-21 04:10:39.760 INFO 1 --- [ main] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING
2018-11-21 04:10:39.979 INFO 1 --- [ main] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1
2018-11-21 04:10:39.980 INFO 1 --- [ main] com.netflix.discovery.DiscoveryClient : Client configured to neither register nor query for data.
2018-11-21 04:10:40.073 INFO 1 --- [ main] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1542773440073 with initial instances count: 0
2018-11-21 04:10:40.557 INFO 1 --- [ main] c.n.eureka.DefaultEurekaServerContext : Initializing ...
2018-11-21 04:10:40.562 INFO 1 --- [ main] c.n.eureka.cluster.PeerEurekaNodes : Adding new peer nodes [http://localhost:8761/eureka/]
2018-11-21 04:10:41.886 INFO 1 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2018-11-21 04:10:41.887 INFO 1 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2018-11-21 04:10:41.887 INFO 1 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2018-11-21 04:10:41.887 INFO 1 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2018-11-21 04:10:42.568 INFO 1 --- [ main] c.n.eureka.cluster.PeerEurekaNodes : Replica node URL: http://localhost:8761/eureka/
2018-11-21 04:10:42.577 INFO 1 --- [ main] c.n.e.registry.AbstractInstanceRegistry : Finished initializing remote region registries. All known remote regions: []
2018-11-21 04:10:42.577 INFO 1 --- [ main] c.n.eureka.DefaultEurekaServerContext : Initialized
2018-11-21 04:10:42.859 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-11-21 04:10:42.868 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'environmentManager' has been autodetected for JMX exposure
2018-11-21 04:10:42.869 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2018-11-21 04:10:42.870 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshEndpoint' has been autodetected for JMX exposure
2018-11-21 04:10:42.870 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'restartEndpoint' has been autodetected for JMX exposure
2018-11-21 04:10:42.871 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'serviceRegistryEndpoint' has been autodetected for JMX exposure
2018-11-21 04:10:42.872 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshScope' has been autodetected for JMX exposure
2018-11-21 04:10:42.874 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2018-11-21 04:10:42.964 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'restartEndpoint': registering with JMX server as MBean [org.springframework.cloud.context.restart:name=restartEndpoint,type=RestartEndpoint]
2018-11-21 04:10:42.974 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'serviceRegistryEndpoint': registering with JMX server as MBean [org.springframework.cloud.client.serviceregistry.endpoint:name=serviceRegistryEndpoint,type=ServiceRegistryEndpoint]
2018-11-21 04:10:42.980 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2018-11-21 04:10:43.068 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=735b5592,type=ConfigurationPropertiesRebinder]
2018-11-21 04:10:43.072 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshEndpoint': registering with JMX server as MBean [org.springframework.cloud.endpoint:name=refreshEndpoint,type=RefreshEndpoint]
2018-11-21 04:10:43.773 INFO 1 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2018-11-21 04:10:43.774 INFO 1 --- [ main] o.s.c.n.e.s.EurekaServiceRegistry : Registering application unknown with eureka with status UP
2018-11-21 04:10:43.973 INFO 1 --- [ Thread-11] o.s.c.n.e.server.EurekaServerBootstrap : Setting the eureka configuration..
2018-11-21 04:10:43.974 INFO 1 --- [ Thread-11] o.s.c.n.e.server.EurekaServerBootstrap : Eureka data center value eureka.datacenter is not set, defaulting to default
2018-11-21 04:10:43.974 INFO 1 --- [ Thread-11] o.s.c.n.e.server.EurekaServerBootstrap : Eureka environment value eureka.environment is not set, defaulting to test
2018-11-21 04:10:44.071 INFO 1 --- [ Thread-11] o.s.c.n.e.server.EurekaServerBootstrap : isAws returned false
2018-11-21 04:10:44.071 INFO 1 --- [ Thread-11] o.s.c.n.e.server.EurekaServerBootstrap : Initialized server context
2018-11-21 04:10:44.072 INFO 1 --- [ Thread-11] c.n.e.r.PeerAwareInstanceRegistryImpl : Got 1 instances from neighboring DS node
2018-11-21 04:10:44.072 INFO 1 --- [ Thread-11] c.n.e.r.PeerAwareInstanceRegistryImpl : Renew threshold is: 1
2018-11-21 04:10:44.072 INFO 1 --- [ Thread-11] c.n.e.r.PeerAwareInstanceRegistryImpl : Changing status to UP
2018-11-21 04:10:44.165 INFO 1 --- [ Thread-11] e.s.EurekaServerInitializerConfiguration : Started Eureka Server
2018-11-21 04:10:44.367 INFO 1 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8761 (http)
2018-11-21 04:10:44.369 INFO 1 --- [ main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8761
2018-11-21 04:10:44.372 INFO 1 --- [ main] eureka.server.ServerApplication : Started ServerApplication in 33.505 seconds (JVM running for 36.231)
2018-11-21 04:11:44.159 INFO 1 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : Running the evict task with compensationTime 0ms
2018-11-21 04:12:44.159 INFO 1 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : Running the evict task with compensationTime 0ms
answering my own question. The reason was because the inbound rule for my Security group was not set.
Steps to set
EC2->Security Groups-> Choose your security group --> Inbound tab --> Edit --> set the port

jhipster aws elastic beanstalk 404

I trying to deploy a jhipster (spring boot) app to elastic beanstalk using single instance configuration and get http 404 for all static call ( '/' or '/index.html'), I generated the app using jhispter and made the following configuration:
pom.xml:
<profile>
<id>prod</id>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
</dependencies>
.....
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>false</executable>
</configuration>
for the record, api works fine! only static files get 404.
2017-07-23 04:34:48.539 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /' doesn't match 'OPTIONS /**
2017-07-23 04:34:48.539 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/app//*.{js,html}'
2017-07-23 04:34:48.539 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/bower_components/'
2017-07-23 04:34:48.539 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/i18n/'
2017-07-23 04:34:48.539 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/content/'
2017-07-23 04:34:48.539 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/swagger-ui/index.html'
2017-07-23 04:34:48.539 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/test/'
2017-07-23 04:34:48.539 DEBUG 30610 --- [nio-5000-exec-3] o.s.security.web.FilterChainProxy : / at position 1 of 11 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'
2017-07-23 04:34:48.539 DEBUG 30610 --- [nio-5000-exec-3] o.s.security.web.FilterChainProxy : / at position 2 of 11 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
2017-07-23 04:34:48.539 DEBUG 30610 --- [nio-5000-exec-3] w.c.HttpSessionSecurityContextRepository : No HttpSession currently exists
2017-07-23 04:34:48.539 DEBUG 30610 --- [nio-5000-exec-3] w.c.HttpSessionSecurityContextRepository : No SecurityContext was available from the HttpSession: null. A new one will be created.
2017-07-23 04:34:48.539 DEBUG 30610 --- [nio-5000-exec-3] o.s.security.web.FilterChainProxy : / at position 3 of 11 in additional filter chain; firing Filter: 'HeaderWriterFilter'
2017-07-23 04:34:48.542 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.header.writers.HstsHeaderWriter : Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher#2e2f941e
2017-07-23 04:34:48.542 DEBUG 30610 --- [nio-5000-exec-3] o.s.security.web.FilterChainProxy : / at position 4 of 11 in additional filter chain; firing Filter: 'CsrfFilter'
2017-07-23 04:34:48.543 DEBUG 30610 --- [nio-5000-exec-3] o.s.security.web.FilterChainProxy : / at position 5 of 11 in additional filter chain; firing Filter: 'LogoutFilter'
2017-07-23 04:34:48.543 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /' doesn't match 'POST /logout
2017-07-23 04:34:48.543 DEBUG 30610 --- [nio-5000-exec-3] o.s.security.web.FilterChainProxy : / at position 6 of 11 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
2017-07-23 04:34:48.543 DEBUG 30610 --- [nio-5000-exec-3] o.s.security.web.FilterChainProxy : / at position 7 of 11 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
2017-07-23 04:34:48.543 DEBUG 30610 --- [nio-5000-exec-3] o.s.security.web.FilterChainProxy : / at position 8 of 11 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
2017-07-23 04:34:48.543 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.a.AnonymousAuthenticationFilter : Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken#9055e4a6: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails#957e: RemoteIpAddress: 127.0.0.1; SessionId: null; Granted Authorities: ROLE_ANONYMOUS'
2017-07-23 04:34:48.544 DEBUG 30610 --- [nio-5000-exec-3] o.s.security.web.FilterChainProxy : / at position 9 of 11 in additional filter chain; firing Filter: 'SessionManagementFilter'
2017-07-23 04:34:48.544 DEBUG 30610 --- [nio-5000-exec-3] o.s.security.web.FilterChainProxy : / at position 10 of 11 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
2017-07-23 04:34:48.544 DEBUG 30610 --- [nio-5000-exec-3] o.s.security.web.FilterChainProxy : / at position 11 of 11 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
2017-07-23 04:34:48.544 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.a.i.FilterSecurityInterceptor : Secure object: FilterInvocation: URL: /; Attributes: [permitAll]
2017-07-23 04:34:48.544 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.a.i.FilterSecurityInterceptor : Previously Authenticated: org.springframework.security.authentication.AnonymousAuthenticationToken#9055e4a6: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails#957e: RemoteIpAddress: 127.0.0.1; SessionId: null; Granted Authorities: ROLE_ANONYMOUS
2017-07-23 04:34:48.544 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.access.vote.AffirmativeBased : Voter: org.springframework.security.web.access.expression.WebExpressionVoter#6e7461cd, returned: 1
2017-07-23 04:34:48.546 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.a.i.FilterSecurityInterceptor : Authorization successful
2017-07-23 04:34:48.546 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.a.i.FilterSecurityInterceptor : RunAsManager did not change Authentication object
2017-07-23 04:34:48.546 DEBUG 30610 --- [nio-5000-exec-3] o.s.security.web.FilterChainProxy : / reached end of additional filter chain; proceeding with original chain
2017-07-23 04:34:48.547 DEBUG 30610 --- [nio-5000-exec-3] o.s.web.servlet.DispatcherServlet : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/]
2017-07-23 04:34:48.549 DEBUG 30610 --- [nio-5000-exec-3] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /
2017-07-23 04:34:48.556 DEBUG 30610 --- [nio-5000-exec-3] s.w.s.m.m.a.RequestMappingHandlerMapping : Did not find handler method for [/]
2017-07-23 04:34:48.557 DEBUG 30610 --- [nio-5000-exec-3] o.s.w.s.handler.SimpleUrlHandlerMapping : Matching patterns for request [/] are [/]
2017-07-23 04:34:48.557 DEBUG 30610 --- [nio-5000-exec-3] o.s.w.s.handler.SimpleUrlHandlerMapping : URI Template variables for request [/] are {}
2017-07-23 04:34:48.557 DEBUG 30610 --- [nio-5000-exec-3] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapping [/] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/], class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver#78226c36]]] and 1 interceptor
2017-07-23 04:34:48.558 DEBUG 30610 --- [nio-5000-exec-3] o.s.web.servlet.DispatcherServlet : Last-Modified value for [/] is: -1
2017-07-23 04:34:48.558 DEBUG 30610 --- [nio-5000-exec-3] w.c.HttpSessionSecurityContextRepository : SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
2017-07-23 04:34:48.558 DEBUG 30610 --- [nio-5000-exec-3] o.s.web.servlet.DispatcherServlet : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-07-23 04:34:48.558 DEBUG 30610 --- [nio-5000-exec-3] o.s.web.servlet.DispatcherServlet : Successfully completed request
2017-07-23 04:34:48.559 DEBUG 30610 --- [nio-5000-exec-3] o.s.s.w.a.ExceptionTranslationFilter : Chain processed normally
2017-07-23 04:34:48.559 DEBUG 30610 --- [nio-5000-exec-3] s.s.w.c.SecurityContextPersistenceFilter : SecurityContextHolder now cleared, as request processing completed
2017-07-23 04:34:48.560 DEBUG 30610 --- [nio-5000-exec-3] o.s.web.servlet.DispatcherServlet : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/error]
2017-07-23 04:34:48.565 DEBUG 30610 --- [nio-5000-exec-3] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /error
2017-07-23 04:34:48.565 DEBUG 30610 --- [nio-5000-exec-3] s.w.s.m.m.a.RequestMappingHandlerMapping : Returning handler method [public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]
2017-07-23 04:34:48.565 DEBUG 30610 --- [nio-5000-exec-3] o.s.web.servlet.DispatcherServlet : Last-Modified value for [/error] is: -1
2017-07-23 04:34:48.579 DEBUG 30610 --- [nio-5000-exec-3] o.s.w.s.v.ContentNegotiatingViewResolver : Requested media types are [text/html, text/html;q=0.8] based on Accept header types and producible media types [text/html])
2017-07-23 04:34:48.579 DEBUG 30610 --- [nio-5000-exec-3] o.s.w.s.v.ContentNegotiatingViewResolver : Returning [org.thymeleaf.spring4.view.ThymeleafView#ec234ad] based on requested media type 'text/html'
2017-07-23 04:34:48.579 DEBUG 30610 --- [nio-5000-exec-3] o.s.web.servlet.DispatcherServlet : Rendering view [org.thymeleaf.spring4.view.ThymeleafView#ec234ad] in DispatcherServlet with name 'dispatcherServlet'
2017-07-23 04:34:48.597 DEBUG 30610 --- [nio-5000-exec-3] o.s.web.servlet.DispatcherServlet : Successfully completed request
from default config jhipster (undertow + executable:true):
2017-07-23 10:57:26 UTC-0300 ERROR [Instance: i-06c0e61a84efdeaf5] Command failed on instance. Return code: 1 Output: (TRUNCATED).../util/SystemPropertyUtils.class Failed to execute '/usr/bin/unzip -o -d /var/app/staging /opt/elasticbeanstalk/deploy/appsource/source_bundle' Failed to execute '/usr/bin/unzip -o -d /var/app/staging /opt/elasticbeanstalk/deploy/appsource/source_bundle'. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/01_configure_application.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2017-07-23 10:57:22 UTC-0300 ERROR Failed to execute '/usr/bin/unzip -o -d /var/app/staging /opt/elasticbeanstalk/deploy/appsource/source_bundle'

Deploying Spring Cloud Eureka in AWS ECS (EC2) with DNS props but getting: 'Failed to bind elastic IP (IP)'. I attached a policy to allow user

I am using AWS ECS to deploy Eureka in my Cluster to zones inside us-east-1 region. ECS dynamically deploys to any region and I cannot predetermine the IP or domain the EC2 instance will be, hence I use DNS.
I am using DNS as illustrated here https://github.com/Netflix/eureka/wiki/Deploying-Eureka-Servers-in-EC2. Below are my configurations:
eureka:
instance:
healthCheckUrlPath: /manage/health
client:
region: us-east-1
availabilityZones:
us-east-1: us-east-1a,us-east-1c
eurekaServerPort: 8761
useDnsForFetchingServiceUrls: true
eurekaServerDNSName: eureka.mydomain.com
eurekaServerURLContext: eureka
registerWithEureka: true
fetchRegistry: true
cloud:
aws:
credentials:
accessKey: AWS_KEY
secretKey: AWS_KEY_SECRET
region:
static: us-east-1
The user with AWS_KEY has this policy attached:
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"ec2:AllocateAddress",
"ec2:AssociateAddress",
"ec2:DescribeAddresses",
"ec2:DisassociateAddress"
],
"Sid": "Stmt1375723773000",
"Resource": [
"*"
],
"Effect": "Allow"
}
]
}
and configured the EurekaInstanceConfigBean configured as:
#Bean
#Profile("!default")
public EurekaInstanceConfigBean eurekaInstanceConfig(InetUtils inetUtils) {
EurekaInstanceConfigBean config = new EurekaInstanceConfigBean(inetUtils);
AmazonInfo info = AmazonInfo.Builder.newBuilder().autoBuild("eureka");
info.getMetadata().put(AmazonInfo.MetaDataKey.publicHostname.getName(), info.get(AmazonInfo.MetaDataKey.publicIpv4));
config.setHostname(info.get(AmazonInfo.MetaDataKey.publicHostname));
config.setIpAddress(info.get(AmazonInfo.MetaDataKey.publicIpv4));
config.setNonSecurePort(port);
config.setDataCenterInfo(info);
return config;
}
GOOD THING: Eureka recognise my Route 53 configured eureka.mydomain.com DNS EIPs and it tries to bind, the (available and unassigned) EIP in zone us-east-1c, to the instance where my eureka server is deployed
PROBLEM: I get the following logs and Unauthorized error as below when booting my app:
...................................
.................................
2017-04-10 16:07:42.141 DEBUG 5 --- [ main] c.n.d.s.r.a.DnsTxtRecordClusterResolver : Resolved txt.us-east-1.eureka.mydomain.com to [AwsEndpoint{ serviceUrl=
'http://ec2-34.200.47.82.compute-1.amazonaws.com:8761/eureka', region='us-east-1', zone='us-east-1c'}]
2017-04-10 16:07:42.141 DEBUG 5 --- [ main] c.n.d.s.r.a.ZoneAffinityClusterResolver : Local zone=us-east-1c; resolved to: [AwsEndpoint{ serviceUrl='http://ec2-3
4.200.47.82.compute-1.amazonaws.com:8761/eureka', region='us-east-1', zone='us-east-1c'}]
2017-04-10 16:07:42.204 INFO 5 --- [ main] com.netflix.discovery.DiscoveryClient : Disable delta property : false
2017-04-10 16:07:42.209 INFO 5 --- [ main] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null
2017-04-10 16:07:42.209 INFO 5 --- [ main] com.netflix.discovery.DiscoveryClient : Force full registry fetch : false
2017-04-10 16:07:42.209 INFO 5 --- [ main] com.netflix.discovery.DiscoveryClient : Application is null : false
2017-04-10 16:07:42.209 INFO 5 --- [ main] com.netflix.discovery.DiscoveryClient : Registered Applications size is zero : true
2017-04-10 16:07:42.209 INFO 5 --- [ main] com.netflix.discovery.DiscoveryClient : Application version is -1: true
2017-04-10 16:07:42.211 INFO 5 --- [ main] com.netflix.discovery.DiscoveryClient : Getting all instance registry info from the eureka server
2017-04-10 16:07:42.213 DEBUG 5 --- [ main] c.n.d.s.t.d.SessionedEurekaHttpClient : Ending a session and starting anew
2017-04-10 16:07:42.222 DEBUG 5 --- [ main] n.d.s.t.j.AbstractJerseyEurekaHttpClient : Created client for url: http://ec2-34.200.47.82.compute-1.amazonaws.com:87
61/eureka
2017-04-10 16:07:42.313 DEBUG 5 --- [ main] c.n.d.shared.MonitoredConnectionManager : Get connection: {}->http://ec2-34.200.47.82.compute-1.amazonaws.com:8761,
timeout = 5000
2017-04-10 16:07:42.314 DEBUG 5 --- [ main] c.n.d.shared.NamedConnectionPool : [{}->http://ec2-34.200.47.82.compute-1.amazonaws.com:8761] total kept aliv
e: 0, total issued: 0, total allocated: 0 out of 200
2017-04-10 16:07:42.314 DEBUG 5 --- [ main] c.n.d.shared.NamedConnectionPool : No free connections [{}->http://ec2-34.200.47.82.compute-1.amazonaws.com:8
761][null]
2017-04-10 16:07:42.314 DEBUG 5 --- [ main] c.n.d.shared.NamedConnectionPool : Available capacity: 50 out of 50 [{}->http://ec2-34.200.47.82.compute-1.am
azonaws.com:8761][null]
2017-04-10 16:07:42.314 DEBUG 5 --- [ main] c.n.d.shared.NamedConnectionPool : Creating new connection [{}->http://ec2-34.200.47.82.compute-1.amazonaws.c
om:8761]
2017-04-10 16:07:42.330 DEBUG 5 --- [ main] c.n.d.shared.MonitoredConnectionManager : Released connection is not reusable.
2017-04-10 16:07:42.331 DEBUG 5 --- [ main] c.n.d.shared.NamedConnectionPool : Releasing connection [{}->http://ec2-34.200.47.82.compute-1.amazonaws.com:
8761][null]
2017-04-10 16:07:42.331 DEBUG 5 --- [ main] c.n.d.shared.NamedConnectionPool : Notifying no-one, there are no waiting threads
2017-04-10 16:07:42.331 DEBUG 5 --- [ main] n.d.s.t.j.AbstractJerseyEurekaHttpClient : Jersey HTTP GET http://ec2-34.200.47.82.compute-1.amazonaws.com:8761/eurek
a/apps/?; statusCode=N/A
2017-04-10 16:07:42.345 ERROR 5 --- [ main] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution
....................
....................
2017-04-10 16:07:49.455 DEBUG 5 --- [ Thread-11] c.n.discovery.endpoint.EndpointUtils : This client will talk to the following serviceUrls in order : [http://ec2-
34.206.31.211.compute-1.amazonaws.com:8761/eureka/]
2017-04-10 16:07:49.455 DEBUG 5 --- [ Thread-11] c.n.discovery.endpoint.EndpointUtils : The region url to be looked up is txt.us-east-1.eureka.mydomain.com :
2017-04-10 16:07:49.456 DEBUG 5 --- [ Thread-11] c.n.discovery.endpoint.EndpointUtils : The zoneName mapped to region us-east-1 is us-east-1c
2017-04-10 16:07:49.456 DEBUG 5 --- [ Thread-11] c.n.discovery.endpoint.EndpointUtils : Checking if the instance zone us-east-1c is the same as the zone from DNS
us-east-1c
2017-04-10 16:07:49.456 DEBUG 5 --- [ Thread-11] c.n.discovery.endpoint.EndpointUtils : The zone index from the list [us-east-1c] that matches the instance zone u
s-east-1c is 0
2017-04-10 16:07:49.456 DEBUG 5 --- [ Thread-11] c.n.discovery.endpoint.EndpointUtils : The zone url to be looked up is txt.us-east-1c.eureka.mydomain.com :
2017-04-10 16:07:49.457 DEBUG 5 --- [ Thread-11] c.n.discovery.endpoint.EndpointUtils : The eureka url for the dns name txt.us-east-1c.eureka.mydomain.com is e
c2-34.200.47.82.compute-1.amazonaws.com
2017-04-10 16:07:49.457 DEBUG 5 --- [ Thread-11] c.n.discovery.endpoint.EndpointUtils : The EC2 url is http://ec2-34.200.47.82.compute-1.amazonaws.com:8761/eureka
/
2017-04-10 16:07:49.457 DEBUG 5 --- [ Thread-11] c.n.discovery.endpoint.EndpointUtils : This client will talk to the following serviceUrls in order : [http://ec2-
34.200.47.82.compute-1.amazonaws.com:8761/eureka/]
**2017-04-10 16:07:49.527 ERROR 5 --- [ Thread-11] com.netflix.eureka.aws.EIPManager : Failed to bind elastic IP: 34.200.47.82 to i-0bc1018ccdcc69148
com.amazonaws.AmazonServiceException: You are not authorized to perform this operation. (Service: AmazonEC2; Status Code: 403; Error Code: UnauthorizedOperation; Request I
D: f9b2dec4-6d79-4da2-bbac-061416bde000)**
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1378) ~[aws-java-sdk-core-1.11.18.jar!/:na]
at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:924) ~[aws-java-sdk-core-1.11.18.jar!/:na]
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:702) ~[aws-java-sdk-core-1.11.18.jar!/:na]
at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:454) ~[aws-java-sdk-core-1.11.18.jar!/:na]
at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:416) ~[aws-java-sdk-core-1.11.18.jar!/:na]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:365) ~[aws-java-sdk-core-1.11.18.jar!/:na]
at com.amazonaws.services.ec2.AmazonEC2Client.doInvoke(AmazonEC2Client.java:12003) ~[aws-java-sdk-ec2-1.11.18.jar!/:na]
at com.amazonaws.services.ec2.AmazonEC2Client.invoke(AmazonEC2Client.java:11973) ~[aws-java-sdk-ec2-1.11.18.jar!/:na]
at com.amazonaws.services.ec2.AmazonEC2Client.describeAddresses(AmazonEC2Client.java:4716) ~[aws-java-sdk-ec2-1.11.18.jar!/:na]
at com.netflix.eureka.aws.EIPManager.bindEIP(EIPManager.java:202) [eureka-core-1.4.12.jar!/:1.4.12]
at com.netflix.eureka.aws.EIPManager.handleEIPBinding(EIPManager.java:136) [eureka-core-1.4.12.jar!/:1.4.12]
at com.netflix.eureka.aws.EIPManager.start(EIPManager.java:105) [eureka-core-1.4.12.jar!/:1.4.12]
at com.netflix.eureka.aws.AwsBinderDelegate.start(AwsBinderDelegate.java:42) [eureka-core-1.4.12.jar!/:1.4.12]
at org.springframework.cloud.netflix.eureka.server.EurekaServerBootstrap.initEurekaServerContext(EurekaServerBootstrap.java:145) [spring-cloud-netflix-eureka-serve
r-1.2.6.RELEASE.jar!/:1.2.6.RELEASE]
at org.springframework.cloud.netflix.eureka.server.EurekaServerBootstrap.contextInitialized(EurekaServerBootstrap.java:81) [spring-cloud-netflix-eureka-server-1.2.
6.RELEASE.jar!/:1.2.6.RELEASE]
at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$1.run(EurekaServerInitializerConfiguration.java:70) [spring-cloud-netflix-e
ureka-server-1.2.6.RELEASE.jar!/:1.2.6.RELEASE]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
2017-04-10 16:07:49.527 INFO 5 --- [ Thread-11] com.netflix.eureka.aws.EIPManager : No EIP is free to be associated with this instance. Candidate EIPs are: [3
4.200.47.82]
......................................
........................................
........................................
QUESTION: I have attached the policy to allow Eureka to bind the Elastic IP to the instance where it is deployed but WHY am I getting a You are not authorized to perform this operation. (Service: AmazonEC2; Status Code: 403; Error Code: UnauthorizedOperation and how can I fix this? As it stands, I have spend more than a day Googling and still the same error :(
I tried the netflix way of configuring eureka like below but to no avail :(:
eureka:
awsAccessId: AWS_KEY
awsSecretKey:AWS_KEY_SECRET
asgName: EIPAccessPolicyGroup
So I finally got a solution and had help from #DirkLachowski and #spencergibb on this post. Thanks a lot guys. So I only had to change this:
eureka:
awsAccessId: AWS_KEY
awsSecretKey:AWS_KEY_SECRET
asgName: EIPAccessPolicyGroup
To this:
eureka:
server:
aWSAccessId: AWS_KEY
aWSSecretKey: AWS_SECRET_KEY
asgName: EC2ContainerService_AUTO_SCALING_GROUP_CREATED_BY_ECS_FOR_MY_CLUSTER
So each eureka server bind an unused/free EIP that I put on my TXT DNS records to the EC2 instance where my eureka server is running :)