You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Context of the application
There is an initial server that communicates HL7 messages to another server (SHL7), this second server is in charge of communicating the HL7 messages to a web application. Due to the type of communication that HAPI manages, we choose to create an intermediate application (SHL7) whose only task is to receive the messages in a specific IP and port and transform them to an HTTP call (POST) that the web application understands.
Due to the architecture designed to transform the messages, some errors are generated that the SHL7 server must manage. The most common errors are that the HTTP call does not work correctly (Ex: response 500). Here's how these errors are handled:
Message ack;
try {
if(response != null && response.getStatusLine().getStatusCode() == 204) {
ack = theMessage.generateACK();
log.info("CORRECTO: " + ack.toString());
} else {
ack = theMessage.generateACK(AcknowledgmentCode.AE, new HL7Exception("There was a problem in the target server!!"));
log.info("ERROR: " + ack.toString());
}
} catch (IOException e) {
throw new ReceivingApplicationException(e);
}
return ack;
*Problem
The problem is that when the SHL7 server has two communications with AcknowledgmentCode.AE or that the transformation code throws an exception (ReceivingApplicationException, Exception, etc), the SHL7 server no longer manages the other communications, it accepts them in the connection queue , but it no longer executes the message transformation code (own class Ex: RadiologiaReceiverApplication). The only solution now is to restart the SHL7 server but I don't like.
The following log is when the new requests arrive to the server and it does not execute the message transformation code:
2017-12-28 12:34:20.388 INFO 1 --- [hapi-worker-1] ca.uhn.hl7v2.app.SimpleServer : Accepted connection from 167.69.0.110:59237 on local port 4556
2017-12-28 12:34:20.389 INFO 1 --- [hapi-worker-1] u.h.c.RadiologiaConnectionListener : New connection received: /167.69.0.110
2017-12-28 12:34:30.449 INFO 1 --- [hapi-worker-21] ca.uhn.hl7v2.llp.MllpDecoderState : End of input stream reached.
2017-12-28 12:34:30.449 INFO 1 --- [hapi-worker-21] ca.uhn.hl7v2.llp.MllpDecoderState : SocketException on read() attempt. Socket appears to have been closed: End of input stream reached before message starts
2017-12-28 12:34:30.449 INFO 1 --- [hapi-worker-21] ca.uhn.hl7v2.app.Receiver : SocketException: closing Connection from 167.69.0.110:59237, will no longer read messages with this Receiver: End of input stream reached before message starts
2017-12-28 12:34:30.896 INFO 1 --- [hapi-worker-2] u.h.c.RadiologiaConnectionListener : Lost connection from: /167.69.0.110
2017-12-28 12:35:30.860 INFO 1 --- [hapi-worker-1] ca.uhn.hl7v2.app.SimpleServer : Accepted connection from 167.69.0.110:52502 on local port 4556
2017-12-28 12:35:30.860 INFO 1 --- [hapi-worker-1] u.h.c.RadiologiaConnectionListener : New connection received: /167.69.0.110
2017-12-28 12:35:40.920 INFO 1 --- [hapi-worker-23] ca.uhn.hl7v2.llp.MllpDecoderState : End of input stream reached.
2017-12-28 12:35:40.922 INFO 1 --- [hapi-worker-23] ca.uhn.hl7v2.llp.MllpDecoderState : SocketException on read() attempt. Socket appears to have been closed: End of input stream reached before message starts
2017-12-28 12:35:40.923 INFO 1 --- [hapi-worker-23] ca.uhn.hl7v2.app.Receiver : SocketException: closing Connection from 167.69.0.110:52502, will no longer read messages with this Receiver: End of input stream reached before message starts
2017-12-28 12:35:41.410 INFO 1 --- [hapi-worker-2] u.h.c.RadiologiaConnectionListener : Lost connection from: /167.69.0.110
I do not know if the problem is that the communication socket of the previous connections has not been closed correctly or another problem ... However, I do not know exactly how the HL7Service class manages the connections.
The text was updated successfully, but these errors were encountered:
*Context of the application
There is an initial server that communicates HL7 messages to another server (SHL7), this second server is in charge of communicating the HL7 messages to a web application. Due to the type of communication that HAPI manages, we choose to create an intermediate application (SHL7) whose only task is to receive the messages in a specific IP and port and transform them to an HTTP call (POST) that the web application understands.
Due to the architecture designed to transform the messages, some errors are generated that the SHL7 server must manage. The most common errors are that the HTTP call does not work correctly (Ex: response 500). Here's how these errors are handled:
*Problem
The problem is that when the SHL7 server has two communications with AcknowledgmentCode.AE or that the transformation code throws an exception (ReceivingApplicationException, Exception, etc), the SHL7 server no longer manages the other communications, it accepts them in the connection queue , but it no longer executes the message transformation code (own class Ex: RadiologiaReceiverApplication). The only solution now is to restart the SHL7 server but I don't like.
The following log is when the new requests arrive to the server and it does not execute the message transformation code:
I do not know if the problem is that the communication socket of the previous connections has not been closed correctly or another problem ... However, I do not know exactly how the HL7Service class manages the connections.
The text was updated successfully, but these errors were encountered: