Forum Discussion

JRahm's avatar
JRahm
Icon for Admin rankAdmin
Aug 02, 2006

WebLogic information extraction

Our weblogic servers will give me an active list of servers in the X-WebLogic-Cluster-List header if I supply the X-Weblogic-Request-ClusterInfo header with a value of true. This is the missing piece I've been trying to identify since weblogic stopped encoding the real server IP in network byte order in version 8. I'd like to populate an array with the servername and the unique arbitrary number it is assigned. By utilizing the rule


when HTTP_REQUEST {
  HTTP::header insert "X-Weblogic-Request-ClusterInfo" "true"
}
when HTTP_RESPONSE {
  if { [HTTP::header exists "X-WebLogic-Cluster-List"] } {
    log "Cluster list: [HTTP::header "X-WebLogic-Cluster-List"]"
    HTTP::header remove "X-WebLogic-Cluster-List"
  }
}

I receive the information below:

-306262974!server_a-93!65535!-1 |

-572170000!server_c-93!65535!-1 |

-851958269!server_b-91!65535!-1 |

-896443913!server_d-93!65535!-1 |

-937189304!server_b-90!65535!-1 |

1685710619!server_c-92!65535!-1 |

1717517013!server_d-90!65535!-1 |

1720885579!server_d-91!65535!-1 |

1949732605!server_b-93!65535!-1 |

296784837!server_c-90!65535!-1 |

324405524!server_c-91!65535!-1 |

472005059!server_d-92!65535!-1 |

534925464!server_b-92!65535!-1 |

548600573!server_a-90!65535!-1 |

82670729!server_a-92!65535!-1 |

894452575!server_a-91!65535!-1

I'm looking for advice on the best way (read: efficient) to extract the servername and the leading arbitrary number associated to it. I know the real IP address for each of those server names, so what I'd like to do is evaluate the JSESSIONID information arriving (jsessionid!primary_server!secondary_server) and send connections to primary_server based on information in the array, and in the LB_FAILED event, send connections to the secondary_server. I'm struggling with getting persistence to behave nicely in failure scenarios and I am looking at alternatives. Any help would be appreciated.

18 Replies