Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication Key and Review problems #890

Closed
golf2849 opened this issue Aug 21, 2015 · 25 comments
Closed

Authentication Key and Review problems #890

golf2849 opened this issue Aug 21, 2015 · 25 comments

Comments

@golf2849
Copy link

I installed Turpentine on magento ver.1.7.0.2 (with Varnish ver.2.1.5-5 with hosting on Virtual Server) on the site www.garneroarredamenti.com.
I have two problems:

  1. when I enter the Authentication Key on Servers > Varnish Authentication Key (by adding \n at the end) I get this error from the panel of magento:

Failed to apply the VCL to 127.0.0.1:6082: Got unexpected response code from
Varnish: 106 Message from VCC-compiler: Syntax error in condition, expected
'(', '!' or variable name, found 'true' (input Line 148 Pos 5) if (true &&
req.url ~
"?&=")
{ ----####---------------------------------------------------------------------------------------------------------
Running VCC-compiler failed, exit 1 VCL compilation failed

  1. you can not enter the product reviews ("Recensioni" in italian), if you try to add a review on any product you get the error:

"Unable to post the review."

if I uninstall Turpentine, reviews return to work.

Thanks for help

@aricwatson
Copy link
Contributor

Hi -

  1. It sounds like your key is actually correct, the error is occurring when you try to apply your VCL to Varnish. It sounds like a syntax error in the VCL file is causing the error. Have you made any changes to the VCL files that are part of turpentine, or are you using a custom include for the VCL?

  2. This might be related to Update modman file to set the filename for the module file. #1, we should probably get that resolved first to see if it is.

@golf2849
Copy link
Author

  1. I have made no changes to the file VCL, I just installed the extension and left the default values.

  2. I installed the extension by copying the files with FTP.
    I did not find this file "modman" I have to create it?
    If so, where? Should I put these lines in the file:

Nexcess.net Turpentine (Varnish) Extension

app/etc/modules/Nexcessnet_Turpentine.xml app/etc/modules/Nexcessnet_Turpentine.xml
app/code/community/Nexcessnet/Turpentine/ app/code/community/Nexcessnet/Turpentine/
app/design/adminhtml/default/default/layout/turpentine.xml app/design/adminhtml/default/default/layout/turpentine.xml
app/design/adminhtml/default/default/template/turpentine/ app/design/adminhtml/default/default/template/turpentine/

Thanks

@aricwatson
Copy link
Contributor

You don't need to worry about the modman file unless you're actually using modman to install Turpentine.

As far as the VCL syntax error, what version of Varnish are you using?

@golf2849
Copy link
Author

Ok, so the change of the link #1 is not needed in my case (for the issue of the Review).

Varnish ver.2.1.5-5

@miguelbalparda
Copy link
Contributor

Have you actually selected Varnish 2 in the admin panel?

@golf2849
Copy link
Author

Is selected default "Automatic", the other options are: "2.1.x" and "3.0.x".

@miguelbalparda
Copy link
Contributor

Try selecting 2.x and let us know if anything changed.

@golf2849
Copy link
Author

Nothing changes.
I get the same error:
"Failed to apply the VCL to 127.0.0.1:6082: Got unexpected response code from Varnish: 106 Message from VCC-compiler: Syntax error in condition, expected '(', '!' or variable name, found 'true' (input Line 148 Pos 5) if (true && req.url ~ "?&=") { ----####--------------------------------------------------------------------------------------------------------- Running VCC-compiler failed, exit 1 VCL compilation failed"

@aricwatson
Copy link
Contributor

What version of Turpentine are you using? Can you post the VCL file that Turpentine is generating for you?

@golf2849
Copy link
Author

Nexcessnet_Turpentine-0.6.4.tgz

From: Aric Watson
Sent: Monday, August 31, 2015 5:16 PM
To: nexcess/magento-turpentine
Cc: golf2849
Subject: Re: [magento-turpentine] Authentication Key and Review problems (#890)

What version of Turpentine are you using? Can you post the VCL file that Turpentine is generating for you?


Reply to this email directly or view it on GitHub.

@aricwatson
Copy link
Contributor

Thanks, can you send us a copy of the VCL that Turpentine is generating? You can access it via the 'cache management' screen in the magento admin.

@golf2849
Copy link
Author

When i click on "Download Varnish Config" get this error:
"Error 503 Service Unavailable
Service Unavailable
Guru Meditation:
XID: 993889742
Varnish cache server"

At this link http://www.a2gp3.it/default.zip
find the file default.vcl (folder root/var)

@BarryCarlyon
Copy link

As an alternative to using the download button, you can grab the file from the save location, which by default is {{root_dir}}/var/default.vcl

As set under System -> Configuration -> Varnish Options -> Config File Location

@golf2849
Copy link
Author

golf2849 commented Sep 1, 2015

Thanks Barry, that's what I did. You can see at this link http://www.a2gp3.it/default.zip

@aricwatson
Copy link
Contributor

Could you try replacing your current version-2.vcl file with this older version?
https://github.com/nexcess/magento-turpentine/blob/778601d21d9d888620c5f4ef60ab767d2114e2c8/app/code/community/Nexcessnet/Turpentine/misc/version-2.vcl

Then try applying the VCL to your varnish and see if you get the same syntax error.

@aricwatson
Copy link
Contributor

@golf2849 any update on this?

@bluec
Copy link

bluec commented Sep 20, 2015

FWIW I have the same issue so I would be happy to provide further debugging if required.

My setup: Magento 1.9.0.1, Nexcessnet_Turpentine-0.6.6, Varnish 2.1.5, CentOS 6.x x86_64. Fresh install of Turpentine.

The generated deafult.vcl is here: http://pastebin.com/5v2CU1aw

Precise error message is as follows. I tried the older version-2.vcl that you posted above but it creates the same error (albeit on line 151 instead).

Failed to apply the VCL to 127.0.0.1:6082: Got unexpected response code from Varnish: 106 Message from VCC-compiler: Syntax error in condition, expected '(', '!' or variable name, found 'true' (input Line 154 Pos 5) if (true && req.url ~ "?&=") { ----####--------------------------------------------------------------------------------------------------------- Running VCC-compiler failed, exit 1 VCL compilation failed

@golf2849
Copy link
Author

Hello aricwatson, sorry for the delay in the coming days test the last change you suggested and let you know.

@golf2849
Copy link
Author

Hello aricwatson,
I replaced the version-2.vcl file with this older version:
https://github.com/nexcess/magento-turpentine/blob/778601d21d9d888620c5f4ef60ab767d2114e2c8/app/code/community/Nexcessnet/Turpentine/misc/version-2.vcl

and i get this new error:

Failed to apply the VCL to 127.0.0.1:6082: Got unexpected response code from Varnish: 106 Message from VCC-compiler: Syntax error in condition, expected '(', '!' or variable name, found 'true' (input Line 148 Pos 5) if (true && req.url ~ "?&=") { ----####--------------------------------------------------------------------------------------------------------- Running VCC-compiler failed, exit 1 VCL compilation failed

@aricwatson
Copy link
Contributor

I think I've pinned this down to this line 198 of the version-2.vcl file (in the current master branch):
if ({{enable_get_ignored}} && req.url ~ "[?&]({{get_param_ignored}})=") {

https://github.com/nexcess/magento-turpentine/blob/master/app/code/community/Nexcessnet/Turpentine/misc/version-2.vcl#L198

{{enable_get_ignored}} is getting turned into true when the VCL is generated from this template, and Varnish 2 does not like that. Please try editing the version-2.vcl that you're using so that line becomes:
if (req.url ~ "[?&]({{get_param_ignored}})=") {

And see if that works better? If so we'll tweak version-2.vcl.

@golf2849
Copy link
Author

I copied the files of your last link with suggested change and the save was successful without any errors, but now in the frontend of the site I get this error:
"ESI processing not enabled"
and it disappeared the header and the menu of the site.

@golf2849
Copy link
Author

Errata corrige: I restarted Varnish and now works correctly!

@golf2849
Copy link
Author

Thanks a lot per the solution of problem 1), now remains only the second problem:
2) you can not enter the product reviews ("Recensioni" in italian), if you try to add a review on any product you get the error:
"Unable to post the review."
(if I uninstall Turpentine, reviews return to work).

@aricwatson
Copy link
Contributor

I think my first recommendation would be to look in the logs to see if there's anything useful explaining why they didn't work.

Is there a particular reason why you're using Varnish 2? Varnish 3+ should work quite a bit better.

@aricwatson
Copy link
Contributor

Closing for lack of feedback. Feel free to reply and we'll reopen if you're still having problems!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants