So basically, during development, none of the GET requests would ever redirect, except on the rare occasions that the routing issue showed up. Writing drivers is a bit of an art, and I've often used the technique of having setFollowRedirects(true) by default and disabling it when I hit a POST. If this solves the problems, send me a patch and I'll integrate it.
Thanks Mandy On Thu, Dec 23, 2010 at 9:15 PM, Sahan Gamage <[email protected]> wrote: > On Thu, Dec 23, 2010 at 4:03 PM, Amanda Waite <[email protected]> > wrote: > > http.setFollowRedirects(true) never used to work for POST requests so > they > > Yeah. I had problem with POSTs. Sorry I forgot to tell that one. I had to > do : > > enable follow redirect > do the / request > disable follow redirect > > I guess it's sort of a hack. > > > had to be handled manually. Obviously the update to HttpClient 3.1 > changed > > that, and yes I could only test on a limited number of setups, and I > > favoured Thin and Rack (although I also tested with mod_rails (Passenger) > > and Lighttpd). > > Actually I am using thin and rack with nginx. > thin (1.2.7) > rack (1.0.1) > > > Thanks > -sahan > > > > I'm going to try to port the WebApp to 1.9.2 over the holidays. At the > very > > least I'll recheck the app and driver on Linux and make sure that > everything > > works. > > > > Thanks > > > > Mandy > > > > On Thu, Dec 23, 2010 at 7:39 PM, Sahan Gamage <[email protected]> wrote: > >> > >> I was able to track down what happens to some more details: > >> > >> When a user sends a request to root ("/"). router has a rule to > >> redirect it to events:index. > >> In the events_controller where index is handled, the request is > >> checked to see whether it is a request by a logged in user (by > >> checking the session id). > >> If it is a request by a logged in user, a redirect is done to /home > >> (redirect_to(home_path)). This is where thin outputs 302 status with > >> "You are being redirected" message. From what I read about rails > >> redirects this behavior seems correct > >> ( > http://rails.rubyonrails.org/classes/ActionController/Base.html#M000468). > >> I am not sure why it has not occurred before to anybody when doing > >> testing (may be my environment is still not exactly as expected to > >> be). > >> Anyways, what I did to fix this was enable setFollowRedirects in http > >> client at the OlioDriver (http.setFollowRedirects(true)). I am not > >> sure this is the perfect solution. But so far it is working for me. > >> > >> Thanks > >> -sahan > >> > >> On Thu, Dec 23, 2010 at 4:02 AM, Amanda Waite <[email protected]> > >> wrote: > >> > It's likely to be a Rails routing issue, I had a few random > occurrences > >> > of > >> > this but it always went away when I investigated. Take a look at > >> > http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-routes.htm for > an > >> > insight into how routing works. You should be able to figure out whey > >> > the > >> > redirect is happening on your setup. > >> > > >> > Mandy > >> > > >> > On Thu, Dec 23, 2010 at 4:11 AM, Sahan Gamage <[email protected]> > wrote: > >> >> > >> >> Thanks for the quick reply. > >> >> Here are some details of the system: > >> >> OS: Ubuntu 9.04 > >> >> Ruby : 1.8.7 > >> >> Rails : 2.3.5 > >> >> proxy : nginx 0.6.35 > >> >> > >> >> I did some more digging into the problem and I logged the entire html > >> >> page when the exception occurs (doEventDetail) in UIDriver.java. It > >> >> seems like server sends a redirection message (<html><body>You are > >> >> being <a href="http://10.0.100.176/home > ">redirected</a>.</body></html>) > >> >> and that's why it fails to scrape an event from the html. > >> >> > >> >> I am looking into this one > >> >> If you have seen this before and know a quick fix pls let me know. > >> >> > >> >> Thanks a lot > >> >> -sahan > >> >> > >> >> On Wed, Dec 22, 2010 at 3:52 AM, Amanda Waite < > [email protected]> > >> >> wrote: > >> >> > It means that the driver was unable to scrape an Event ID from the > >> >> > HomePage > >> >> > which itself suggests that the HomePage wasn't rendered correctly. > >> >> > What > >> >> > version of Ruby? What version of Rails? What OS? Is there anything > in > >> >> > the > >> >> > logs? If not and you are running in production you might want to > run > >> >> > in > >> >> > development mode and run a smaill test and observe what happens > when > >> >> > EventDetail fails. > >> >> > > >> >> > We still only support Ruby 1.8.7 and Rails 2.3.5 > >> >> > > >> >> > Thanks > >> >> > > >> >> > Mandy > >> >> > > >> >> > On Wed, Dec 22, 2010 at 4:19 AM, Sahan Gamage <[email protected]> > >> >> > wrote: > >> >> >> > >> >> >> Hi all, > >> >> >> > >> >> >> I configured faban/olio to run a performance test with Ruby > version > >> >> >> of > >> >> >> Olio. > >> >> >> > >> >> >> When I run the performance test I get this warning (and the > >> >> >> IOException) in the faban Run Log: > >> >> >> > >> >> >> UIDriverAgent[0].1.doEventDetail: In event detail and select event > >> >> >> is > >> >> >> null > >> >> >> > >> >> >> Trace: > >> >> >> > >> >> >> org.apache.olio.workload.driver.UIDriver doEventDetail > 656 > >> >> >> sun.reflect.GeneratedMethodAccessor6 invoke > >> >> >> sun.reflect.DelegatingMethodAccessorImpl invoke 25 > >> >> >> java.lang.reflect.Method invoke 597 > >> >> >> com.sun.faban.driver.engine.TimeThread doRun 169 > >> >> >> com.sun.faban.driver.engine.AgentThread run 202 > >> >> >> > >> >> >> Once the test is completed I see that lot of (39 out of 91) > >> >> >> "EventDetail" operations are failed (this is a small test run - > so > >> >> >> the numbers are small) > >> >> >> > >> >> >> What might be the cause of this problem ? > >> >> >> How does this affect the results, in the sense of throughput and > >> >> >> response > >> >> >> time ? > >> >> >> > >> >> >> Thanks in advance > >> >> >> -sahan > >> >> > > >> >> > > >> > > >> > > > > > >
