hcitcptest

  • Creator
    Topic
  • #50479
    Kevin Crist
    Participant

    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.

Viewing 11 reply threads
  • Author
    Replies
    • #66253
      Robert Kersemakers
      Participant

      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

    • #66254
      Kevin Crist
      Participant

      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?

    • #66255

      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)

    • #66256
      Robert Kersemakers
      Participant

      Firewall nazis? 😈

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

    • #66257

      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)

    • #66258
      Chris Williams
      Participant

      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.

    • #66259
      Gary Atkinson
      Participant

      Ugh I hate VPN’s… nothing but problems with them.  😈

    • #66260
      Kevin Crist
      Participant

      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.

    • #66261
      Chris Williams
      Participant

      We are on HP-UX 11i. Your mileage may vary.

      The control file on our system is /etc/rc.config.d/nddconf

      The 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

    • #66262

      What is the “probe” exactly? Is it some sort of icmp packet like a ping?

      -- Max Drown (Infor)

    • #66263
      Chris Williams
      Participant

      All the gory details are contained in RFC-1122.

    • #66264
      Michael Hertel
      Participant

      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.

Viewing 11 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
4,966
Forums
28
Topics
9,106
Replies
33,627
Topic Tags
248