Menu

#9 One hour after the socket received the last message, the socketReader always encountered an exception

socketReader 1.x
open-accepted
None
1
2014-07-08
2014-07-02
No

Hello

I have problems with the socketreader, one hour after the socket received the last message, the socketReader always encountered an exception.

The last message was received at 11:35:16
The socketreader encontered an error and exception at 12:35:16

This is the sockReader.log

2014-07-02 11:34:07,322 - Main - CRITICAL - socketReader 1.2.4 is starting up.
2014-07-02 11:34:07,322 - Main - CRITICAL - Python Interpreter: CPython 2.7.5 64bit
2014-07-02 11:34:07,322 - Main - CRITICAL - Host System: Linux srvtest 3.10.17 #2 SMP Wed Oct 23 16:34:38 CDT 2013 x86_64 Pentium(R) Dual-Core CPU E5700 @ 3.00GHz
2014-07-02 11:34:07,322 - Main - CRITICAL - Command: ./socketReader64
2014-07-02 11:34:07,323 - SocketClient_file-to-socket_Thread-2 - INFO - Thread spawned.
2014-07-02 11:34:07,323 - FileWriter_socket-to-file_Thread-3 - INFO - Thread spawned.
2014-07-02 11:34:07,323 - SocketServer_socket-to-file_Thread-4 - DEBUG - Trying to create a socket on IF 192.168.0.11 at port 1050
2014-07-02 11:34:07,323 - SocketServer_socket-to-file_Thread-4 - CRITICAL - Established a socket on IF 192.168.0.11 at port 1050
2014-07-02 11:34:07,324 - SocketServer_socket-to-file_Thread-4 - INFO - Thread spawned.
2014-07-02 11:34:07,324 - FileReader_file-to-socket_Thread-5 - INFO - Thread spawned.
2014-07-02 11:34:07,324 - Main - INFO - Starting thread: SocketClient_file-to-socket_Thread-2
2014-07-02 11:34:07,324 - SocketClient_file-to-socket_Thread-2 - DEBUG - Trying to connect to 192.168.1.16 at port 1060
2014-07-02 11:34:07,324 - Main - INFO - Starting thread: FileWriter_socket-to-file_Thread-3
2014-07-02 11:34:07,325 - Main - INFO - Starting thread: SocketServer_socket-to-file_Thread-4
2014-07-02 11:34:07,325 - Main - INFO - Starting thread: FileReader_file-to-socket_Thread-5
2014-07-02 11:34:07,325 - SocketClient_file-to-socket_Thread-2 - CRITICAL - Connected to 192.168.1.16 at port 1060
2014-07-02 11:34:07,325 - Main - CRITICAL - All threads have been successfully started.
2014-07-02 11:34:07,326 - Hl7Transmitter_file-to-socket_Thread-6 - INFO - Thread spawned.
2014-07-02 11:34:07,326 - SocketClient_file-to-socket_Thread-2 - INFO - Starting thread: Hl7Transmitter_file-to-socket_Thread-6
2014-07-02 11:34:07,326 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
2014-07-02 11:34:16,149 - SocketServer_socket-to-file_Thread-4 - CRITICAL - Accepted client connection: 192.168.1.16 from port 40111
2014-07-02 11:34:16,149 - Hl7Receiver_socket-to-file_Thread-7 - INFO - Thread spawned.
2014-07-02 11:34:16,149 - SocketServer_socket-to-file_Thread-4 - INFO - Starting thread: Hl7Receiver_socket-to-file_Thread-7
2014-07-02 11:35:07,372 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
2014-07-02 11:35:16,208 - Hl7Receiver_socket-to-file_Thread-7 - INFO - Message 1 received.
2014-07-02 11:35:16,208 - Hl7Receiver_socket-to-file_Thread-7 - DEBUG - MSH|^~\&|ALERT|20011|EXT_SYS_RECETA|20011|20140616161413||RDE^O11^RDE_O11|8bb1493ed0304339b879|P|2.5|||AL|NE
PID|1||31811020020011^^^ADT^PN~SIN CURP^^^xxxx^NI||xxxxx^PRUEBA 2||19920819|F|
PV1|1|O|3024^200110000049^^20011||||||||||||||||2932714^^^7020000104002^ADT^20011|||||||||||||||||||||||||20140616160958|
ORC|NW|5711638^ALERT||41092^ALERT|||||20140616161413|||7020000104002^Prueba^Erich|
RXE|1^&^7^20140616^20140623^^1 Tableta(s) - 2ª copia: 0 - Vx­a: ORAL - Cada 6 horas - Inicio: 16:13h 16-Jun-2014 - 16:13h 23-Jun-2014 - 29 Realizaciones - Cantidad a suministrar: 1 Tableta(s)|1706^ACIDO FOLICO TABLETA 5 MG^MX_INT 00000000160|2||Tableta(s)|ORAL||||29|
RXR|MX_INT 1^ORAL^1|
2014-07-02 11:35:16,208 - Hl7Receiver_socket-to-file_Thread-7 - INFO - Message 1 added to input queue "outgoing_file". Queue size: 1
2014-07-02 11:35:16,209 - FileWriter_socket-to-file_Thread-3 - INFO - Message 1 fetched from output queue. Queue size: 0
2014-07-02 11:35:16,209 - Hl7Receiver_socket-to-file_Thread-7 - INFO - HL7-ACK for message 1 sent.
2014-07-02 11:35:16,210 - Hl7Receiver_socket-to-file_Thread-7 - DEBUG - MSH|^~\&|EXT_SYS_RECETA|20011|ALERT|20011|20140702113516||ACK^O11|1|P|2.5|
MSA|AA|8bb1493ed0304339b879|Message successfully received.|
2014-07-02 11:35:16,211 - FileWriter_socket-to-file_Thread-3 - INFO - Message 1 written to file: /usr/local/socketreader/fileout/ALERT_20011_EXT_SYS_RECETA_20011_RDE_20140702113516_00000.hl7
2014-07-02 11:35:16,211 - FileWriter_socket-to-file_Thread-3 - DEBUG - MSH|^~\&|ALERT|20011|EXT_SYS_RECETA|20011|20140616161413||RDE^O11^RDE_O11|8bb1493ed0304339b879|P|2.5|||AL|NE
PID|1||31811020020011^^^ADT^PN~SIN CURP^^^SEGOB^NI||xxxxx^PRUEBA 2||19920819|F|
PV1|1|O|3024^200110000049^^20011||||||||||||||||2932714^^^7020000104002^ADT^20011|||||||||||||||||||||||||20140616160958|
ORC|NW|5711638^ALERT||41092^ALERT|||||20140616161413|||7020000104002^Prueba^xxxxx|
RXE|1^&^7^20140616^20140623^^1 Tableta(s) - 2ª copia: 0 - Vx­a: ORAL - Cada 6 horas - Inicio: 16:13h 16-Jun-2014 - 16:13h 23-Jun-2014 - 29 Realizaciones - Cantidad a suministrar: 1 Tableta(s)|1706^ACIDO FOLICO TABLETA 5 MG^MX_INT 00000000160|2||Tableta(s)|ORAL||||29|
RXR|MX_INT 1^ORAL^1|
2014-07-02 11:36:07,414 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
2014-07-02 12:35:10,030 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
2014-07-02 12:35:16,732 - SocketOps - ERROR - The socket we tried to receive from is currently down.
2014-07-02 12:35:16,732 - SocketOps - ERROR - The socket we tried to receive from is currently down.
2014-07-02 12:35:16,732 - SocketOps - ERROR - socketReader encountered an exception:
Traceback (most recent call last):
File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/Common.socketWrapper", line 73, in shutdown
File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/socket", line 224, in meth
error: [Errno 107] Transport endpoint is not connected
2014-07-02 12:35:16,732 - SocketOps - ERROR - socketReader encountered an exception:
Traceback (most recent call last):
File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/Common.socketWrapper", line 73, in shutdown
File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/socket", line 224, in meth
error: [Errno 107] Transport endpoint is not connected
2014-07-02 12:35:16,732 - Hl7Receiver_socket-to-file_Thread-7 - ERROR - socketReader encountered a socket exception:
Traceback (most recent call last):
File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/Common.workerThreads", line 747, in threadStop
File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/Common.socketWrapper", line 73, in shutdown
File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/socket", line 224, in meth
error: [Errno 107] Transport endpoint is not connected
2014-07-02 12:35:16,733 - Hl7Receiver_socket-to-file_Thread-7 - INFO - Thread stopped.
2014-07-02 12:36:10,069 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
2014-07-02 12:37:10,119 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
2014-07-02 12:38:10,169 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
2014-07-02 12:39:10,214 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.

This is the stdout.log

SocketReader 1.2.4 - an open source project in Python. License: GPLv3.0
Copyright 2010 until today: Sebastian Weigmann
SourceForge URL: http://sourceforge.net/projects/hl7socketreader/
Python Interpreter: CPython 2.7.5 64bit
Host System: Linux srvtest 3.10.17 #2 SMP Wed Oct 23 16:34:38 CDT 2013 x86_64 Pentium(R) Dual-Core CPU E5700 @ 3.00GHz

This project uses python-hl7 by John Paulett. More info is available at:
http://johnpaulett.com/2009/01/10/parsing-hl7-with-python/

Creating thread... SocketClient_file-to-socket_Thread-2 spawned
Creating thread... FileWriter_socket-to-file_Thread-3 spawned
Creating thread... SocketServer_socket-to-file_Thread-4 spawned
SocketServer_socket-to-file_Thread-4: Established a socket on IF 192.168.0.11 at Port 1050
Creating thread... FileReader_file-to-socket_Thread-5 spawned
Starting thread: SocketClient_file-to-socket_Thread-2
SocketClient_file-to-socket_Thread-2: Trying to connect to 192.168.1.16 at Port 1060
Starting thread: FileWriter_socket-to-file_Thread-3
Starting thread: SocketServer_socket-to-file_Thread-4
Starting thread: FileReader_file-to-socket_Thread-5
SocketClient_file-to-socket_Thread-2: Connected to 192.168.1.16 at Port 1060
SocketClient_file-to-socket_Thread-2: Creating thread... All command threads have been successfully started.
Hl7Transmitter_file-to-socket_Thread-6 spawned
SocketClient_file-to-socket_Thread-2: Starting thread: Hl7Transmitter_file-to-socket_Thread-6
SocketServer_socket-to-file_Thread-4: Accepted client from IP: 192.168.1.16 and port: 40111
SocketServer_socket-to-file_Thread-4: Creating thread... Hl7Receiver_socket-to-file_Thread-7 spawned
SocketServer_socket-to-file_Thread-4: Starting thread: Hl7Receiver_socket-to-file_Thread-7
Hl7Receiver_socket-to-file_Thread-7 will be stopped... Hl7Receiver_socket-to-file_Thread-7: The socket has probably been closed already
Done.

