Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › hcitcptest
- This topic has 12 replies, 6 voices, and was last updated 15 years, 9 months ago by Michael Hertel.
-
CreatorTopic
-
November 24, 2008 at 6:17 pm #50479Kevin CristParticipant
we are sending messages through a vpn tunnel we are having some issues. how would i run an hcitcptest to check the connection. i have tried a few different ways with no luck. This is my first time trying this. Do you have to use an hl7 when you do this? i was thinking i could just use hcitcptest -p 12002. Any help or clarification would be helpful. Thanks for your time. -
CreatorTopic
-
AuthorReplies
-
-
November 25, 2008 at 12:47 pm #66253Robert KersemakersParticipant
Hi Kevin,
Syntax for hcitcptest is:
Code:hcitcptest [-h hostname] [-f file] -t tcp_encoding_type -p port
so you will always need to specify the tcp_encoding_type.
And you need to specify the hostname too, or else hcitcptest will act as a server and listen to the specified port.
So your example will listen to port 12002 on the localhost, but I’m not sure which encoding_type will be used. If you want to send messages to port 12002 on localhost, try
Code:hcitcptest -h localhost -t 4 -p 12002
Use
Code:hcitcptest
to get more info.
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
-
November 25, 2008 at 2:32 pm #66254Kevin CristParticipant
thanks, makes more sense to me now. When we send a message through the tunnel and they get thier message, after a while we lose connection with the vendor. we are only sending them one hl7 message an hour. our tech guy is working on something with the firewall. with this being my first interface setup is there anything i can look for on the cloverleaf side?
-
November 25, 2008 at 2:50 pm #66255Max Drown (Infor)Keymaster
Kevin, we have run into this problem with VPN/Firewall connections before. For whatever reason, the firewall nazis will not change the way the firewall times out for our interface connections over VPNs. So, we worked with the vendor and created a heartbeat message that is sent with a cronjob every 5 minutes.
I’ll paste our code below, but keep in mind you’ll have to modify it for your own needs.
heartbeat.tcl#!/hci/quovadx/qdx5.6/integrator/bin/tcl################################################################################
#
# Name: heartbeat
# Purpose: Send a heartbeat to keep vpn/firewall connections alive
#
################################################################################# Note: The heartbeat message needs to be in $HCISITEDIR/iig/files/ directory.
global HciRoot
# Set the date (used for debugging and logging if needed)
set date [clock format [clock seconds] -format %Y%m%d]# Example cron:
#00,05,10,15,20,25,30,35,40,45,50,55 * * * * . ~/.profile.cron;/hci/bin/heartbeat.tcl testbno bno31 bno31bblab_out heartbeat_bb.hl7 heartbeat_bb.log > /dev/null 2>&1# Get args
set scriptName $argv0
set site [lindex $argv 0]
set process [lindex $argv 1]
set thread [lindex $argv 2]
set heartbeat [lindex $argv 3]
set log [lindex $argv 4]# Set up the environment for Cloverleaf commands
eval [exec $HciRoot/sbin/hcisetenv -root tcl $HciRoot $site]# Send the heartbeat
#catch {exec hcicmd -p $process [code]#!/hci/quovadx/qdx5.6/integrator/bin/tcl################################################################################
#
# Name: heartbeat
# Purpose: Send a heartbeat to keep vpn/firewall connections alive
#
################################################################################# Note: The heartbeat message needs to be in $HCISITEDIR/iig/files/ directory.
global HciRoot
# Set the date (used for debugging and logging if needed)
set date [clock format [clock seconds] -format %Y%m%d]# Example cron:
#00,05,10,15,20,25,30,35,40,45,50,55 * * * * . ~/.profile.cron;/hci/bin/heartbeat.tcl testbno bno31 bno31bblab_out heartbeat_bb.hl7 heartbeat_bb.log > /dev/null 2>&1# Get args
set scriptName $argv0
set site [lindex $argv 0]
set process [lindex $argv 1]
set thread [lindex $argv 2]
set heartbeat [lindex $argv 3]
set log [lindex $argv 4]# Set up the environment for Cloverleaf commands
eval [exec $HciRoot/sbin/hcisetenv -root tcl $HciRoot $site]# Send the heartbeat
#catch {exec hcicmd -p $process-- Max Drown (Infor)
-
November 25, 2008 at 3:08 pm #66256Robert KersemakersParticipant
Firewall nazis? 😈
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
-
November 25, 2008 at 3:31 pm #66257Max Drown (Infor)Keymaster
Hehe.
By the way, here’s our heartbeat message.
Code:MSH|^~&|HEARTBEAT|HEARTBEAT|HEARTBEAT|HEARTBEAT|20080909082000||ORM^O01|999999-999999999999|P|2.3.1^M
^M == carriage return
-- Max Drown (Infor)
-
November 25, 2008 at 9:58 pm #66258Chris WilliamsParticipant
If you’re running Unix you can adjust your tcp_keep_alive so that it is less than the time-out values of the various pieces of equipment along the route. I changed ours to 15 minutes instead of the default 2 hours. We had a router/switch in the path that was timing out and shutting the tunnel down. No problems since.
-
November 26, 2008 at 12:14 pm #66259Gary AtkinsonParticipant
Ugh I hate VPN’s… nothing but problems with them. 😈
-
December 4, 2008 at 2:36 pm #66260Kevin CristParticipant
if you change the keep_alive from say 2 hrs to 15 minutes what does that do to the other sockets. we are running a unix box. i havent really heard of the keep_alive untill this posting. what exactly does it do?
thanks.
-
December 4, 2008 at 5:27 pm #66261Chris WilliamsParticipant
We are on HP-UX 11i. Your mileage may vary.
The control file on our system is
/etc/rc.config.d/nddconfThe specific parameter is
tcp_keepalive_interval which controls how often “probes” are sent on idle TCP connections to keep them from timing out. This setting applies to all TCP connections on the system. The value is in milliseconds.The default for HP-UX is to send a probe every 2 hours. I wouldn’t imagine that sending them every 15 minutes on an idle connection would have much impact on other systems.
Setting this value appropriately should eliminate the need for sending HL7 messages from the engine just to keep connections from timing out. Work with your network people to determine an appropriate value. As I mentioned earlier, it’s not just the destination that could be timing out. It can be any piece of equipment in the route. In our case it was one of our switches that was causing the problem.
On UNIX you can get more information from the man pages:
man ndd -
December 4, 2008 at 6:10 pm #66262Max Drown (Infor)Keymaster
What is the “probe” exactly? Is it some sort of icmp packet like a ping?
-- Max Drown (Infor)
-
December 4, 2008 at 7:10 pm #66263Chris WilliamsParticipant
All the gory details are contained in RFC-1122.
-
December 5, 2008 at 2:10 am #66264Michael HertelParticipant
Here’s what Chris is talking about.
See this thread:
http://clovertech.infor.com/viewtopic.php?t=734
You need to tweak (if AIX) AIX’s tcp_keepidle parameter.
-
-
AuthorReplies
- The forum ‘Cloverleaf’ is closed to new topics and replies.