0

We're currently working with a Magento (v 1.9.2.1) cached by Varnish (v 3.0.5). The varnish control is done by Turpentine (v 0.6.8).

When a user has no cookies for the site he has to login twice to get to the customer-account-index and get logged in. After the first login the user gets redirected to a blank login page without errors. At the same time the frontend and frontend_cid cookies are created. The customer_group (and persistent_shopping_cart) cookie is not created and the user is not logged in.

The automatically login after the registration process is working fine. When the user already has the frontend and frontend_cid cookies he can log in on first try.

After the second login the user gets logged in and all cookies are set correctly.

The cookie domain is left blanc. The input name="form_key" is set within ul class="form-list".

Would like to see all users beeing logged in after the first time they enter their credentials correctly. But that does not work when user browses in private mode or visits the page for the first time (registering earlier on another computer).

Any idea?

  • Can you test using the varnish bypass cookie to see if the problem still occurs? Are there any error messages showing in the logs? You may need to turn on logging. – Aric Watson Apr 4 '16 at 13:13
  • The Problem also occurs with the bypass cookie set. (but i still think it is varnish related) – The_An_ian Apr 4 '16 at 17:23
  • neither exception nor system log show anything session or cookie related. – The_An_ian Apr 4 '16 at 18:22
  • in fact it only shows some (silly) typos, i have fixed now, in a third party and another self written extension, i did not update, which shoud have nothing to do with logging in (or not logging in) users – The_An_ian Apr 4 '16 at 18:39
  • The fact that the problem occurs with the bypass cookie set strongly implies it's not Varnish/Turpentine related, since the presence of the cookie causes Varnish to just pass the requests directly to the back-end w/out any changes. You can further test this by connecting to the backend directly and testing. – Aric Watson Apr 5 '16 at 14:30
0

The problem was a shitty vcl declaration for bypassing non ssl traffic, that that had effect on (much) more than it should have. It listened to a header to recognize https traffic which was never set. :-( It lead to the problem that most parts of the vcl could not work as they should have, because they habe never been executed.

I solved the non-ssl problem with an js-redirect to https in the html-head of the website and now my varnish session and cookie configuration works as it should. :-) thanks to J.N. Bartholomäus from basecom.de for the useful hint!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.