Most of the time I try to access drupal.org I get a page that says "Safari can't open the page.". At one point I was able to access it just fine and then when I was submitting a comment on an issue it threw that page up again. I can access everything perfectly from Firefox though. Very odd.

P.S. I cleared all of my caches in Safari and did a reset and it still didn't work. I'm running Safari 5.0.2 on OS X.

Trevor

Comments

drumm’s picture

Title: Having a very hard time accessing Drupal.org from Safari » The redirect loop bug is bad
Project: Drupal.org Redesign » Bakery Single Sign-On System
Version: » 6.x-2.x-dev
Component: Everything Else » Code
Priority: Normal » Major

Clearing your cookies will solve the problem for you. It is not browser-specific, happened to me on Chrome.

greggles’s picture

Category: bug » support
Priority: Major » Normal
Status: Active » Fixed

Yes, clear your cookies.

Given only 2 reports of the problem on d.o and no new ones on twitter since the launch yesterday I don't think we should look for a code based solution.

I assume this is fixed for you, trevorsheridan, since you were ultimately able to post this.

greggles’s picture

As a PSA - http://twitter.com/#!/drupal/status/29092956135

I'm not sure where else to mention it without being overly annoying to people who are having no problems.

eigentor’s picture

Status: Fixed » Needs review

Hm I am still experiencing the redirect loop with Firefox 3.6.11 and 3.6.12. Tried clearing cookies and all other caches multiple times - but still cannnot login.

As the login works flawlessly with another computer (both machines are running Windcows 7) I guess it must have something to do with the privacy settings of this notebook. The way cookies are written to the hard drive must be somewhat changed in the new bakery version.

Chrome is logging in fine.

Am willing to provide more helpful bug reports. ;)

greggles’s picture

@eigentor, based on our discussion in irc I thought you were able to fix this?

Can you try creating a new firefox profile on the affected machine and see if that fixes it?

greggles’s picture

Status: Needs review » Fixed

I helped someone else via e-mail who cleared all cookies from any drupal.org site and was then able to use the site without problem.

eigentor’s picture

Ah O.K.. Creating a new profile helped indeed. I can login again now with the affected Firefox.

greggles’s picture

Title: The redirect loop bug is bad » Endless redirect on migration to 6.x-2.x caused by extra cookies

So, creating a new profile was just for debugging as a way to absolutely clear all cookies, cache and other settings. Now we know it can work and you there is just something to clear in your other profile to make it work.

jbrauer’s picture

I can't reproduce at the moment so leaving fixed but at least three times in the last couple of hours I had a situation where I was using d.o and got the too many redirects error. I cleared cookies and re-logged in to d.o and a few pages worked (issues and project pages) and then on some page load a few pages into my browsing the site I again got the too many redirects. In each case I had session cookies set for both drupal.org and .drupal.org.

jbrauer’s picture

I just reproduced with these conditions.

1) I was using Safari and was logged in to d.o but hadn't visited any pages on d.o in something like 60-90 minutes.
2) In the URL bar I entered http://drupal.org/project/nodewords and got too many redirects
3) I visited any other page and got too many redirects message

Looking at my cookies I now had session cookies set for drupal.org and .drupal.org
I cleared page cache
I deleted the session cookie for drupal.org and attempted to load pages. The redirect message persisted. On any attempt to visit a page the drupal.org session cookie was set again with the same name but a different value.
I deleted the session cookie for .drupal.org (but no other cookies) and the site came up as expected.

jbrauer’s picture

I've seen this several more times on multiple computers each time when it's going to be a problem the drupal.org cookie is reset multiple times on a page load. Clearing the .drupal.org cookie resolves it temporarily in each case.

trevorsheridan’s picture

This is still a problem for me. I remove that drupal.org cookie and it works, but then after a certain period of time I get the too many redirects error.

jbrauer’s picture

Category: support » bug
Status: Fixed » Active

OK I found one way to reproduce this reliably so I'm re-opening it.

If I clear all caches and any cookies for any drupal.org related domain and then log into d.o I can browse around as much as I want.
If I then visit api.drupal.org the .drupal.org cookie is set.
When I next load a page on d.o itself i'll get the endless redirect. The drupal.org cookie is set several times in this process. In fact I can even delete the .drupal.org session cookie WHILE the redirect loop is happening and it will load the page right away.

jbrauer’s picture

#957608: 310 error in chrome is essentially describing the same symptom.

greggles’s picture

@jbrauer, I followed the steps in #13 and couldn't get a redirect.

jbrauer’s picture

Noting that I saw a report from wmostrey in IRC that this was happening in Firefox 4b6 but not Safari.

My first two attempts to post this comment met with the frequent placement of the .drupal.org cookie followed by redirects.

Thinking out loud
Is there anything in d.o logs that shows anything useful or indicates when/why the sessions are being regenerated?

Could it have anything to do with different levels of access on different d.o sites?

JacobSingh’s picture

I got the same thing.
Chrome 7.0.517.41
OSX

greggles’s picture

Category: bug » support
Status: Active » Fixed

Based on the reports it seems unrelated to access levels. I don't believe there are good logs (they are not aggregated).

