Hi, I have override the AjpProtocol to inject ssl communication by providing SSLImplementation which is working well with the http connections(PocHttp11Protocol) for the same SSLImplementation. But some reason ajp connections are failing.
1) All the connections to the AJP-BIO is hanging on method (at java.net.DualStackPlainSocketImpl.accept0(Native Method)). Could you please give me any clue what I am doing wrong? 2) AJP SSL communication also failing. When I generate the ssl logs at server side, I could see the below error. SSL error from server end:- ajp-bio-xx.x.xx.xx-50000-exec-1, RECV TLSv1.2 ALERT: fatal, bad_record_mac %% Invalidated: [Session-17, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384] ajp-bio- xx.x.xx.xx -50000-exec-1, called closeSocket() ajp-bio- xx.x.xx.xx -50000-exec-1, handling exception: javax.net.ssl.SSLException: Received fatal alert: bad_record_mac ajp-bio- xx.x.xx.xx -50000-exec-1, called close() ajp-bio- xx.x.xx.xx -50000-exec-1, called closeInternal(true) Could you please give me any clue? The same SSLImplementation was working well in tomcat6.0.x version. 3) Here my ajp maxThreads defined as 150 but I could see only below 3 threads. <Connector port="50000" maxThreads="150" tomcatAuthentication="false" address="XX.X.XX.XX" enableLookups="false" protocol=" com.trianz.poc.tomcat8..PocAjpProtocol" /> Am I missing any attributes in tomcat8? ----------------------Thread dump--------------------------------------------------------------------- "ajp-bio- XX.X.XX.XX -50000-Acceptor-0" #38 daemon prio=5 os_prio=0 tid=0x000000005a7cb800 nid=0x11f4 runnable [0x000000005cf3e000] java.lang.Thread.State: RUNNABLE at java.net.DualStackPlainSocketImpl.accept0(Native Method) at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:131) at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199) - locked <0x00000000f616cd38> (a java.net.SocksSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:545) at sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:348) at com.trianz.poc.tomcat8..JsseSslSocketFactory.acceptSocket(JsseSslSocketFactory.java:134) at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:183) at java.lang.Thread.run(Thread.java:745) Locked ownable synchronizers: - None ajp-bio- XX.X.XX.XX-50000-exec-1" #78 daemon prio=5 os_prio=0 tid=0x0000000057c5d000 nid=0xec0 waiting on condition [0x000000005b91e000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000f7bef228> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:103) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:31) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) "ajp-bio- XX.X.XX.XX-50000-AsyncTimeout" #39 daemon prio=5 os_prio=0 tid=0x000000005a7cc800 nid=0xda0 waiting on condition [0x000000005d09e000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at org.apache.tomcat.util.net.AbstractEndpoint$AsyncTimeout.run(AbstractEndpoint.java:128) at java.lang.Thread.run(Thread.java:745) Locked ownable synchronizers: - None Many thanks in advance