Environment:

Distro: Slackware 14.1
Linux srvtest 3.10.17 #2 SMP Wed Oct 23 16:34:38 CDT 2013 x86_64 Pentium(R) Dual-Core CPU E5700 @ 3.00GHz GenuineIntel GNU/Linux
Python 2.7.5
socketReader_linux_1.2.4

Config File

[general]
logfile = /usr/local/socketreader/socketReader.log
loglvl = debug
useconnections = incoming_socket, outgoing_socket, incoming_file, outgoing_file

[incoming_socket]
queuename = socket-to-file
transtech = socket
transdir = in
usehl7 = True
useack = True
createserversocket = True
ipaddr = 192.168.0.11
port = 1050

[outgoing_file]
queuename = socket-to-file
transtech = file
transdir = out
usehl7 = True
messagedir = /usr/local/socketreader/fileout/
prefix = ""
hl7prefix = True
suffix = .hl7
newline = False

[incoming_file]
queuename = file-to-socket
transtech = file
transdir = in
usehl7 = False
messagedir = /usr/local/socketreader/filein/
filemask = *.dat
cycletime = 60
maxfiles = 5
newline = False

[outgoing_socket]
queuename = file-to-socket
transtech = socket
transdir = out
usehl7 = True
useack = True
queuedb = /usr/local/socketreader/output.queuedb
createserversocket = False
ipaddr = 192.168.1.16
port = 1060

Start Socket command line

nohup ./socketReader64 >> ./stdout.log &

Please help me.

With Best Regards

Luis Eduardo

