NotSslRecordException exception thrown with Netty proxy server - ssl

I am connecting my local netty server to a remote https server for proxying requests.
public class CustomInitializer extends ChannelInitializer<SocketChannel> {
#Autowired(required = false)
private SslContext sslContext;
#Override
public void initChannel(SocketChannel ch) {
ChannelPipeline p = ch.pipeline();
if (sslContext != null) {
p.addLast(sslContext.newHandler(ch.alloc()));
}
p.addLast(new LoggingHandler(LogLevel.INFO));
p.addLast(new HttpClientCodec());
p.addLast(new HttpObjectAggregator(8*1024, true));
p.addLast(new MyCustomHandler());
}
}
Here is how I create ssLcontext bean
#Bean
public SslContext sslContext(#Value("${tcp.ssl}") boolean ssl) throws SSLException, CertificateException {
SslContext sslContext = null;
if (ssl) {
SelfSignedCertificate ssc = new SelfSignedCertificate();
sslContext = SslContextBuilder.forServer(ssc.certificate(), ssc.privateKey()).build();
}
return sslContext;
}
When I hit my localhost, it should proxy to backend. I get the following exception. However, if SSL is turned off and I connect to remote which is local server running on different port, it works fine
io.netty.handler.codec.DecoderException: io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: dsffddfs
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:459)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:647)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:547)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:501)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:461)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: thjhjhhj at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1178)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1243)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:647)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:547)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:501)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:461)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
io.netty.handler.codec.DecoderException: io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: tyuuiiio
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:459)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:647)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:547)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:501)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:461)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: 678900
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1178)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1243)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
... 16 more
EDIT
logs added
X`20190423173352.427``40`````io.netty.handler.logging.LoggingHandler```````eE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xc839c47e, L:/0:0:0:0:0:0:0:0:8080] READ: [id: 0xca2cb8c7, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56170]
X`20190423173352.427``40`````io.netty.handler.logging.LoggingHandler```````fE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xc839c47e, L:/0:0:0:0:0:0:0:0:8080] READ COMPLETE
X`20190423173352.428``40`````io.netty.handler.logging.LoggingHandler```````gE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xc839c47e, L:/0:0:0:0:0:0:0:0:8080] READ: [id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171]
X`20190423173352.428``76`````io.netty.handler.logging.LoggingHandler```````hE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xca2cb8c7, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56170] REGISTERED
X`20190423173352.428``40`````io.netty.handler.logging.LoggingHandler```````iE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xc839c47e, L:/0:0:0:0:0:0:0:0:8080] READ COMPLETE
X`20190423173352.428``76`````io.netty.handler.logging.LoggingHandler```````jE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xca2cb8c7, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56170] ACTIVE
X`20190423173352.429``77`````io.netty.handler.logging.LoggingHandler```````kE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] REGISTERED
X`20190423173352.429``77`````io.netty.handler.logging.LoggingHandler```````lE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] ACTIVE
X`20190423173352.442``76`````io.netty.handler.logging.LoggingHandler```````mE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xca2cb8c7, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56170] READ COMPLETE
X`20190423173352.442``77`````io.netty.handler.logging.LoggingHandler```````nE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] READ: 294B
X`20190423173352.442``76`````io.netty.handler.logging.LoggingHandler```````oE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xca2cb8c7, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56170] WRITE: 0B
X`20190423173352.442``76`````io.netty.handler.logging.LoggingHandler```````pE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xca2cb8c7, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56170] FLUSH
X`20190423173352.443``76`````io.netty.handler.logging.LoggingHandler```````qE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xca2cb8c7, L:/0:0:0:0:0:0:0:1:8080 ! R:/0:0:0:0:0:0:0:1:56170] INACTIVE
X`20190423173352.443``76`````io.netty.handler.logging.LoggingHandler```````rE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xca2cb8c7, L:/0:0:0:0:0:0:0:1:8080 ! R:/0:0:0:0:0:0:0:1:56170] FLUSH
X`20190423173352.443``76`````io.netty.handler.logging.LoggingHandler```````sE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xca2cb8c7, L:/0:0:0:0:0:0:0:1:8080 ! R:/0:0:0:0:0:0:0:1:56170] CLOSE
X`20190423173352.443``76`````io.netty.handler.logging.LoggingHandler```````tE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0xca2cb8c7, L:/0:0:0:0:0:0:0:1:8080 ! R:/0:0:0:0:0:0:0:1:56170] UNREGISTERED
X`20190423173352.450``77`````io.netty.handler.logging.LoggingHandler```````uE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] WRITE: 734B
X`20190423173352.452``77`````io.netty.handler.logging.LoggingHandler```````vE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] READ COMPLETE
X`20190423173352.452``77`````io.netty.handler.logging.LoggingHandler```````wE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] FLUSH
X`20190423173352.452``77`````io.netty.handler.logging.LoggingHandler```````xE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] WRITE: 0B
X`20190423173352.452``77`````io.netty.handler.logging.LoggingHandler```````yE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] FLUSH
X`20190423173352.453``77`````io.netty.handler.logging.LoggingHandler```````zE````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] READ: 126B
X`20190423173352.456``77`````io.netty.handler.logging.LoggingHandler```````0E````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] WRITE: 6B
X`20190423173352.457``77`````io.netty.handler.logging.LoggingHandler```````1E````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] WRITE: 45B
X`20190423173352.457``77`````io.netty.handler.logging.LoggingHandler```````2E````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] WRITE: 0B
X`20190423173352.457``77`````io.netty.handler.logging.LoggingHandler```````3E````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] READ COMPLETE
X`20190423173352.457``77`````io.netty.handler.logging.LoggingHandler```````4E````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] FLUSH
X`20190423173352.457``77`````io.netty.handler.logging.LoggingHandler```````5E````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] WRITE: 0B
X`20190423173352.457``77`````io.netty.handler.logging.LoggingHandler```````6E````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] WRITE: 0B
X`20190423173352.457``77`````io.netty.handler.logging.LoggingHandler```````7E````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] FLUSH
X`20190423173352.458``77`````io.netty.handler.logging.LoggingHandler```````8E````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] READ: 512B
X`20190423173352.458``77`````io.netty.handler.logging.LoggingHandler```````9E````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] READ: 87B
X`20190423173352.460``77`````io.netty.handler.logging.LoggingHandler```````-E````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x8c3b87f8] REGISTERED
X`20190423173352.460``77`````io.netty.handler.logging.LoggingHandler```````_E````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] READ COMPLETE
X`20190423173352.460``77`````io.netty.handler.logging.LoggingHandler```````AF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] WRITE: 0B
X`20190423173352.461``77`````io.netty.handler.logging.LoggingHandler```````BF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] WRITE: 0B
X`20190423173352.461``77`````io.netty.handler.logging.LoggingHandler```````CF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] FLUSH
X`20190423173352.461``77`````io.netty.handler.logging.LoggingHandler```````DF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x8c3b87f8] CONNECT: dom.fbde.lol.hepd.com/122.126.80.1:443
X`20190423173352.483``77`````io.netty.handler.logging.LoggingHandler```````EF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x8c3b87f8, L:/10.3.49.27:56172 - R:dom.fbde.lol.hepd.com/122.126.80.1:443] WRITE: 0B
X`20190423173352.484``77`````io.netty.handler.logging.LoggingHandler```````FF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x8c3b87f8, L:/10.3.49.27:56172 - R:dom.fbde.lol.hepd.com/122.126.80.1:443] FLUSH
X`20190423173352.484``77`````io.netty.handler.logging.LoggingHandler```````GF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x8c3b87f8, L:/10.3.49.27:56172 - R:dom.fbde.lol.hepd.com/122.126.80.1:443] ACTIVE
X`20190423173402.488``77`````io.netty.handler.logging.LoggingHandler```````HF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x8c3b87f8, L:/10.3.49.27:56172 - R:dom.fbde.lol.hepd.com/122.126.80.1:443] FLUSH
X`20190423173402.488``77`````io.netty.handler.logging.LoggingHandler```````IF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x8c3b87f8, L:/10.3.49.27:56172 - R:dom.fbde.lol.hepd.com/122.126.80.1:443] CLOSE
X`20190423173402.489``77`````io.netty.handler.logging.LoggingHandler```````JF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] WRITE: 31B
X`20190423173402.489``77`````io.netty.handler.logging.LoggingHandler```````KF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] FLUSH
X`20190423173402.490``77`````io.netty.handler.logging.LoggingHandler```````LF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 - R:/0:0:0:0:0:0:0:1:56171] CLOSE
X`20190423173402.490``77`````io.netty.handler.logging.LoggingHandler```````MF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x8c3b87f8, L:/10.3.49.27:56172 ! R:dom.fbde.lol.hepd.com/122.126.80.1:443] CLOSE
X`20190423173402.490``77`````io.netty.handler.logging.LoggingHandler```````NF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x8c3b87f8, L:/10.3.49.27:56172 ! R:dom.fbde.lol.hepd.com/122.126.80.1:443] INACTIVE
X`20190423173402.490``77`````io.netty.handler.logging.LoggingHandler```````OF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x8c3b87f8, L:/10.3.49.27:56172 ! R:dom.fbde.lol.hepd.com/122.126.80.1:443] UNREGISTERED
X`20190423173402.490``77`````io.netty.handler.logging.LoggingHandler```````PF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 ! R:/0:0:0:0:0:0:0:1:56171] INACTIVE
X`20190423173402.491``77`````io.netty.handler.logging.LoggingHandler```````QF````INFO`io.netty.handler.logging.LoggingHandler`[id: 0x08537ac8, L:/0:0:0:0:0:0:0:1:8080 ! R:/0:0:0:0:0:0:0:1:56171] UNREGISTERED

When you receive an NotSslRecordException exception, you best starting point is the random blob of bytes following the error.
Your "blob" starts with the following bytes: 504f5354...
After converting the hex data back to a String, you get 50 = P, 4f = O, 53 = S, 54 = T, final result: POST
Since we now converted the start of the binary blob to a String, we now need to figure out what protocols use these "magic strings". We don't have to look far for it, this is a HTTP Request, and you cannot use HTTPS to receive it.
The solution is simple, connect to your server using https instead of http:
https://localhost:8080/

Related

spring cloud data flow - s3 source not working with minio

I am running a similar docker-compose of what you can find in the spring docs for running Spring Cloud Dada Flow in your local machine.
version: '3.8'
volumes:
zookeeper_data:
driver: local
kafka_data:
driver: local
elastic_data:
driver: local
minio_data1:
driver: local
minio_data2:
driver: local
networks:
sdf:
driver: "bridge"
services:
minio:
image: quay.io/minio/minio:latest
container_name: minio
command: server --console-address ":9001" http://minio/data{1...2}
ports:
- '9000:9000'
- '9001:9001'
expose:
- "9000"
- "9001"
# environment:
# MINIO_ROOT_USER: minioadmin 093DrIkcXK8J3SC1
# MINIO_ROOT_PASSWORD: minioadmin CfjqeNxAtDLnUK8Fbhka8RwzfZTNlrf5
hostname: minio
volumes:
- minio_data1:/data1
- minio_data2:/data2
networks:
- sdf
zookeeper:
image: bitnami/zookeeper:3
container_name: zookeeper
ports:
- '2181:2181'
volumes:
- 'zookeeper_data:/bitnami'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
networks:
- sdf
kafka:
image: bitnami/kafka:2
container_name: kafka
ports:
- '9092:9092'
- '29092:29092'
volumes:
- 'kafka_data:/bitnami'
environment:
- KAFKA_CREATE_TOPICS="requests:1:1,responses:1:1,notifications:1:1"
#- KAFKA_AUTO_CREATE_TOPICS_ENABLE=false
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
- KAFKA_CFG_LISTENERS=PLAINTEXT://:29092,PLAINTEXT_HOST://:9092
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
depends_on:
- zookeeper
networks:
- sdf
dataflow-server:
user: root
image: springcloud/spring-cloud-dataflow-server:${DATAFLOW_VERSION:-2.9.1}${BP_JVM_VERSION:-}
container_name: dataflow-server
ports:
- "9393:9393"
environment:
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS=PLAINTEXT://kafka:29092
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_SPRING_CLOUD_STREAM_KAFKA_STREAMS_BINDER_BROKERS=PLAINTEXT://kafka:29092
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_SPRING_CLOUD_STREAM_KAFKA_BINDER_ZKNODES=zookeeper:2181
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_SPRING_CLOUD_STREAM_KAFKA_STREAMS_BINDER_ZKNODES=zookeeper:2181
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_SPRING_KAFKA_STREAMS_PROPERTIES_METRICS_RECORDING_LEVEL=DEBUG
# Set CLOSECONTEXTENABLED=true to ensure that the CRT launcher is closed.
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_TASK_SPRING_CLOUD_TASK_CLOSECONTEXTENABLED=true
- SPRING_CLOUD_SKIPPER_CLIENT_SERVER_URI=${SKIPPER_URI:-http://skipper-server:7577}/api
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/dataflow
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=rootpw
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.mariadb.jdbc.Driver
# (Optionally) authenticate the default Docker Hub access for the App Metadata access.
# - SPRING_CLOUD_DATAFLOW_CONTAINER_REGISTRY_CONFIGURATIONS_DEFAULT_USER=${METADATA_DEFAULT_DOCKERHUB_USER}
# - SPRING_CLOUD_DATAFLOW_CONTAINER_REGISTRY_CONFIGURATIONS_DEFAULT_SECRET=${METADATA_DEFAULT_DOCKERHUB_PASSWORD}
# - SPRING_CLOUD_DATAFLOW_CONTAINER_REGISTRYCONFIGURATIONS_DEFAULT_USER=${METADATA_DEFAULT_DOCKERHUB_USER}
# - SPRING_CLOUD_DATAFLOW_CONTAINER_REGISTRYCONFIGURATIONS_DEFAULT_SECRET=${METADATA_DEFAULT_DOCKERHUB_PASSWORD}
depends_on:
- kafka
- skipper-server
entrypoint: >
bin/sh -c "
apt-get update && apt-get install --no-install-recommends -y wget &&
wget --no-check-certificate -P /tmp/ https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh &&
chmod a+x /tmp/wait-for-it.sh &&
/tmp/wait-for-it.sh mysql:3306 -- /cnb/process/web"
restart: always
volumes:
- ${HOST_MOUNT_PATH:-.}:${DOCKER_MOUNT_PATH:-/home/cnb/scdf}
networks:
- sdf
app-import-stream:
image: springcloud/baseimage:1.0.0
container_name: dataflow-app-import-stream
depends_on:
- dataflow-server
command: >
/bin/sh -c "
./wait-for-it.sh -t 360 dataflow-server:9393;
wget -qO- '${DATAFLOW_URI:-http://dataflow-server:9393}/apps' --no-check-certificate --post-data='uri=${STREAM_APPS_URI:-https://dataflow.spring.io/kafka-maven-latest&force=true}';
wget -qO- '${DATAFLOW_URI:-http://dataflow-server:9393}/apps/sink/ver-log/3.0.1' --no-check-certificate --post-data='uri=maven://org.springframework.cloud.stream.app:log-sink-kafka:3.0.1';
wget -qO- '${DATAFLOW_URI:-http://dataflow-server:9393}/apps/sink/ver-log/2.1.5.RELEASE' --no-check-certificate --post-data='uri=maven://org.springframework.cloud.stream.app:log-sink-kafka:2.1.5.RELEASE';
wget -qO- '${DATAFLOW_URI:-http://dataflow-server:9393}/apps/sink/dataflow-tasklauncher/${DATAFLOW_VERSION:-2.9.1}' --no-check-certificate --post-data='uri=maven://org.springframework.cloud:spring-cloud-dataflow-tasklauncher-sink-kafka:${DATAFLOW_VERSION:-2.9.1}';
echo 'Maven Stream apps imported'"
networks:
- sdf
skipper-server:
user: root
image: springcloud/spring-cloud-skipper-server:${SKIPPER_VERSION:-2.8.1}${BP_JVM_VERSION:-}
container_name: skipper-server
ports:
- "7577:7577"
- ${APPS_PORT_RANGE:-20000-20195:20000-20195}
environment:
- SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_PORTRANGE_LOW=20000
- SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_PORTRANGE_HIGH=20190
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/dataflow
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=rootpw
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.mariadb.jdbc.Driver
- LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_CLOUD_SKIPPER_SERVER_DEPLOYER=ERROR
entrypoint: >
bin/sh -c "
apt-get update && apt-get install --no-install-recommends -y wget &&
wget --no-check-certificate -P /tmp/ https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh &&
chmod a+x /tmp/wait-for-it.sh &&
/tmp/wait-for-it.sh mysql:3306 -- /cnb/process/web"
restart: always
volumes:
- ${HOST_MOUNT_PATH:-.}:${DOCKER_MOUNT_PATH:-/home/cnb/scdf}
networks:
- sdf
mysql:
image: mysql:5.7.25
container_name: mysql
environment:
MYSQL_DATABASE: dataflow
MYSQL_USER: root
MYSQL_ROOT_PASSWORD: rootpw
expose:
- 3306
networks:
- sdf
I was able to add Elasticsearch to this docker-compose and successfully connect to it (using elasticsearch sink), but here I am just keeping what concerns to the issue.
This is how I am configuring the s3 source
app.s3.cloud.aws.credentials.accessKey=093DrIkcXK8J3SC1
app.s3.cloud.aws.credentials.secretKey=CfjqeNxAtDLnUK8Fbhka8RwzfZTNlrf5
app.s3.cloud.aws.region.static=us-west-1
app.s3.cloud.aws.stack.auto=false
app.s3.common.endpoint-url=http://minio:9000
app.s3.supplier.remote-dir=/kafka-connect/topics
app.s3.logging.level.org.apache.http=DEBUG
This is the error that I am getting
2022-07-14 14:11:32.625 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.h.client.protocol.RequestAddCookies : CookieSpec selected: default
2022-07-14 14:11:32.625 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.h.client.protocol.RequestAuthCache : Auth cache not set in the context
2022-07-14 14:11:32.625 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.PoolingHttpClientConnectionManager : Connection request: [route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
2022-07-14 14:11:32.626 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.PoolingHttpClientConnectionManager : Connection leased: [id: 44][route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 1 of 50; total allocated: 1 of 50]
2022-07-14 14:11:32.626 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.http.impl.execchain.MainClientExec : Opening connection {}->http://kafka-connect.minio:9000
2022-07-14 14:11:32.626 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-44: Shutdown connection
2022-07-14 14:11:32.626 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.http.impl.execchain.MainClientExec : Connection discarded
2022-07-14 14:11:32.626 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.PoolingHttpClientConnectionManager : Connection released: [id: 44][route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
2022-07-14 14:11:32.678 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.h.client.protocol.RequestAddCookies : CookieSpec selected: default
2022-07-14 14:11:32.679 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.h.client.protocol.RequestAuthCache : Auth cache not set in the context
2022-07-14 14:11:32.679 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.PoolingHttpClientConnectionManager : Connection request: [route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
2022-07-14 14:11:32.679 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.PoolingHttpClientConnectionManager : Connection leased: [id: 45][route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 1 of 50; total allocated: 1 of 50]
2022-07-14 14:11:32.679 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.http.impl.execchain.MainClientExec : Opening connection {}->http://kafka-connect.minio:9000
2022-07-14 14:11:32.679 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-45: Shutdown connection
2022-07-14 14:11:32.679 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.http.impl.execchain.MainClientExec : Connection discarded
2022-07-14 14:11:32.679 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.PoolingHttpClientConnectionManager : Connection released: [id: 45][route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
2022-07-14 14:11:32.704 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.h.client.protocol.RequestAddCookies : CookieSpec selected: default
2022-07-14 14:11:32.704 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.h.client.protocol.RequestAuthCache : Auth cache not set in the context
2022-07-14 14:11:32.704 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.PoolingHttpClientConnectionManager : Connection request: [route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
2022-07-14 14:11:32.704 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.PoolingHttpClientConnectionManager : Connection leased: [id: 46][route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 1 of 50; total allocated: 1 of 50]
2022-07-14 14:11:32.705 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.http.impl.execchain.MainClientExec : Opening connection {}->http://kafka-connect.minio:9000
2022-07-14 14:11:32.705 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-46: Shutdown connection
2022-07-14 14:11:32.705 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.http.impl.execchain.MainClientExec : Connection discarded
2022-07-14 14:11:32.705 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.PoolingHttpClientConnectionManager : Connection released: [id: 46][route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
2022-07-14 14:11:33.021 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.h.client.protocol.RequestAddCookies : CookieSpec selected: default
2022-07-14 14:11:33.021 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.h.client.protocol.RequestAuthCache : Auth cache not set in the context
2022-07-14 14:11:33.021 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.PoolingHttpClientConnectionManager : Connection request: [route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
2022-07-14 14:11:33.021 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.PoolingHttpClientConnectionManager : Connection leased: [id: 47][route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 1 of 50; total allocated: 1 of 50]
2022-07-14 14:11:33.021 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.http.impl.execchain.MainClientExec : Opening connection {}->http://kafka-connect.minio:9000
2022-07-14 14:11:33.021 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-47: Shutdown connection
2022-07-14 14:11:33.021 DEBUG [s3-source,,] 470 --- [oundedElastic-4] o.a.http.impl.execchain.MainClientExec : Connection discarded
2022-07-14 14:11:33.022 DEBUG [s3-source,,] 470 --- [oundedElastic-4] h.i.c.PoolingHttpClientConnectionManager : Connection released: [id: 47][route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
2022-07-14 14:11:33.026 ERROR [s3-source,,] 470 --- [oundedElastic-4] o.s.i.util.IntegrationReactiveUtils : Error from Flux for : org.springframework.integration.aws.inbound.S3InboundFileSynchronizingMessageSource#3d20e22e
org.springframework.messaging.MessagingException: Problem occurred while synchronizing '/kafka-connect/topics' to local directory; nested exception is org.springframework.messaging.MessagingException: Failed to execute on session; nested exception is com.amazonaws.SdkClientException: Unable to execute HTTP request: kafka-connect.minio
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:348) ~[spring-integration-file-5.5.12.jar!/:5.5.12]
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource.doReceive(AbstractInboundFileSynchronizingMessageSource.java:267) ~[spring-integration-file-5.5.12.jar!/:5.5.12]
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource.doReceive(AbstractInboundFileSynchronizingMessageSource.java:69) ~[spring-integration-file-5.5.12.jar!/:5.5.12]
at org.springframework.integration.endpoint.AbstractFetchLimitingMessageSource.doReceive(AbstractFetchLimitingMessageSource.java:47) ~[spring-integration-core-5.5.12.jar!/:5.5.12]
at org.springframework.integration.endpoint.AbstractMessageSource.receive(AbstractMessageSource.java:142) ~[spring-integration-core-5.5.12.jar!/:5.5.12]
at org.springframework.integration.util.IntegrationReactiveUtils.lambda$messageSourceToFlux$0(IntegrationReactiveUtils.java:83) ~[spring-integration-core-5.5.12.jar!/:5.5.12]
at reactor.core.publisher.MonoCreate$DefaultMonoSink.onRequest(MonoCreate.java:221) ~[reactor-core-3.4.18.jar!/:3.4.18]
at org.springframework.integration.util.IntegrationReactiveUtils.lambda$messageSourceToFlux$1(IntegrationReactiveUtils.java:83) ~[spring-integration-core-5.5.12.jar!/:5.5.12]
at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:58) ~[reactor-core-3.4.18.jar!/:3.4.18]
at reactor.core.publisher.Mono.subscribe(Mono.java:4400) ~[reactor-core-3.4.18.jar!/:3.4.18]
at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.4.18.jar!/:3.4.18]
at org.springframework.cloud.sleuth.instrument.reactor.ReactorSleuth.lambda$null$6(ReactorSleuth.java:324) ~[spring-cloud-sleuth-instrumentation-3.1.3.jar!/:3.1.3]
at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.4.18.jar!/:3.4.18]
at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.4.18.jar!/:3.4.18]
at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
Caused by: org.springframework.messaging.MessagingException: Failed to execute on session; nested exception is com.amazonaws.SdkClientException: Unable to execute HTTP request: kafka-connect.minio
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:461) ~[spring-integration-file-5.5.12.jar!/:5.5.12]
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:341) ~[spring-integration-file-5.5.12.jar!/:5.5.12]
... 18 common frames omitted
Caused by: com.amazonaws.SdkClientException: Unable to execute HTTP request: kafka-connect.minio
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleRetryableException(AmazonHttpClient.java:1207) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1153) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:802) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:770) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:744) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:704) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:686) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:550) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:530) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5062) ~[aws-java-sdk-s3-1.11.792.jar!/:na]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5008) ~[aws-java-sdk-s3-1.11.792.jar!/:na]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5002) ~[aws-java-sdk-s3-1.11.792.jar!/:na]
at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:898) ~[aws-java-sdk-s3-1.11.792.jar!/:na]
at org.springframework.integration.aws.support.S3Session.list(S3Session.java:91) ~[spring-integration-aws-2.3.4.RELEASE.jar!/:na]
at org.springframework.integration.aws.support.S3Session.list(S3Session.java:52) ~[spring-integration-aws-2.3.4.RELEASE.jar!/:na]
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.transferFilesFromRemoteToLocal(AbstractInboundFileSynchronizer.java:356) ~[spring-integration-file-5.5.12.jar!/:5.5.12]
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.lambda$synchronizeToLocalDirectory$0(AbstractInboundFileSynchronizer.java:342) ~[spring-integration-file-5.5.12.jar!/:5.5.12]
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:452) ~[spring-integration-file-5.5.12.jar!/:5.5.12]
... 19 common frames omitted
Caused by: java.net.UnknownHostException: kafka-connect.minio
at java.base/java.net.InetAddress$CachedAddresses.get(Unknown Source) ~[na:na]
at java.base/java.net.InetAddress.getAllByName0(Unknown Source) ~[na:na]
at java.base/java.net.InetAddress.getAllByName(Unknown Source) ~[na:na]
at java.base/java.net.InetAddress.getAllByName(Unknown Source) ~[na:na]
at com.amazonaws.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:27) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.http.DelegatingDnsResolver.resolve(DelegatingDnsResolver.java:38) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112) ~[httpclient-4.5.13.jar!/:4.5.13]
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ~[httpclient-4.5.13.jar!/:4.5.13]
at jdk.internal.reflect.GeneratedMethodAccessor73.invoke(Unknown Source) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
at com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.http.conn.$Proxy145.connect(Unknown Source) ~[na:na]
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) ~[httpclient-4.5.13.jar!/:4.5.13]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.13.jar!/:4.5.13]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.13.jar!/:4.5.13]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.13.jar!/:4.5.13]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.13.jar!/:4.5.13]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[httpclient-4.5.13.jar!/:4.5.13]
at com.amazonaws.http.apache.client.impl.SdkHttpClient.execute(SdkHttpClient.java:72) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1330) ~[aws-java-sdk-core-1.11.792.jar!/:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1145) ~[aws-java-sdk-core-1.11.792.jar!/:na]
... 35 common frames omitted
Debugging the http connections I can see that is trying to connect to: http://kafka-connect.minio:9000
Connection request: [route: {}->http://kafka-connect.minio:9000][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
This is resulting in an Unknown host as clearly the host kafka-connect.minio doesn't exist. But I was able to curl http://minio:9000 successfully (from inside the skipper-server which is the container that runs the s3 connector).
So here is my question actually:
Why is it trying to connect to http://{BUCKET_NAME}.minio:9000 instead of http://minio:9000 and then go to the bucket?
I am able to connect to this same Minio, to the same bucket with Kafka Connect (s3-source), and I am doing that with a similar approach, meaning, kafka-connect is a separate container in the same docker-compose and it can connect to the minio container and fetch the files. You can see how this is done here kafka connect s3 source not working with Minio
Adding this property fixes the problem
app.s3.path-style-access=true
By default is false, and for the kafka-connect case, by default is true

When I try to lift a docker container it doesn't load the apache web

When up a container with apache, I cannot access the route.
My docker-compose:
version: '3'
services:
tomcat:
container_name: tomcatSimple
image: tomcat:9.0.27-jdk8-corretto
restart: always
ports:
- '8090:8080'
volumes:
- tomcat_webapps:/usr/local/tomcat/webapps
volumes:
tomcat_webapps:
with docker-ps i can see the container
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e6a608431f8a tomcat:9.0.27-jdk8-corretto "catalina.sh run" 53 minutes ago Up 8 minutes 0.0.0.0:8090->8080/tcp tomcatSimple
with docker inspect e6a608431f8a
{
"Id": "e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3",
"Created": "2019-10-31T11:45:28.6292202Z",
"Path": "catalina.sh",
"Args": [
"run"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 294,
"ExitCode": 0,
"Error": "",
"StartedAt": "2019-10-31T12:29:47.6437158Z",
"FinishedAt": "2019-10-31T13:04:58.5282453+01:00"
},
"Image": "sha256:30dd95129d60bfe08aaacd21fdb8022bd6c1e328997bae5254658453aa602379",
"ResolvConfPath": "",
"HostnamePath": "",
"HostsPath": "",
"LogPath": "C:\\ProgramData\\Docker\\containers\\e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3\\e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3-json.log",
"Name": "/tomcatSimple",
"RestartCount": 0,
"Driver": "lcow",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"trydocker_tomcat_webapps:/usr/local/tomcat/webapps:rw"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "trydocker_default",
"PortBindings": {
"8080/tcp": [
{
"HostIp": "",
"HostPort": "8090"
}
]
},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": [],
"CapAdd": null,
"CapDrop": null,
"Capabilities": null,
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "shareable",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 0,
"ConsoleSize": [
0,
0
],
"Isolation": "hyperv",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": null,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": null,
"ReadonlyPaths": null
},
"GraphDriver": {
"Data": {
"dir": "C:\\ProgramData\\Docker\\lcow\\e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3"
},
"Name": "lcow"
},
"Mounts": [
{
"Type": "volume",
"Name": "trydocker_tomcat_webapps",
"Source": "C:\\ProgramData\\Docker\\volumes\\trydocker_tomcat_webapps\\_data",
"Destination": "/usr/local/tomcat/webapps",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "e6a608431f8a",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"8080/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/tomcat/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto",
"CATALINA_HOME=/usr/local/tomcat",
"TOMCAT_NATIVE_LIBDIR=/usr/local/tomcat/native-jni-lib",
"LD_LIBRARY_PATH=/usr/local/tomcat/native-jni-lib",
"GPG_KEYS=05AB33110949707C93A279E3D3EFE6B686867BA6 07E48665A34DCAFAE522E5E6266191C37C037D42 47309207D818FFD8DCD3F83F1931D684307A10A5 541FBE7D8F78B25E055DDEE13C370389288584E7 61B832AC2F1C5A90F0F9B00A1C506407564C17A3 79F7026C690BAA50B92CD8B66A3AD3F4F22C4FED 9BA44C2621385CB966EBA586F72C284D731FABEE A27677289986DB50844682F8ACB77FC2E86E29AC A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 DCFD35E0BF8CA7344752DE8B6FB21E8933C60243 F3A04C595DB5B6A5F1ECA43E3B7BBB100D811BBE F7DA48BB64BCB84ECBA7EE6935CD23C10D498E23",
"TOMCAT_MAJOR=9",
"TOMCAT_VERSION=9.0.27",
"TOMCAT_SHA512=408d30bf56d59941149b397e5e725a5f9baf225807397a4b7a3be79f7d211e6d878d34bf00776746a54cc7d067f168db24c367e5c7390bb7329b3bca428726cc"
],
"Cmd": [
"catalina.sh",
"run"
],
"Image": "tomcat:9.0.27-jdk8-corretto",
"Volumes": {
"/usr/local/tomcat/webapps": {}
},
"WorkingDir": "/usr/local/tomcat",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"com.docker.compose.config-hash": "61e1ab2b8140f4f4e6a215a0eb5350b5512f40571133f1313b1fc9f7a0af2a57",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "trydocker",
"com.docker.compose.service": "tomcat",
"com.docker.compose.version": "1.24.1"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"8080/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "8090"
}
]
},
"SandboxKey": "e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"trydocker_default": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"tomcat",
"e6a608431f8a"
],
"NetworkID": "2b43c6dd8527271224208b671bc29b54ad0b4819d175cca7e6d976abc550caf2",
"EndpointID": "33c6cb0e77a251b44ec5f6d1141098fabd876af46fba9ff92549f44e655ebcae",
"Gateway": "172.22.128.1",
"IPAddress": "172.22.135.63",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "00:15:5d:01:0d:c6",
"DriverOpts": null
}
}
}
}
It seems that everything is correct, but when accessing the localhost:8090
it doesn't show me tomcat's welcome screen
Estado HTTP 404 – No encontrado
Tipo Informe de estado
mensaje Not found
Descripción El recurso requerido no está disponible.
Apache Tomcat/9.0.2
My logs
31-Oct-2019 11:45:30.796 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.27
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 7 2019 09:57:22 UTC
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.27.0
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.19.27-linuxkit
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_232-b09
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Amazon.com Inc.
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
31-Oct-2019 11:45:30.810 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
31-Oct-2019 11:45:30.810 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
31-Oct-2019 11:45:30.810 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
31-Oct-2019 11:45:30.812 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
31-Oct-2019 11:45:30.812 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.3].
31-Oct-2019 11:45:30.812 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
31-Oct-2019 11:45:30.812 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
31-Oct-2019 11:45:30.838 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k-fips 26 Jan 2017]
31-Oct-2019 11:45:31.144 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
31-Oct-2019 11:45:31.178 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 11:45:31.181 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [691] milliseconds
31-Oct-2019 11:45:31.224 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
31-Oct-2019 11:45:31.224 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.27]
31-Oct-2019 11:45:31.240 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
31-Oct-2019 11:45:31.255 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 11:45:31.260 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [78] milliseconds
31-Oct-2019 12:04:57.477 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:04:57.483 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:04:57.484 INFO [Thread-5] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
31-Oct-2019 12:04:57.486 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:04:57.489 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:04:57.498 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:04:57.499 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:29:47.035 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.27
31-Oct-2019 12:29:47.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 7 2019 09:57:22 UTC
31-Oct-2019 12:29:47.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.27.0
31-Oct-2019 12:29:47.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
31-Oct-2019 12:29:47.041 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.19.27-linuxkit
31-Oct-2019 12:29:47.041 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
31-Oct-2019 12:29:47.041 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre
31-Oct-2019 12:29:47.042 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_232-b09
31-Oct-2019 12:29:47.042 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Amazon.com Inc.
31-Oct-2019 12:29:47.043 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
31-Oct-2019 12:29:47.043 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
31-Oct-2019 12:29:47.044 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
31-Oct-2019 12:29:47.044 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
31-Oct-2019 12:29:47.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
31-Oct-2019 12:29:47.046 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
31-Oct-2019 12:29:47.046 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
31-Oct-2019 12:29:47.047 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
31-Oct-2019 12:29:47.047 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
31-Oct-2019 12:29:47.048 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
31-Oct-2019 12:29:47.048 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
31-Oct-2019 12:29:47.049 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.3].
31-Oct-2019 12:29:47.049 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
31-Oct-2019 12:29:47.050 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
31-Oct-2019 12:29:47.055 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k-fips 26 Jan 2017]
31-Oct-2019 12:29:47.307 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:29:47.335 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:29:47.342 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [455] milliseconds
31-Oct-2019 12:29:47.372 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
31-Oct-2019 12:29:47.372 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.27]
31-Oct-2019 12:29:47.390 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:29:47.402 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:29:47.409 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [66] milliseconds

Java8, JBoss AS5, SSLException: "Received fatal alert: handshake_failure"

My java application is running by JBoss AS 5. I'm trying to connect by URL to download image, but I receive the next exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
I've configurated trust-managet as "all-trusting trust manager":
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
#Override
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
#Override
public void checkClientTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
#Override
public void checkServerTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
}
};
// Install the all-trusting trust manager
try {
SSLContext sc = SSLContext.getInstance("TLSv1.2");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
} catch (Exception e) {
}
HostnameVerifier hv = new HostnameVerifier() {
#Override
public boolean verify(String urlHostName, SSLSession session) {
return true;
}
};
HttpsURLConnection.setDefaultHostnameVerifier(hv);
My simple java code:
URL url = new URL("https://cdn.hotelbeds.com/giata/62/623081/623081a_hb_ro_007.jpg");
url.openConnection().connect();
I've activated ssl debug mode (-Djavax.net.debug=ssl) and received the following logs:
`18:20:23,030 INFO [STDOUT] Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
18:20:23,031 INFO [STDOUT] WorkerThread#1[10.0.0.38:52361], setSoTimeout(0) called
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 for TLSv1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 for TLSv1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_RSA_WITH_AES_128_CBC_SHA256 for TLSv1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 for TLSv1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 for TLSv1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 for TLSv1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 for TLSv1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_RSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
18:20:23,032 INFO [STDOUT] Ignoring unsupported cipher suite: TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 for TLSv1.1
.......................
18:20:23,036 INFO [STDOUT] Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
18:20:23,036 INFO [STDOUT] Compression Methods: {0}
18:20:23,036 INFO [STDOUT] Extension elliptic_curves, curve names: {secp256r1, secp384r1, secp521r1, sect283k1, sect283r1, sect409k1, sect409r1, sect571k1, sect571r1, secp256k1}
18:20:23,036 INFO [STDOUT] Extension ec_point_formats, formats: [uncompressed]
18:20:23,036 INFO [STDOUT] Extension signature_algorithms, signature_algorithms: SHA512withECDSA, SHA512withRSA, SHA384withECDSA, SHA384withRSA, SHA256withECDSA, SHA256withRSA, SHA256withDSA, SHA1withECDSA, SHA1withRSA, SHA1withDSA
18:20:23,037 INFO [STDOUT] WorkerThread#1[10.0.0.38:52361], WRITE: TLSv1.2 Handshake, length = 161
18:20:23,065 INFO [STDOUT] WorkerThread#1[10.0.0.38:52361], READ: TLSv1.2 Alert, length = 2
18:20:23,066 INFO [STDOUT] WorkerThread#1[10.0.0.38:52361]
18:20:23,066 INFO [STDOUT] RECV TLSv1.2 ALERT: fatal, handshake_failure
18:20:23,066 INFO [STDOUT] WorkerThread#1[10.0.0.38:52361], called closeSocket()
18:20:23,066 INFO [STDOUT] WorkerThread#1[10.0.0.38:52361], handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
Also I've tried to use property the following 'solutions':
https.protocols=TLSv1.2,TLSv1.1,TLSv1
crypto.policy=unlimited
The java version is 1.8.0_131. What should I do to connect with this website and download this image?
Thanks in advance.
It very looks like a duplicate from what I see when checking your site against SSLLabs and from the Extension name being absent in the debug output. See here for my answer and the solution (upgrading Java).

Failed to wait for initial partition map exchange

After change apache Ignite 2.0 to 2.1, I got below warning.
2017-08-17 10:44:21.699 WARN 10884 --- [ main] .i.p.c.GridCachePartitionExchangeManager : Failed to wait for initial partition map exchange. Possible reasons are:
I use third party persistence cache store.
when I remove cacheStore configuration, I didn't got warning. work fine.
Using cacheStore and changing down version 2.1 to 2.0, I didn't got warning. work fine.
Is there significant change in 2.1?
here is my full framework stack.
- spring boot 1.5.6
- spring data jpa
- apache ignite 2.1.0
here is my full configuration in java code.(I use embedded ignite in spring)
I use partitioned cache, write behind cache to rdbms storage using spring data jpa.
IgniteConfiguration igniteConfig = new IgniteConfiguration();
CacheConfiguration<Long, Object> cacheConfig = new CacheConfiguration<>();
cacheConfig.setCopyOnRead(false); //for better performance
cacheConfig
.setWriteThrough(true)
.setWriteBehindEnabled(true)
.setWriteBehindBatchSize(1024)
.setWriteBehindFlushFrequency(10000)
.setWriteBehindCoalescing(true)
.setCacheStoreFactory(new CacheStoreImpl()); //CacheStoreImpl use spring data jpa internally
cacheConfig.setName('myService');
cacheConfig.setCacheMode(CacheMode.PARTITIONED);
cacheConfig.setBackups(2);
cacheConfig.setWriteSynchronizationMode(FULL_ASYNC);
cacheConfig.setNearConfiguration(new NearCacheConfiguration<>());//use default configuration
igniteConfig.setCacheConfiguration(cacheConfig);
igniteConfig.setMemoryConfiguration(new MemoryConfiguration()
.setPageSize(8 * 1024)
.setMemoryPolicies(new MemoryPolicyConfiguration()
.setInitialSize((long) 256L * 1024L * 1024L)
.setMaxSize((long) 1024L * 1024L * 1024L)));
Ignite ignite = IgniteSpring.start(igniteConfig, springApplicationCtx);
ignite.active(true);
here is my full log using -DIGNITE_QUITE=false
2017-08-18 11:54:52.587 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : Config URL: n/a
2017-08-18 11:54:52.587 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : Daemon mode: off
2017-08-18 11:54:52.587 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : OS: Windows 10 10.0 amd64
2017-08-18 11:54:52.587 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : OS user: user
2017-08-18 11:54:52.588 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : PID: 684
2017-08-18 11:54:52.588 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : Language runtime: Java Platform API Specification ver. 1.8
2017-08-18 11:54:52.588 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : VM information: Java(TM) SE Runtime Environment 1.8.0_131-b11 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.131-b11
2017-08-18 11:54:52.588 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : VM total memory: 1.9GB
2017-08-18 11:54:52.589 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : Remote Management [restart: off, REST: on, JMX (remote: on, port: 58771, auth: off, ssl: off)]
2017-08-18 11:54:52.589 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : IGNITE_HOME=null
2017-08-18 11:54:52.589 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : VM arguments: [-Dcom.sun.management.jmxremote, -Dcom.sun.management.jmxremote.port=58771, -Dcom.sun.management.jmxremote.authenticate=false, -Dcom.sun.management.jmxremote.ssl=false, -Djava.rmi.server.hostname=localhost, -Dspring.liveBeansView.mbeanDomain, -Dspring.application.admin.enabled=true, -Dspring.profiles.active=rdbms,multicastIp, -Dapi.port=10010, -Xmx2g, -Xms2g, -DIGNITE_QUIET=false, -Dfile.encoding=UTF-8, -Xbootclasspath:C:\Program Files\Java\jre1.8.0_131\lib\resources.jar;C:\Program Files\Java\jre1.8.0_131\lib\rt.jar;C:\Program Files\Java\jre1.8.0_131\lib\jsse.jar;C:\Program Files\Java\jre1.8.0_131\lib\jce.jar;C:\Program Files\Java\jre1.8.0_131\lib\charsets.jar;C:\Program Files\Java\jre1.8.0_131\lib\jfr.jar;C:\Program Files\Java\jre1.8.0_131\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jre1.8.0_131\lib\ext\cldrdata.jar;C:\Program Files\Java\jre1.8.0_131\lib\ext\dnsns.jar;C:\Program Files\Java\jre1.8.0_131\lib\ext\jaccess.jar;C:\Program Files\Java\jre1.8.0_131\lib\ext\jfxrt.jar;C:\Program Files\Java\jre1.8.0_131\lib\ext\localedata.jar;C:\Program Files\Java\jre1.8.0_131\lib\ext\nashorn.jar;C:\Program Files\Java\jre1.8.0_131\lib\ext\sunec.jar;C:\Program Files\Java\jre1.8.0_131\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jre1.8.0_131\lib\ext\sunmscapi.jar;C:\Program Files\Java\jre1.8.0_131\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jre1.8.0_131\lib\ext\zipfs.jar]
2017-08-18 11:54:52.589 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : System cache's MemoryPolicy size is configured to 40 MB. Use MemoryConfiguration.systemCacheMemorySize property to change the setting.
2017-08-18 11:54:52.589 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : Configured caches [in 'sysMemPlc' memoryPolicy: ['ignite-sys-cache'], in 'default' memoryPolicy: ['myCache']]
2017-08-18 11:54:52.592 WARN 684 --- [ pub-#11%null%] o.apache.ignite.internal.GridDiagnostic : This operating system has been tested less rigorously: Windows 10 10.0 amd64. Our team will appreciate the feedback if you experience any problems running ignite in this environment.
2017-08-18 11:54:52.657 INFO 684 --- [ main] o.a.i.i.p.plugin.IgnitePluginProcessor : Configured plugins:
2017-08-18 11:54:52.657 INFO 684 --- [ main] o.a.i.i.p.plugin.IgnitePluginProcessor : ^-- None
2017-08-18 11:54:52.657 INFO 684 --- [ main] o.a.i.i.p.plugin.IgnitePluginProcessor :
2017-08-18 11:54:52.724 INFO 684 --- [ main] o.a.i.s.c.tcp.TcpCommunicationSpi : Successfully bound communication NIO server to TCP port [port=47100, locHost=0.0.0.0/0.0.0.0, selectorsCnt=4, selectorSpins=0, pairedConn=false]
2017-08-18 11:54:52.772 WARN 684 --- [ main] o.a.i.s.c.tcp.TcpCommunicationSpi : Message queue limit is set to 0 which may lead to potential OOMEs when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to message queues growth on sender and receiver sides.
2017-08-18 11:54:52.787 WARN 684 --- [ main] o.a.i.s.c.noop.NoopCheckpointSpi : Checkpoints are disabled (to enable configure any GridCheckpointSpi implementation)
2017-08-18 11:54:52.811 WARN 684 --- [ main] o.a.i.i.m.c.GridCollisionManager : Collision resolution is disabled (all jobs will be activated upon arrival).
2017-08-18 11:54:52.812 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : Security status [authentication=off, tls/ssl=off]
2017-08-18 11:54:53.087 INFO 684 --- [ main] o.a.i.i.p.odbc.SqlListenerProcessor : SQL connector processor has started on TCP port 10800
2017-08-18 11:54:53.157 INFO 684 --- [ main] o.a.i.i.p.r.p.tcp.GridTcpRestProtocol : Command protocol successfully started [name=TCP binary, host=0.0.0.0/0.0.0.0, port=11211]
2017-08-18 11:54:53.373 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : Non-loopback local IPs: 192.168.183.206, 192.168.56.1, 2001:0:9d38:6abd:30a3:1c57:3f57:4831, fe80:0:0:0:159d:5c82:b4ca:7630%eth2, fe80:0:0:0:30a3:1c57:3f57:4831%net0, fe80:0:0:0:3857:b492:48ad:1dc%eth4
2017-08-18 11:54:53.373 INFO 684 --- [ main] org.apache.ignite.internal.IgniteKernal : Enabled local MACs: 00000000000000E0, 0A0027000004, BCEE7B8B7C00
2017-08-18 11:54:53.404 INFO 684 --- [ main] o.a.i.spi.discovery.tcp.TcpDiscoverySpi : Successfully bound to TCP port [port=47500, localHost=0.0.0.0/0.0.0.0, locNodeId=7d90a0ac-b620-436f-b31c-b538a04b0919]
2017-08-18 11:54:53.409 WARN 684 --- [ main] .s.d.t.i.m.TcpDiscoveryMulticastIpFinder : TcpDiscoveryMulticastIpFinder has no pre-configured addresses (it is recommended in production to specify at least one address in TcpDiscoveryMulticastIpFinder.getAddresses() configuration property)
2017-08-18 11:54:55.068 INFO 684 --- [orker-#34%null%] o.apache.ignite.internal.exchange.time : Started exchange init [topVer=AffinityTopologyVersion [topVer=1, minorTopVer=0], crd=true, evt=10, node=TcpDiscoveryNode [id=7d90a0ac-b620-436f-b31c-b538a04b0919, addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 192.168.183.206, 192.168.56.1, 2001:0:9d38:6abd:30a3:1c57:3f57:4831], sockAddrs=[/192.168.183.206:47500, DESKTOP-MDB6VIL/192.168.56.1:47500, /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500, /2001:0:9d38:6abd:30a3:1c57:3f57:4831:47500], discPort=47500, order=1, intOrder=1, lastExchangeTime=1503024893396, loc=true, ver=2.1.0#20170721-sha1:a6ca5c8a, isClient=false], evtNode=TcpDiscoveryNode [id=7d90a0ac-b620-436f-b31c-b538a04b0919, addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 192.168.183.206, 192.168.56.1, 2001:0:9d38:6abd:30a3:1c57:3f57:4831], sockAddrs=[/192.168.183.206:47500, DESKTOP-MDB6VIL/192.168.56.1:47500, /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500, /2001:0:9d38:6abd:30a3:1c57:3f57:4831:47500], discPort=47500, order=1, intOrder=1, lastExchangeTime=1503024893396, loc=true, ver=2.1.0#20170721-sha1:a6ca5c8a, isClient=false], customEvt=null]
2017-08-18 11:54:55.302 INFO 684 --- [orker-#34%null%] o.a.i.i.p.cache.GridCacheProcessor : Started cache [name=ignite-sys-cache, memoryPolicyName=sysMemPlc, mode=REPLICATED, atomicity=TRANSACTIONAL]
2017-08-18 11:55:15.066 WARN 684 --- [ main] .i.p.c.GridCachePartitionExchangeManager : Failed to wait for initial partition map exchange. Possible reasons are:
^-- Transactions in deadlock.
^-- Long running transactions (ignore if this is the case).
^-- Unreleased explicit locks.
2017-08-18 11:55:35.070 WARN 684 --- [ main] .i.p.c.GridCachePartitionExchangeManager : Still waiting for initial partition map exchange [fut=GridDhtPartitionsExchangeFuture [dummy=false, forcePreload=false, reassign=false, discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode [id=7d90a0ac-b620-436f-b31c-b538a04b0919, addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 192.168.183.206, 192.168.56.1, 2001:0:9d38:6abd:30a3:1c57:3f57:4831], sockAddrs=[/192.168.183.206:47500, DESKTOP-MDB6VIL/192.168.56.1:47500, /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500, /2001:0:9d38:6abd:30a3:1c57:3f57:4831:47500], discPort=47500, order=1, intOrder=1, lastExchangeTime=1503024893396, loc=true, ver=2.1.0#20170721-sha1:a6ca5c8a, isClient=false], topVer=1, nodeId8=7d90a0ac, msg=null, type=NODE_JOINED, tstamp=1503024895045], crd=TcpDiscoveryNode [id=7d90a0ac-b620-436f-b31c-b538a04b0919, addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 192.168.183.206, 192.168.56.1, 2001:0:9d38:6abd:30a3:1c57:3f57:4831], sockAddrs=[/192.168.183.206:47500, DESKTOP-MDB6VIL/192.168.56.1:47500, /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500, /2001:0:9d38:6abd:30a3:1c57:3f57:4831:47500], discPort=47500, order=1, intOrder=1, lastExchangeTime=1503024893396, loc=true, ver=2.1.0#20170721-sha1:a6ca5c8a, isClient=false], exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=1, minorTopVer=0], nodeId=7d90a0ac, evt=NODE_JOINED], added=true, initFut=GridFutureAdapter [ignoreInterrupts=false, state=INIT, res=null, hash=1821989981], init=false, lastVer=null, partReleaseFut=null, exchActions=null, affChangeMsg=null, skipPreload=false, clientOnlyExchange=false, initTs=1503024895057, centralizedAff=false, changeGlobalStateE=null, forcedRebFut=null, done=false, evtLatch=0, remaining=[], super=GridFutureAdapter [ignoreInterrupts=false, state=INIT, res=null, hash=733156437]]]
I debug my code, I guess IgniteSpring cannot inject SpringResource
#SpringResource(resourceClass = RdbmsCachePersistenceRepository.class)
private RdbmsCachePersistenceRepository repository;
#SpringResource(resourceClass = RdbmsCachePersistenceRepository.class)
private CacheObjectFactory cacheObjectFactory;
repository, cacheObjectFactory is same instance like below code
public interface RdbmsCachePersistenceRepository extends
JpaRepository<RdbmsCachePersistence, Long>,
CachePersistenceRepository<RdbmsCachePersistence>,
CacheObjectFactory {
#Override
default CachePersistence createCacheObject(long key, Object value, int partition) {
return new RdbmsCachePersistence(key, value, partition);
}
}
And RdbmsCachePersistenceRepository implemented by spring data jpa
when I debug code line by line, IgniteContext cannot bring RdbmsCachePersistenceRepository
I don't know why it is
I resolve this problem, but I don't know why it is resolved.
I added this dummy code before IgniteSpring.start.
springApplicationCtx.getBean(RdbmsCachePersistenceRepository.class);
I think the spring resource bean not initialized when the ignite context get the bean.

ISPN000188: Error while processing a commit in a two-phase transaction: org.infinispan.marshall.NotSerializableException

I getting following error in my server.log after deployed my application in JBoss and while trying to login this error occurs....
Basically JBoss says two-phase commit fails while inifinispan tries to marshal the object.... it raises the exceptionNotSerializableException...
Consequently, JBoss-Infinispan says DummyTransaction.java:287 ISPN000111: afterCompletion() failed for SynchronizationAdapter
13:28:38,186 ERROR [org.infinispan.transaction.TransactionCoordinator] (http-/192.nnn.nnn.nn:8080-3) ISPN000188: Error while processing a commit in a two-phase transaction: org.infinispan.marshall.NotSerializableException: com.singtel.um.transaction.TransactionManager
Caused by: an exception which occurred:
in field transactionManager
in object java.util.HashMap#f1852ac6
in object org.jboss.as.clustering.SimpleMarshalledValue#f1852ac6
-> toString = {User=com.singtel.um.dto.UserDto#4c08e73b, Userid=1, Username=sysadmin, org.apache.struts.action.LOCALE=en_US, Response=com.singtel.um.dto.ResponsePageDto#72c5cec1, userManager=com.singtel.um.UserManager#418634d5}
in object org.infinispan.util.FastCopyHashMap#373deff8
-> toString = {0=11, 1=1444195716345, 2=org.jboss.as.clustering.web.DistributableSessionMetadata#40843124, 3={User=com.singtel.um.dto.UserDto#4c08e73b, Userid=1, Username=sysadmin, org.apache.struts.action.LOCALE=en_US, Response=com.singtel.um.dto.ResponsePageDto#72c5cec1, userManager=com.singtel.um.UserManager#418634d5}}
in object org.infinispan.atomic.AtomicHashMap#3345fa74
-> toString = AtomicHashMap
in object org.infinispan.container.entries.ImmortalCacheEntry#cca5812b
-> toString = ImmortalCacheEntry{key=ZVx0ehVWVUvmITSBGMT9pQmB, value=ImmortalCacheValue {value=AtomicHashMap}}
in object org.infinispan.loaders.bucket.Bucket#18891bc5
-> toString = Bucket{entries={ZVx0ehVWVUvmITSBGMT9pQmB=ImmortalCacheEntry{key=ZVx0ehVWVUvmITSBGMT9pQmB, value=ImmortalCacheValue {value=AtomicHashMap}}}, bucketId='1607025664'}
13:28:38,210 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) ERROR [http-/192.nnn.nnn.nn:8080-3] (TransactionCoordinator.java:213) - ISPN000188: Error while processing a commit in a two-phase transaction
13:28:38,213 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) org.infinispan.marshall.NotSerializableException: com.singtel.um.transaction.TransactionManager
13:28:38,216 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) Caused by: an exception which occurred:
13:28:38,218 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) in field transactionManager
13:28:38,219 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) in object java.util.HashMap#f1852ac6
13:28:38,221 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) in object org.jboss.as.clustering.SimpleMarshalledValue#f1852ac6
13:28:38,224 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) -> toString = {User=com.singtel.um.dto.UserDto#4c08e73b, Userid=1, Username=sysadmin, org.apache.struts.action.LOCALE=en_US, Response=com.singtel.um.dto.ResponsePageDto#72c5cec1, userManager=com.singtel.um.UserManager#418634d5}
13:28:38,228 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) in object org.infinispan.util.FastCopyHashMap#373deff8
13:28:38,231 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) -> toString = {0=11, 1=1444195716345, 2=org.jboss.as.clustering.web.DistributableSessionMetadata#40843124, 3={User=com.singtel.um.dto.UserDto#4c08e73b, Userid=1, Username=sysadmin, org.apache.struts.action.LOCALE=en_US, Response=com.singtel.um.dto.ResponsePageDto#72c5cec1, userManager=com.singtel.um.UserManager#418634d5}}
13:28:38,237 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) in object org.infinispan.atomic.AtomicHashMap#3345fa74
13:28:38,239 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) -> toString = AtomicHashMap
13:28:38,241 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) in object org.infinispan.container.entries.ImmortalCacheEntry#cca5812b
13:28:38,243 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) -> toString = ImmortalCacheEntry{key=ZVx0ehVWVUvmITSBGMT9pQmB, value=ImmortalCacheValue {value=AtomicHashMap}}
13:28:38,246 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) in object org.infinispan.loaders.bucket.Bucket#18891bc5
13:28:38,249 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) -> toString = Bucket{entries={ZVx0ehVWVUvmITSBGMT9pQmB=ImmortalCacheEntry{key=ZVx0ehVWVUvmITSBGMT9pQmB, value=ImmortalCacheValue {value=AtomicHashMap}}}, bucketId='1607025664'}
13:28:38,253 ERROR [org.infinispan.transaction.tm.DummyTransaction] (http-/192.nnn.nnn.nn:8080-3) ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, lockedKeys=null, backupKeyLocks=null, topologyId=-1, isFromStateTransfer=false} org.infinispan.transaction.synchronization.SyncLocalTransaction#42} org.infinispan.transaction.synchronization.SynchronizationAdapter#61: org.infinispan.CacheException: Could not commit.
at org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:83)
at org.infinispan.transaction.tm.DummyTransaction.notifyAfterCompletion(DummyTransaction.java:285)
at org.infinispan.transaction.tm.DummyTransaction.runCommitTx(DummyTransaction.java:334)
at org.infinispan.transaction.tm.DummyTransaction.commit(DummyTransaction.java:91)
at org.infinispan.transaction.tm.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:102)
at org.jboss.as.clustering.web.impl.TransactionBatchingManager.endBatch(TransactionBatchingManager.java:75)
at org.jboss.as.web.session.DistributableSessionManager.processSessionRepl(DistributableSessionManager.java:1574) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.session.DistributableSessionManager.storeSession(DistributableSessionManager.java:872) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:47) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:142) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:99) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.session.JvmRouteValve.invoke(JvmRouteValve.java:92) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.session.LockingValve.invoke(LockingValve.java:64) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
Caused by: javax.transaction.xa.XAException
at org.infinispan.transaction.TransactionCoordinator.handleCommitFailure(TransactionCoordinator.java:224)
at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:185)
at org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:81)
... 21 more
13:28:38,308 INFO [stdout] (http-/192.nnn.nnn.nn192.nnn.nnn.nn:8080-3) ERROR [http-/192.nnn.nnn.nn:8080-3] (DummyTransaction.java:287) - ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, lockedKeys=null, backupKeyLocks=null, topologyId=-1, isFromStateTransfer=false} org.infinispan.transaction.synchronization.SyncLocalTransaction#42} org.infinispan.transaction.synchronization.SynchronizationAdapter#61
13:28:38,317 INFO [stdout] (http-/192.nnn.nnn.nn:8080-3) org.infinispan.CacheException: Could not commit.
Please someone help me to solve this problem.
One of your classes (not sure what's the name but it holds com.singtel.um.dto.ResponsePageDto, com.singtel.um.dto.UserDto, and com.singtel.um.UserManager) seems to have a field transactionManager, and your TM implementation is not serializable. You should make that field transient.
Not sure why the HashMap is in the stack, though, unless something is instrumenting Java classes.
Ideally, you should also use Externalizable or AdvancedExternalizer to optimize serialization of your objects. See Infinispan User Guide