For folks who can repeat this, that's somewhat useful information to know the size of the bug, but the question is: is this something ongoing or one time. If you can repeat it in a brand new firefox profile that would help increase the understanding of the problem.

greggles’s picture

Title: Endless redirect on migration to 6.x-2.x caused by extra cookies » Endless redirect on migration to 6.x-2.x caused by extra/malformed cookies

If someone could mail me (greg at growingventuresolutions.com) all of their drupal.org cookies when this happens that would help debug as well. Perhaps we can detect these malformed cookies and delete them.

If you are worried that e-mailing cookies is insecure consider: 1) my permissions on drupal.org hardware let me impersonate anyone I want 2) they are bad cookies anyway 3) you should delete all the cookies after sending them so that you wouldn't be vulnerable to having them copied anyway.

greggles’s picture

Title: Endless redirect on migration to 6.x-2.x caused by extra/malformed cookies » Eat some badly formed cookies to prevent endless redirect on migration to 6.x-2.x
Category: support » bug
Status: Fixed » Active

Let's figure out how to stop the insanity.

coltrane’s picture

Status: Active » Needs review
StatusFileSize
new3 KB

If Bakery doesn't look for the "redirect" (oatmeal) cookie anymore this should stop the problem. I'll test this locally by downgrading my installs.

greggles’s picture

The solution in #21 does require rolling out updated bakery to all sites again. The hudson job to do that (and drupalorg and the one or two other common modules) automatically is feeling like a better and better idea.

greggles’s picture

Based on the cookies someone just sent me, the problem was caused by having:

1 drupal.org sess cookie. 1 .drupal.org sess cookie. 1 CHOCOLATECHIP cookie.

I'd still prefer to get full request/response headers for a redirect session to be sure that's the problem.

Jonah Ellison’s picture

I'm able to reproduce #13 using Safari 5/WinXp. (Log in to drupal.org/user, visit api.drupal.org, visit drupal.org, receive "Too many redirects" error).

greggles’s picture

Title: Eat some badly formed cookies to prevent endless redirect on migration to 6.x-2.x » Document proper cookie settings for master and slave sites
Status: Needs review » Needs work

Based on the fixups from earlier in the week it appears that we "just" need to have the following values explicitly set.

$conf['bakery_domain']: .example.com
$cookie_domain on master: .example.com
$cookie_domain on subsites: sub.example.com or .sub.example.com - either works fine.

I think this should either be done via documentation or it could be something we validate as we build the form and say "Hey, you're on the [slave|master] and your cookies are wrong. Sad panda."

yosisays’s picture

i get this same issue with organic groups ( Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.) would a similar solution work for me?

greggles’s picture

@yosisays, that seems completely different. I suggest posting in the organic groups issue queue and leaving it there.

You can also install the devel module and enable the setting on admin/settings/devel to "Display redirection page" that should show what is happening.

yosisays’s picture

thanks, sorry for hijacking the thread, turns out that spaces OG module was the culprit

greggles’s picture

Status: Needs work » Needs review
StatusFileSize
new2.89 KB
coltrane’s picture

The chocolatechip cookie (auth cookie) needs to be read by all domains so it must be set with leading dot in the UI but I think the master's session cookie domain need not have a leading dot.

I'll test the settings.php cookie domains out again.

coltrane’s picture

Status: Needs review » Needs work

My test setup on localhost with vhosts:

Master: bakery.local
Slave: slave.bakery.local
Testing with non UID 1 account

Test case 1 "explicit":
master settings.php $cookie_domain = .bakery.local
slave settings.php $cookie_domain = .slave.bakery.local

* Login on master, authenticated on slave
* Logout of master, also logged out of slave
* Login on slave, authenticated on master
* Logout of slave, also logged out of master

Test case 2 "not explicit":
master settings.php #$cookie_domain = .bakery.local (commented out, cleared cache)
slave settings.php #$cookie_domain = .slave.bakery.local (commented out, cleared cache)

* Login on master, authenticated on slave
* Logout of master, also logged out of slave
* Login on slave, authenticated on master
* Logout of slave, also logged out of master

Test case 3 "mixed":
master settings.php $cookie_domain = .bakery.local
slave settings.php #$cookie_domain = .slave.bakery.local (commented out, cleared cache)

* Login on master, authenticated on slave
* Logout of master, also logged out of slave
* Login on slave, authenticated on master
* Logout of slave, also logged out of master

Findings:
Regardless of settings.php cookie_domain Bakery SSO and logout across sites worked without fault.

Based on what was seen today with London2011 I think we document the process of drupal.org subsites differently than Bakery's documentation. Bakery's documentation should include information on setting the settings.php cookie_domain in a troubleshooting section only.

coltrane’s picture

Status: Needs work » Needs review
StatusFileSize
new3.61 KB

Here's an updated troubleshooting section. greggles, were could I document the rollout of Bakery on d.o infra?

drumm’s picture

I like http://drupal.org/node/1030588 because it is public and doesn't have roundabout access for editing & viewing. There is also https://infrastructure.drupal.org/node/154 and https://infrastructure.drupal.org/node/149.

coltrane’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.