Discussion

  • Sebastian Weigmann

    Hi Luis,

    thanks for our report and sorry for the delayed answer. Holidays... :)

    I have looked at your logs and the source code and come up with this assumption. The client at 192.168.1.16 which connected to socketReader might have closed its end of the socket connection exactly one hour after sending the last message to socketReader. socketReader checks all sockets periodically if they are still up. If a socket is found to have been closed on the remote end, an error is thrown and the worker thread closed.

    However, socketReader keeps the server socket open so your client at 192.168.1.16 might just connect again once it has another message to deliver.

    Please verify that this succeeds.

    If the connection can be re-established, the error is thrown erronously by socketReader and should be turned into a warning instead.

    Best regards,
    -- Sebastian

     
  • Sebastian Weigmann

    • status: unread --> open-accepted
    • assigned_to: Sebastian Weigmann
     
  • Luis Eduardo

    Luis Eduardo - 2014-07-08

    Hello Sebastian.

    The client 192.168.1.16 have SocketReader too.

    After the socket exception, the client 192.168.1.16 can´t send another message.

    I tried to send another message after read your post. But 192.168.1.16 not send the message

    This is the socketReader.log from 192.168.1.16

    2014-07-07 14:51:41,658 - Main - CRITICAL - socketReader 1.2.4 is starting up.
    2014-07-07 14:51:41,660 - Main - CRITICAL - Python Interpreter: CPython 2.7.5 64bit
    2014-07-07 14:51:41,661 - Main - CRITICAL - Host System: Linux servertest 2.6.29.6 #2 SMP Mon Aug 17 11:58:18 CDT 2009 x86_64 Intel(R) Pentium(R) Dual CPU E2140 @ 1.60GHz
    2014-07-07 14:51:41,661 - Main - CRITICAL - Command: ./socketReader64
    2014-07-07 14:51:41,661 - SocketClient_file-to-socket_Thread-2 - INFO - Thread spawned.
    2014-07-07 14:51:41,662 - FileWriter_socket-to-file_Thread-3 - INFO - Thread spawned.
    2014-07-07 14:51:41,663 - SocketServer_socket-to-file_Thread-4 - DEBUG - Trying to create a socket on IF 192.168.1.16 at port 1060
    2014-07-07 14:51:41,663 - SocketServer_socket-to-file_Thread-4 - CRITICAL - Established a socket on IF 192.168.1.16 at port 1060
    2014-07-07 14:51:41,663 - SocketServer_socket-to-file_Thread-4 - INFO - Thread spawned.
    2014-07-07 14:51:41,664 - FileReader_file-to-socket_Thread-5 - INFO - Thread spawned.
    2014-07-07 14:51:41,664 - Main - INFO - Starting thread: SocketClient_file-to-socket_Thread-2
    2014-07-07 14:51:41,665 - SocketClient_file-to-socket_Thread-2 - DEBUG - Trying to connect to 192.168.0.11 at port 1050
    2014-07-07 14:51:41,665 - Main - INFO - Starting thread: FileWriter_socket-to-file_Thread-3
    2014-07-07 14:51:41,666 - Main - INFO - Starting thread: SocketServer_socket-to-file_Thread-4
    2014-07-07 14:51:41,666 - ClientSocket_Thread-2 - ERROR - Error code 111: Connection refused
    2014-07-07 14:51:41,667 - SocketClient_file-to-socket_Thread-2 - DEBUG - Could not connect to server! Trying again in 10 seconds...
    2014-07-07 14:51:41,667 - Main - INFO - Starting thread: FileReader_file-to-socket_Thread-5
    2014-07-07 14:51:41,668 - Main - CRITICAL - All threads have been successfully started.
    2014-07-07 14:51:41,680 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 14:51:51,678 - SocketClient_file-to-socket_Thread-2 - DEBUG - Trying to connect to 192.168.0.11 at port 1050
    2014-07-07 14:51:51,679 - ClientSocket_Thread-2 - ERROR - Error code 111: Connection refused
    2014-07-07 14:51:51,679 - SocketClient_file-to-socket_Thread-2 - DEBUG - Could not connect to server! Trying again in 10 seconds...
    2014-07-07 14:52:01,690 - SocketClient_file-to-socket_Thread-2 - DEBUG - Trying to connect to 192.168.0.11 at port 1050
    2014-07-07 14:52:01,690 - ClientSocket_Thread-2 - ERROR - Error code 111: Connection refused
    2014-07-07 14:52:01,691 - SocketClient_file-to-socket_Thread-2 - DEBUG - Could not connect to server! Trying again in 10 seconds...
    2014-07-07 14:52:11,701 - SocketClient_file-to-socket_Thread-2 - DEBUG - Trying to connect to 192.168.0.11 at port 1050
    2014-07-07 14:52:11,702 - ClientSocket_Thread-2 - ERROR - Error code 111: Connection refused
    2014-07-07 14:52:11,702 - SocketClient_file-to-socket_Thread-2 - DEBUG - Could not connect to server! Trying again in 10 seconds...
    2014-07-07 14:52:21,714 - SocketClient_file-to-socket_Thread-2 - DEBUG - Trying to connect to 192.168.0.11 at port 1050
    2014-07-07 14:52:21,715 - ClientSocket_Thread-2 - ERROR - Error code 111: Connection refused
    2014-07-07 14:52:21,715 - SocketClient_file-to-socket_Thread-2 - DEBUG - Could not connect to server! Trying again in 10 seconds...
    2014-07-07 14:52:31,726 - SocketClient_file-to-socket_Thread-2 - DEBUG - Trying to connect to 192.168.0.11 at port 1050
    2014-07-07 14:52:31,727 - ClientSocket_Thread-2 - ERROR - Error code 111: Connection refused
    2014-07-07 14:52:31,727 - SocketClient_file-to-socket_Thread-2 - DEBUG - Could not connect to server! Trying again in 10 seconds...
    2014-07-07 14:52:34,463 - SocketServer_socket-to-file_Thread-4 - CRITICAL - Accepted client connection: 192.168.0.11 from port 56287
    2014-07-07 14:52:34,463 - Hl7Receiver_socket-to-file_Thread-6 - INFO - Thread spawned.
    2014-07-07 14:52:34,463 - SocketServer_socket-to-file_Thread-4 - INFO - Starting thread: Hl7Receiver_socket-to-file_Thread-6
    2014-07-07 14:52:41,738 - SocketClient_file-to-socket_Thread-2 - DEBUG - Trying to connect to 192.168.0.11 at port 1050
    2014-07-07 14:52:41,739 - SocketClient_file-to-socket_Thread-2 - CRITICAL - Connected to 192.168.0.11 at port 1050
    2014-07-07 14:52:41,739 - Hl7Transmitter_file-to-socket_Thread-7 - INFO - Thread spawned.
    2014-07-07 14:52:41,740 - SocketClient_file-to-socket_Thread-2 - INFO - Starting thread: Hl7Transmitter_file-to-socket_Thread-7
    2014-07-07 14:52:41,741 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 14:53:41,802 - FileReader_file-to-socket_Thread-5 - INFO - Reading messages from 1 files.
    2014-07-07 14:53:41,802 - FileReader_file-to-socket_Thread-5 - DEBUG - Reading file: /usr/local/socketreader/filein/mensaje.dat
    2014-07-07 14:53:41,802 - FileReader_file-to-socket_Thread-5 - INFO - Message 1 received.
    2014-07-07 14:53:41,802 - FileReader_file-to-socket_Thread-5 - DEBUG - MSH|^~\&|ALERT|20011|EXT_SYS_RECETA|20011|20140616161413||RDE^O11^RDE_O11|8bb1493ed0304339b879|P|2.5|
    PID|1||31811020020011^^^ADT^PN~SIN CURP^^^SEGOB^NI||AZUCENA^PRUEBA 2||19920819|F|
    PV1|1|O|3024^200110000049^^20011||||||||||||||||2932714^^^7020000104002^ADT^20011|||||||||||||||||||||||||20140616160958|
    ORC|NW|5711638^ALERT||41092^ALERT|||||20140616161413|||7020000104002^Prueba^Erich|
    RXE|1^&^7^20140616^20140623^^1 Tableta(s) - 2ª copia: 0 - Vx­a: ORAL - Cada 6 horas - Inicio: 16:13h 16-Jun-2014 - 16:13h 23-Jun-2014 - 29 Realizaciones - Cantidad a suministrar: 1 Tableta(s)|1706^ACIDO FOLICO TABLETA 5 MG^MX_INT 00000000160|2||Tableta(s)|ORAL||||29|
    RXR|MX_INT 1^ORAL^1|
    2014-07-07 14:53:41,802 - FileReader_file-to-socket_Thread-5 - INFO - Message 1 added to queue "outgoing_socket". Queue size: 1
    2014-07-07 14:53:41,803 - FileReader_file-to-socket_Thread-5 - DEBUG - Deleting file: /usr/local/socketreader/filein/mensaje.dat
    2014-07-07 14:53:41,803 - FileReader_file-to-socket_Thread-5 - INFO - 1 files deleted.
    2014-07-07 14:53:41,803 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 14:53:41,810 - Hl7Transmitter_file-to-socket_Thread-7 - INFO - Message 1 fetched from output queue. Queue size: 1
    2014-07-07 14:53:41,813 - Hl7Transmitter_file-to-socket_Thread-7 - INFO - Message 1 sent.
    2014-07-07 14:53:41,813 - Hl7Transmitter_file-to-socket_Thread-7 - DEBUG - MSH|^~\&|ALERT|20011|EXT_SYS_RECETA|20011|20140616161413||RDE^O11^RDE_O11|8bb1493ed0304339b879|P|2.5|||AL|NE
    PID|1||31811020020011^^^ADT^PN~SIN CURP^^^SEGOB^NI||AZUCENA^PRUEBA 2||19920819|F|
    PV1|1|O|3024^200110000049^^20011||||||||||||||||2932714^^^7020000104002^ADT^20011|||||||||||||||||||||||||20140616160958|
    ORC|NW|5711638^ALERT||41092^ALERT|||||20140616161413|||7020000104002^Prueba^Erich|
    RXE|1^&^7^20140616^20140623^^1 Tableta(s) - 2ª copia: 0 - Vx­a: ORAL - Cada 6 horas - Inicio: 16:13h 16-Jun-2014 - 16:13h 23-Jun-2014 - 29 Realizaciones - Cantidad a suministrar: 1 Tableta(s)|1706^ACIDO FOLICO TABLETA 5 MG^MX_INT 00000000160|2||Tableta(s)|ORAL||||29|
    RXR|MX_INT 1^ORAL^1|
    2014-07-07 14:53:41,816 - Hl7Transmitter_file-to-socket_Thread-7 - INFO - HL7-ACK received with message control id: 8bb1493ed0304339b879
    2014-07-07 14:53:41,816 - Hl7Transmitter_file-to-socket_Thread-7 - DEBUG - MSH|^~\&|EXT_SYS_RECETA|20011|ALERT|20011|20140707144937||ACK^O11|1|P|2.5|
    MSA|AA|8bb1493ed0304339b879|Message successfully received.|
    2014-07-07 14:54:41,864 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 14:55:41,925 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 15:56:45,645 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 15:57:45,706 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 15:58:45,431 - SocketOps - ERROR - The socket we tried to receive from is currently down.
    2014-07-07 15:58:45,431 - SocketOps - ERROR - The socket we tried to receive from is currently down.
    2014-07-07 15:58:45,432 - Hl7Transmitter_file-to-socket_Thread-7 - ERROR - Our socket connection has been closed remotely. Suiciding!
    2014-07-07 15:58:45,432 - SocketOps - ERROR - socketReader encountered an exception:
    Traceback (most recent call last):
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/Common.socketWrapper", line 73, in shutdown
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/socket", line 224, in meth
    error: [Errno 107] Transport endpoint is not connected
    2014-07-07 15:58:45,432 - SocketOps - ERROR - socketReader encountered an exception:
    Traceback (most recent call last):
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/Common.socketWrapper", line 73, in shutdown
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/socket", line 224, in meth
    error: [Errno 107] Transport endpoint is not connected
    2014-07-07 15:58:45,433 - Hl7Transmitter_file-to-socket_Thread-7 - ERROR - socketReader encountered a socket exception:
    Traceback (most recent call last):
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/Common.workerThreads", line 1318, in threadStop
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/Common.socketWrapper", line 73, in shutdown
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/socket", line 224, in meth
    error: [Errno 107] Transport endpoint is not connected
    2014-07-07 15:58:45,433 - Hl7Transmitter_file-to-socket_Thread-7 - INFO - Thread stopped. Queue length: 0
    2014-07-07 15:58:45,767 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 15:59:45,828 - FileReader_file-to-socket_Thread-5 - INFO - Reading messages from 1 files.
    2014-07-07 15:59:45,828 - FileReader_file-to-socket_Thread-5 - DEBUG - Reading file: /usr/local/socketreader/filein/mensaje.dat
    2014-07-07 15:59:45,828 - FileReader_file-to-socket_Thread-5 - INFO - Message 2 received.
    2014-07-07 15:59:45,828 - FileReader_file-to-socket_Thread-5 - DEBUG - MSH|^~\&|ALERT|20011|EXT_SYS_RECETA|20011|20140616161413||RDE^O11^RDE_O11|8bb1493ed0304339b879|P|2.5|
    PID|1||31811020020011^^^ADT^PN~SIN CURP^^^SEGOB^NI||AZUCENA^PRUEBA 2||19920819|F|
    PV1|1|O|3024^200110000049^^20011||||||||||||||||2932714^^^7020000104002^ADT^20011|||||||||||||||||||||||||20140616160958|
    ORC|NW|5711638^ALERT||41092^ALERT|||||20140616161413|||7020000104002^Prueba^Erich|
    RXE|1^&^7^20140616^20140623^^1 Tableta(s) - 2ª copia: 0 - Vx­a: ORAL - Cada 6 horas - Inicio: 16:13h 16-Jun-2014 - 16:13h 23-Jun-2014 - 29 Realizaciones - Cantidad a suministrar: 1 Tableta(s)|1706^ACIDO FOLICO TABLETA 5 MG^MX_INT 00000000160|2||Tableta(s)|ORAL||||29|
    RXR|MX_INT 1^ORAL^1|
    2014-07-07 15:59:45,828 - FileReader_file-to-socket_Thread-5 - INFO - Message 2 added to queue "outgoing_socket". Queue size: 1
    2014-07-07 15:59:45,829 - FileReader_file-to-socket_Thread-5 - DEBUG - Deleting file: /usr/local/socketreader/filein/mensaje.dat
    2014-07-07 15:59:45,829 - FileReader_file-to-socket_Thread-5 - INFO - 1 files deleted.
    2014-07-07 15:59:45,829 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 16:00:45,890 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.

    This is the socketReader.log from 192.168.0.11

    2014-07-07 14:48:29,775 - Main - CRITICAL - socketReader 1.2.4 is starting up.
    2014-07-07 14:48:29,775 - Main - CRITICAL - Python Interpreter: CPython 2.7.5 64bit
    2014-07-07 14:48:29,776 - Main - CRITICAL - Host System: Linux srvtest 3.10.17 #2 SMP Wed Oct 23 16:34:38 CDT 2013 x86_64 Pentium(R) Dual-Core CPU E5700 @ 3.00GHz
    2014-07-07 14:48:29,776 - Main - CRITICAL - Command: ./socketReader64
    2014-07-07 14:48:29,776 - SocketClient_file-to-socket_Thread-2 - INFO - Thread spawned.
    2014-07-07 14:48:29,776 - FileWriter_socket-to-file_Thread-3 - INFO - Thread spawned.
    2014-07-07 14:48:29,777 - SocketServer_socket-to-file_Thread-4 - DEBUG - Trying to create a socket on IF 192.168.0.11 at port 1050
    2014-07-07 14:48:29,777 - SocketServer_socket-to-file_Thread-4 - CRITICAL - Established a socket on IF 192.168.0.11 at port 1050
    2014-07-07 14:48:29,777 - SocketServer_socket-to-file_Thread-4 - INFO - Thread spawned.
    2014-07-07 14:48:29,777 - FileReader_file-to-socket_Thread-5 - INFO - Thread spawned.
    2014-07-07 14:48:29,777 - Main - INFO - Starting thread: SocketClient_file-to-socket_Thread-2
    2014-07-07 14:48:29,778 - Main - INFO - Starting thread: FileWriter_socket-to-file_Thread-3
    2014-07-07 14:48:29,779 - SocketClient_file-to-socket_Thread-2 - DEBUG - Trying to connect to 192.168.1.16 at port 1060
    2014-07-07 14:48:29,779 - Main - INFO - Starting thread: SocketServer_socket-to-file_Thread-4
    2014-07-07 14:48:29,779 - Main - INFO - Starting thread: FileReader_file-to-socket_Thread-5
    2014-07-07 14:48:29,779 - SocketClient_file-to-socket_Thread-2 - CRITICAL - Connected to 192.168.1.16 at port 1060
    2014-07-07 14:48:29,780 - Main - CRITICAL - All threads have been successfully started.
    2014-07-07 14:48:29,780 - Hl7Transmitter_file-to-socket_Thread-6 - INFO - Thread spawned.
    2014-07-07 14:48:29,780 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 14:48:29,781 - SocketClient_file-to-socket_Thread-2 - INFO - Starting thread: Hl7Transmitter_file-to-socket_Thread-6
    2014-07-07 14:48:37,054 - SocketServer_socket-to-file_Thread-4 - CRITICAL - Accepted client connection: 192.168.1.16 from port 51569
    2014-07-07 14:48:37,055 - Hl7Receiver_socket-to-file_Thread-7 - INFO - Thread spawned.
    2014-07-07 14:48:37,055 - SocketServer_socket-to-file_Thread-4 - INFO - Starting thread: Hl7Receiver_socket-to-file_Thread-7
    2014-07-07 14:49:29,839 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 14:49:37,115 - Hl7Receiver_socket-to-file_Thread-7 - INFO - Message 1 received.
    2014-07-07 14:49:37,115 - Hl7Receiver_socket-to-file_Thread-7 - DEBUG - MSH|^~\&|ALERT|20011|EXT_SYS_RECETA|20011|20140616161413||RDE^O11^RDE_O11|8bb1493ed0304339b879|P|2.5|||AL|NE
    PID|1||31811020020011^^^ADT^PN~SIN CURP^^^SEGOB^NI||AZUCENA^PRUEBA 2||19920819|F|
    PV1|1|O|3024^200110000049^^20011||||||||||||||||2932714^^^7020000104002^ADT^20011|||||||||||||||||||||||||20140616160958|
    ORC|NW|5711638^ALERT||41092^ALERT|||||20140616161413|||7020000104002^Prueba^Erich|
    RXE|1^&^7^20140616^20140623^^1 Tableta(s) - 2ª copia: 0 - Vx­a: ORAL - Cada 6 horas - Inicio: 16:13h 16-Jun-2014 - 16:13h 23-Jun-2014 - 29 Realizaciones - Cantidad a suministrar: 1 Tableta(s)|1706^ACIDO FOLICO TABLETA 5 MG^MX_INT 00000000160|2||Tableta(s)|ORAL||||29|
    RXR|MX_INT 1^ORAL^1|
    2014-07-07 14:49:37,115 - Hl7Receiver_socket-to-file_Thread-7 - INFO - Message 1 added to input queue "outgoing_file". Queue size: 1
    2014-07-07 14:49:37,116 - Hl7Receiver_socket-to-file_Thread-7 - INFO - HL7-ACK for message 1 sent.
    2014-07-07 14:49:37,116 - FileWriter_socket-to-file_Thread-3 - INFO - Message 1 fetched from output queue. Queue size: 0
    2014-07-07 14:49:37,117 - Hl7Receiver_socket-to-file_Thread-7 - DEBUG - MSH|^~\&|EXT_SYS_RECETA|20011|ALERT|20011|20140707144937||ACK^O11|1|P|2.5|
    MSA|AA|8bb1493ed0304339b879|Message successfully received.|
    2014-07-07 14:49:37,118 - FileWriter_socket-to-file_Thread-3 - INFO - Message 1 written to file: /usr/local/socketreader/fileout/ALERT_20011_EXT_SYS_RECETA_20011_RDE_20140707144937_00000.hl7
    2014-07-07 14:49:37,118 - FileWriter_socket-to-file_Thread-3 - DEBUG - MSH|^~\&|ALERT|20011|EXT_SYS_RECETA|20011|20140616161413||RDE^O11^RDE_O11|8bb1493ed0304339b879|P|2.5|||AL|NE
    PID|1||31811020020011^^^ADT^PN~SIN CURP^^^xxxx^NI||xxxx^PRUEBA 2||19920819|F|
    PV1|1|O|3024^200110000049^^20011||||||||||||||||2932714^^^7020000104002^ADT^20011|||||||||||||||||||||||||20140616160958|
    ORC|NW|5711638^ALERT||41092^ALERT|||||20140616161413|||7020000104002^Prueba^xxxx|
    RXE|1^&^7^20140616^20140623^^1 Tableta(s) - 2ª copia: 0 - Vx­a: ORAL - Cada 6 horas - Inicio: 16:13h 16-Jun-2014 - 16:13h 23-Jun-2014 - 29 Realizaciones - Cantidad a suministrar: 1 Tableta(s)|1706^ACIDO FOLICO TABLETA 5 MG^MX_INT 00000000160|2||Tableta(s)|ORAL||||29|
    RXR|MX_INT 1^ORAL^1|
    2014-07-07 14:50:29,883 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 14:51:29,940 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 14:52:29,990 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 15:53:32,799 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 15:54:32,859 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 15:54:39,490 - SocketOps - ERROR - The socket we tried to receive from is currently down.
    2014-07-07 15:54:39,490 - SocketOps - ERROR - The socket we tried to receive from is currently down.
    2014-07-07 15:54:39,491 - SocketOps - ERROR - socketReader encountered an exception:
    Traceback (most recent call last):
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/Common.socketWrapper", line 73, in shutdown
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/socket", line 224, in meth
    error: [Errno 107] Transport endpoint is not connected
    2014-07-07 15:54:39,491 - SocketOps - ERROR - socketReader encountered an exception:
    Traceback (most recent call last):
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/Common.socketWrapper", line 73, in shutdown
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/socket", line 224, in meth
    error: [Errno 107] Transport endpoint is not connected
    2014-07-07 15:54:39,491 - Hl7Receiver_socket-to-file_Thread-7 - ERROR - socketReader encountered a socket exception:
    Traceback (most recent call last):
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/Common.workerThreads", line 747, in threadStop
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/Common.socketWrapper", line 73, in shutdown
    File "/home/debian/SR/hl7socketreader/tags/1.2.4/build/pyi.linux2/socketReader/outPYZ1.pyz/socket", line 224, in meth
    error: [Errno 107] Transport endpoint is not connected
    2014-07-07 15:54:39,491 - Hl7Receiver_socket-to-file_Thread-7 - INFO - Thread stopped.
    2014-07-07 15:55:32,903 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 15:56:32,950 - FileReader_file-to-socket_Thread-5 - DEBUG - Sleeping for: 60 seconds.
    2014-07-07 15:56:55,126 - Hl7Transmitter_file-to-socket_Thread-6 - ERROR - Our socket connection has been closed remotely. Suiciding!
    2014-07-07 15:56:55,126 - Hl7Transmitter_file-to-socket_Thread-6 - INFO - Thread stopped. Queue length: 0
    2014-07-07 15:56:56,002 - ClientSocket_Thread-2 - CRITICAL - The connection to 192.168.1.16 at port 1060 has been closed.
    2014-07-07 15:56:56,002 - SocketClient_file-to-socket_Thread-2 - DEBUG - Trying to connect to 192.168.1.16 at port 1060
    2014-07-07 15:56:56,003 - ClientSocket_Thread-2 - ERROR - Error code 111: Connection refused
    2014-07-07 15:56:56,003 - SocketClient_file-to-socket_Thread-2 - DEBUG - Could not connect to server! Trying again in 10 seconds...
    2014-07-07 15:57:06,013 - SocketClient_file-to-socket_Thread-2 - DEBUG - Trying to connect to 192.168.1.16 at port 1060
    2014-07-07 15:57:06,014 - ClientSocket_Thread-2 - ERROR - Error code 111: Connection refused
    2014-07-07 15:57:06,014 - SocketClient_file-to-socket_Thread-2 - DEBUG - Could not connect to server! Trying again in 10 seconds...

    Best Regards

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.