Menu

#66 Default policy NLB

v1.0_(example)
pending
nobody
None
9
2012-10-10
2011-12-13
Anil Pandey
No

I am embedded the following code in my application:
<applet code="wjhk.jupload2.JUploadApplet" archive="fileUploadLib/jupload/wjhk.jupload.jar, fileUploadLib/jupload/jakarta-commons-oro.jar, fileUploadLib/jupload/jakarta-commons-net.jar" name="jupload" mayscript="" width="600" height="280">
<param name="postURL" value="ProcessUploadRequestServlet">
<param name="afterUploadURL" value="ImageUploadAdd.do?event=save_image_upload">
<param name="appletHeight" value="280">
<param name="appletWidth" value="600">
<param name="lookAndFeel" value="system">
<param name="showLogWindow" value="true">
<param name="showStatusBar" value="true">
<param name="allowedFileExtensions" value="jpeg/tif">
<param name="stringUploadSuccess" value="">
<param name="nbFilesPerRequest" value="-1">
<param name="httpUploadParameterType" value="iteration">

                </applet>

I am using the ProcessUploadRequestServlet to parse the files. It is working fine in single server.
I need user related data inside ProcessUploadRequestServlet for audit purpose.When we introduce the Network Load balancer (hardware) sticky session,new request generated from the applet can go on either server session data is getting flushed.

Servlet fails with http 500 message and session get expired.

Discussion

  • Etienne

    Etienne - 2011-12-15

    RTFM.

    If you want help, you'll need to give informations about what happens.

    How can I guess what happens, by reading the PARAM tag ?

    You give no explanation on what happens on server side (500 return code).
    And, actually, you'll need at leatst to post here the full debug output of the applet.

    Etienne

     
  • Nobody/Anonymous

    Hi etienne,

    The problem is jupload fires the new request(postURL) in new session where as I want to have it in same session.

    Do we have any setting/parameter for that ?

    Regards,
    Anil Pandey

     
  • Geoff

    Geoff - 2011-12-19

    ProcessUploadRequestServlet is something you've written yourself yes? You will need to do your own session management, either by using Cookies, or perhaps using the specificHeaders applet param
    http://jupload.sourceforge.net/apidocs/wjhk/jupload2/policies/UploadPolicy.html

    Regards,
    Geoff

     
  • Nobody/Anonymous

    Hi,

    ProcessUploadRequestServlet contains the same code as parseRequest.jsp

    I have used
    <param name="specificHeaders" value="Cookie: JSESSIONID=&lt;%=session.getId()%&gt;;" &gt;<="" p="">

    but its not working.Can u give me sample how to use "specificHeaders" ?

    Thanks in Advance,

    Anil Pandey

     
  • Geoff

    Geoff - 2011-12-19

    Hi,

    I don't think the sample parseRequest.jsp uses sessions, so you will need to write the code to handle the sessions yourself.

    Rgds,
    Geoff

     
  • Nobody/Anonymous

    Hi,

    I agree parseRequest.jsp not uses the session.

    Here is whole scenario :
    NLB - Network Load Balancer

    I have embedded the applet in my application which has two application server(Server1 and server2). User logged in, NLB redirects to Server1.All the request initiated by this user will go to Server1 via NLB(as Sticky Session is configured in NLB)

    As the postUrl fired by this applet is initiated as new request it can go on either of two application Server1 or Server2 and serve the upload purpose.
    Here is the cache,It goes to Server2 and do the Upload.But know next request from this user will give u 505 error, as whole data cached in session on Server1 will not be available on Server2 as other request do use session details.

    Please suggest,

    Regards,
    Anil Pandey

     
  • Etienne

    Etienne - 2011-12-21

    Hi,

    RTFM.

    To get help, as stated in the doc and in my first message, please post the full debug output of the applet.

    Youll see there the full HTTP request to the server, with headers and so on. You can then see what's happening, and why your NLB doesnt react as expected.

    BTW : if the NLB transfer to the wrong server, it means it didnt detect that it's the same session. So the questions are:
    - How does the NLB detect that's it's the same session ?
    - What send the applet, which is not correct against this 'detection' ? (info in the full debug output).

    Etienne

     
  • Geoff

    Geoff - 2011-12-21

    Hi Anil,

    I can only echo what Etienne has said.

    If your postUrl is going to Server2 then you need to figure out why - you can only do this by looking at the full HTTP headers sent to the server.

    Hint: there is obviously something missing in those headers which your NLB uses for sticky session detection. Without knowing how your NLB has implemented sticky sessions then only you can work this out.

    Regards,
    Geoff

     
  • Etienne

    Etienne - 2012-10-10
    • status: open --> pending
    • milestone: --> v1.0_(example)
     

Anonymous
Anonymous

Add attachments
Cancel