Ah ha, adding
System.setProperty("org.slf4j.simplelogger.log.ca.uhn.hl7v2.app.Receiver","error");
to our server impl. seems to do the trick.
Tom
On 17/11/2020 11:56, Tom Chiverton wrote:
Hi,
We've got a HL7 receiving application using HAPI, and all works well
except when our system health checking system connects, it is causing
spam to the log file.
I was hoping that registering a hander with
'server.setExceptionHandler(...)' would stop this, but I think the
reason it's not working is because the error is occurring earlier than
in our own ReceivingApplication implementation ?
Should I be looking at the slf4j log configuration ? Or sub-class
ca.uhn.hl7v2.app.Receiver / ca.uhn.hl7v2.concurrent.Service ? Or is
there some setting I can change in the Context ?
An example stack trace we'd like to suppress is below, after the line
from ca.uhn.hl7v2.app.Receiver. "New connection received" is from our
Server class's server.registerConnectionListener(...)
448905 [hapi-worker-1] INFO ca.uhn.hl7v2.app.SimpleServer - Accepted
connection from 192.168.4.250:23446 on local port 9007
New connection received: /192.168.4.250
448906 [hapi-worker-5] WARN ca.uhn.hl7v2.app.Receiver - IOException:
closing Connection from 192.168.4.250:23446, will no longer read
messages with this Receiver.
javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
at
java.base/sun.security.ssl.SSLSocketImpl.handleEOF(SSLSocketImpl.java:1588)
at
java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1416)
at
java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1314)
at
java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:440)
at
java.base/sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:819)
at
java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:910)
at
java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
at
java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:271)
at
ca.uhn.hl7v2.llp.MllpDecoderState.read(MllpDecoderState.java:128)
at ca.uhn.hl7v2.llp.MllpDecoder.getMessage(MllpDecoder.java:63)
at
ca.uhn.hl7v2.llp.Hl7DecoderReader.getMessage(Hl7DecoderReader.java:84)
at ca.uhn.hl7v2.llp.MinLLPReader.getMessage(MinLLPReader.java:33)
at ca.uhn.hl7v2.app.Receiver.handle(Receiver.java:63)
at ca.uhn.hl7v2.concurrent.Service.run(Service.java:205)
at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at
java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:481)
at
java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:470)
at
java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:160)
at
java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:110)
at
java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1408)
... 17 more
Lost connection from: /192.168.4.250
Tom
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel