Forum Discussion

bmgriner's avatar
bmgriner
Frequent Contributor
14 years ago

Rest Services hitting endpoint twice

I have been observing, for the last couple of months, that when I hit different endpoints with my rest services that I get double the traffic. Even when I hit an application running on localhost that I know is not being hit by anyone else I see it being hit twice. I have observed this mostly through putting debug points in the application running the rest web service. I observe the same debug points getting hit twice.

This last time I observed that the header for both of the hits is actually different. The most notable difference I found was the following:
1st time through :- user-agent: Jakarta Commons-HttpClient/3.1
2nd time through :- user-agent:Mozilla/5.0 (Windows; U; Windows NT 6.1: en-US; rv:1.9.2) Gecko

Is there some setting I have turned on or off that prevents this from happening. It is a real annoyance and often causes tests to fail. Depending on which call goes first the test will pass or fail. I have also observed that sometimes the 2nd hit on the server will even use a different http method. I'm trying to do a POST and the second time uses a GET.
  • Sounds serious. I have reported it to the soapUI team as a high priority bug.

    Thank you for the excellent bug report.

    Henrik
    SmartBear Stockholm
  • bmgriner's avatar
    bmgriner
    Frequent Contributor
    Thanks for escalating the issue. Let me know when this has been looked into and/or fixed.
  • HI,

    i have tried to reproduce your issue on my local rest app and I didn't mange to reproduce it . Also when I start HTTP Monitor to proxy all requests I can see only one request sent at the time.
    Are you getting this double hits on some specific one or on all requests?

    regards
    nebojsa
    SmartBear Sweden
    eviware.com
  • bmgriner's avatar
    bmgriner
    Frequent Contributor
    I am getting this every time. I even created a new SoapUI project and tested it and it also sent 2 requests each time I clicked the button once. I am using version 3.6.1, so I want to try the 4.0 version and see if it works there.

    I'm not sure what else I can do to help you reproduce the issue. SoapUI doesn't seem to show what it is doing in any logs, but the applications I hit show 2 requests.

    I will try to reproduce it again by making a new project and then I will send that project to you.

    I also wonder if this is some kind of firewall issue where I am being redirected, but the first request goes through too. I see what I can find on that avenue too.
  • Hi,

    this is probably related to how the browser component was used in 3.6.x, ie it would send a request of its own when showing the response. This has been fixed in the 4.0 release, so you should not see this behavior in that version, would it be possible for you to do a test-installation of 4.0 "on the side" just to confirm this?

    To get around this in 3.6.1 you will have to disable the browser component - add -Dsoapui.jxbrowser.disable=true to the .vmoptions file (or soapui bat file if you are using that) in the soapUI bin folder.

    Hope this helps,

    regards,

    /Ole
    SmartBear Sweden
  • bmgriner's avatar
    bmgriner
    Frequent Contributor
    I was able to verify that this problem is no longer happening in the 4.0 version.
  • bmgriner wrote:
    I was able to verify that this problem is no longer happening in the 4.0 version.

    Excellent!

    Thank you for your help.

    Henrik
    SmartBear Sweden