Forum Discussion

Ube_34341's avatar
Ube_34341
Icon for Nimbostratus rankNimbostratus
Jun 24, 2013

HSL

Hi All

 

I created the irules below and it seems we have problem when SysLog go down. In case of SysLog Fault the irules stop to work and the client receive "connection reset by peer"

 

 

Can you help me?is it a normal Behavior?

 

 

when HTTP_REQUEST {

 

 

if {[HTTP::uri] contains "xxxxxxxx"}

 

{

 

set hsl [HSL::open -proto UDP -pool HSL]

 

set ip [IP::client_addr]

 

set uri [HTTP::uri]

 

set isp [whereis [IP::client_addr] isp]

 

set useragent [HTTP::header "User-Agent"]

 

set regioni [whereis [IP::client_addr] state]

 

 

 

set data [HTTP::payload]

 

 

set namevals [split [HTTP::payload] "&"]

 

...........................

 

 

HSL::send $hsl "$ip|$CH|SSLIVE|$useragent|$isp|$regioni|$CDN|$bitrate|$cookieb"

 

}

 

}

 

2 Replies

  • In case of SysLog Fault the irules stop to work and the client receive "connection reset by peer"what does fault mean?

    it seems working fine when hsl pool is marked down by monitor.

    e.g.

    [root@ve10:Active] config  b virtual bar list
    virtual bar {
       snat automap
       pool foo
       destination 172.28.19.252:80
       ip protocol 6
       rules myrule
       profiles {
          http {}
          tcp {}
       }
    }
    [root@ve10:Active] config  b rule myrule list
    rule myrule {
       when HTTP_REQUEST {
      set hsl [HSL::open -proto UDP -pool HSL]
      set ip [IP::client_addr]
      set uri [HTTP::uri]
      HSL::send $hsl "$ip|$uri"
    }
    }
    [root@ve10:Active] config  b pool HSL list
    pool HSL {
       monitor all fake
       members 192.168.206.173:514 {}
    }
    
    [root@ve10:Active] config  b pool HSL|grep -i pool\ member
    +-> POOL MEMBER HSL/192.168.206.173:514   inactive,down
    
    [root@ve10:Active] config  curl -I http://172.28.19.252
    HTTP/1.1 200 OK
    Date: Mon, 24 Jun 2013 13:00:20 GMT
    Server: Apache/2.2.3 (CentOS)
    Last-Modified: Thu, 23 May 2013 00:28:46 GMT
    ETag: "4185a8-59-c3efab80"
    Accept-Ranges: bytes
    Content-Length: 89
    Connection: close
    Content-Type: text/html; charset=UTF-8
    
    
  • with "down" I mean in case of any network issue or reboot of the server.

     

    Thanks