Bakery Module: Troubleshooting
Before carrying out any recommended steps, it may help to learn more about how the Bakery module works and what it means to use the Bakery module for single sign-on (SSO). See also the Bakery FAQ.
SSO doesn't work
If single sign-on doesn't seem to work for some users, try the following steps:
Were you logged into the subsite? If not, or if logging in via a subsite doesn't work, continue reading.
Try logging in as a non-admin user on the master site and see if SSO fails. If it does, continue reading.
- Clear Drupal site cache for each site in your Bakery cluster
- Clear your browser cookies (if you're unsure how to do this for your internet browser, try searching online)
- Log in to your master site as a user other than the admin (UID 1) account
- Be sure you've set up the Bakery module correctly between sites. Look particularly for whether the Bakery secret key is the same between sites and that the Bakery cookie domain is the same between sites
- Are you using a front-end proxy cache layer like Varnish? If so, read about handling cookies
If you still experience problems, create a support request issue in the Bakery queue.
After installing the Bakery module, users cannot view "my account." What's wrong?
Your cookie_domain in settings.php may be improperly set.
Will Bakery work with "localhost"?
No, you must use something like "site.localhost" or anything with two names. "The cookie specs require two names and a dot between, so your cookiedomain cannot be "localhost." This post on stackoverflow describes why.
I seem to be logged in on some of the sites, but not all. Why?
Each Drupal installation will set its own session cookie, as well as the cookie set by Bakery. If you are logged in as user 1, then the Bakery cookie might expire before the session cookie, meaning that you will remain logged in on some sites.
Using a front-end proxy cache like Varnish and dealing with log message "Bad Cookie"
Some front-end proxy caches like Varnish will not allow Bakery's cookies through by default. Be sure that Varnish or whatever cache-layers you are using are allowing the cookies to passthru. See a list of Bakery's cookies.
If you're using Varnish, be sure that you're not removing the CHOCOLATECHIP cookie. For example, if you've got
set req.http.Cookie = regsuball(req.http.Cookie, ";(SESS[a-z0-9]+|NO_CACHE)=", "; \1=");
then try
set req.http.Cookie = regsuball(req.http.Cookie, ";(SESS[a-z0-9]+|NO_CACHE|CHOCOLATECHIP)=", "; \1=");
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion