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

Using Magento CE 1.7 There has been an error processing your request #144

Closed
maurisource opened this issue Apr 11, 2013 · 33 comments
Closed
Labels

Comments

@maurisource
Copy link

Got this error after installing Magento-Turpentine. I can't find anyway to debug it, any help please?
Error report thrown:

There has been an error processing your request

Mage registry key "_singleton/turpentine/observer_esi" already exists

Trace:
#0 /home/magentoman/www/pondicherie.net/app/Mage.php(222): Mage::throwException('Mage registry k...')
#1 /home/magentoman/www/pondicherie.net/app/Mage.php(476): Mage::register('_singleton/turp...', false)
#2 /home/magentoman/www/pondicherie.net/includes/src/__default.php(20995): Mage::getSingleton('turpentine/obse...')
#3 /home/magentoman/www/pondicherie.net/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('controller_fron...', Array)
#4 /home/magentoman/www/pondicherie.net/includes/src/__default.php(17408): Mage::dispatchEvent('controller_fron...', Array)
#5 /home/magentoman/www/pondicherie.net/includes/src/__default.php(20428): Mage_Core_Controller_Varien_Front->init()
#6 /home/magentoman/www/pondicherie.net/includes/src/__default.php(20773): Mage_Core_Model_App->_initFrontController()
#7 /home/magentoman/www/pondicherie.net/includes/src/__default.php(20033): Mage_Core_Model_App->getFrontController()
#8 /home/magentoman/www/pondicherie.net/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#9 /home/magentoman/www/pondicherie.net/index.php(87): Mage::run('', 'store')
#10 {main}
@aheadley
Copy link
Contributor

Where exactly are you seeing that error? Is it coming from a page load or is it just stuck in the middle of a page (which means it's coming from an ESI request)?

@maurisource
Copy link
Author

I'm getting this error from main page to any page. Frontend & backend. I can't login to the backend neither. Tried to reinstall numerous time but same error coming out.

@ptz0n
Copy link

ptz0n commented Apr 12, 2013

@maurisource You have cleared all caches? Primarily the config cache (or just empty your var dir).

@aheadley
Copy link
Contributor

It looks like you're using the Magento Compiler, as a test can you try disabling it by commenting out this line in includes/config.php?

define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');

(You can comment it out by putting a # or // in front of it)

@maurisource
Copy link
Author

Ok, turned off compiler and i'm able to access the config panel.

After reading your config guide + FAQ I'm trying now for the past hours to fix this problem:

Failed to apply the VCL to 127.0.0.1:6082: Got unexpected response code from Varnish: 107 bgsrgmihxffrowkwqhimdojtfggxcghg Authentication required. 

I don't understand if it's an error related to the key or communication to Varnish installed on my server?

My config is as follow:

/etc/sysconfig/varnish

## Alternative 3, Advanced configuration
#
# See varnishd(1) for more information.
#
# # Main configuration file. You probably want to change it :)
VARNISH_VCL_CONF=/etc/varnish/default.vcl
#
# # Default address and port to bind to
# # Blank address means all IPv4 and IPv6 interfaces, otherwise specify
# # a host name, an IPv4 dotted quad, or an IPv6 address in brackets.
# VARNISH_LISTEN_ADDRESS=
VARNISH_LISTEN_PORT=80
#
# # Telnet admin interface listen address and port
VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1
VARNISH_ADMIN_LISTEN_PORT=6082
#
# # Shared secret file for admin interface
VARNISH_SECRET_FILE=/etc/varnish/secret
#
# # The minimum number of worker threads to start
VARNISH_MIN_THREADS=1
#
# # The Maximum number of worker threads to start
VARNISH_MAX_THREADS=1000
#
# # Idle timeout for worker threads
VARNISH_THREAD_TIMEOUT=120
#
# # Cache file location
VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin
#
# # Cache file size: in bytes, optionally using k / M / G / T suffix,
# # or in percentage of available disk space using the % suffix.
VARNISH_STORAGE_SIZE=1G
#
# # Backend storage specification
VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}"
#
# # Default TTL used when the backend does not specify one
VARNISH_TTL=120
#
# # DAEMON_OPTS is used by the init script.  If you add or remove options, make
# # sure you update this section, too.
DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
             -f ${VARNISH_VCL_CONF} \
             -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
             -t ${VARNISH_TTL} \
             -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \
             -u varnish -g varnish \
             -S ${VARNISH_SECRET_FILE} \
             -s ${VARNISH_STORAGE}"

default.vlc: this is the only uncommented line

backend default {
  .host = "127.0.0.1";
  .port = "8080";
}

Screenshot of Varnish settings in Magento.

Screen Shot 2013-04-14 at 12 27 05 PM
Screen Shot 2013-04-14 at 12 28 20 PM

I would appreciate your guiding in my configuration so that I can run this website with Turpentine & Varnish correctly setup.

@aheadley
Copy link
Contributor

That all looks correct, assuming the Varnish Authentication Key value is correct. DId you get that from the contents of /etc/varnish/secret?

@maurisource
Copy link
Author

@aheadley Yes, I did get that from /etc/varnish/secret and have input it in the Varnish Authentification Key field as you can see with a \n at the end as advised. So I don't understand the Failure error..

@maurisource
Copy link
Author

When applying Varnish config in Cache Management I get:

Failed to apply the VCL to 127.0.0.1:80: Varnish admin socket timeout

@maurisource
Copy link
Author

@aheadley Hey Alex, does the configuration generated by Turpentine should replace the default.vcl located in /etc/varnish/default.vcl perhaps?

@aheadley
Copy link
Contributor

Yes, I did get that from /etc/varnish/secret and have input it in the Varnish Authentification Key field as you can see with a \n at the end as advised.

Strange, can you send the output of hexdump -C /etc/varnish/secret (you will probably need to run this as root/with sudo).

When applying Varnish config in Cache Management I get:
Failed to apply the VCL to 127.0.0.1:80: Varnish admin socket timeout

That is a different problem. It looks like you changed the entry in the Server List setting to use port 80. The host/port in Server List should be the Varnish Management interface (it's correct in your screenshot). The Backend Host and Backend Port settings should point to your backend webserver (Apache/Nginx/etc).

Hey Alex, does the configuration generated by Turpentine should replace the default.vcl located in /etc/varnish/default.vcl perhaps?

It can, and once you get it working I would recommend doing that but Turpentine must be able to talk to Varnish over the management port or it won't be able to purge the cache entries that it needs to.

@maurisource
Copy link
Author

Strange, can you send the output of hexdump -C /etc/varnish/secret (you will probably need to run this as root/with sudo).

Here's the output:

00000000  73 68 71 4b 3c 37 4f 65  37                       |shqK<7Oe7|
00000009

Ok in my case the backend port is 8080 as follows so I changed it back to that value:

backend default {
  .host = "127.0.0.1";
  .port = "8080";
}

At this point I'm still having the same error message:

Failed to apply the VCL to 127.0.0.1:6082: Got unexpected response code from Varnish: 107 lddrzenuainnracbttxeuikfifcwbydm Authentication required. 

Hopefully you can find a solution..

@maurisource
Copy link
Author

Update: by removing the \n in the Secret key it gives me:

Failed to apply the VCL to 127.0.0.1:6082: Got unexpected response code from Varnish: 106 Message from VCC-compiler: Expected one of 'acl', 'sub', 'backend', or 'director' Found: 'import' at (input Line 25 Pos 1) import std; ######----- Running VCC-compiler failed, exit 1 VCL compilation failed 

Maybe this is a "good" sign?

@aheadley
Copy link
Contributor

Ok, the issue is that your /etc/varnish/secret file doesn't have a newline at the end, so the \n at the end of the Varnish Authentication Key is making it not match. Remove the \n and it should work.

@aheadley
Copy link
Contributor

Maybe this is a "good" sign?

Sort of, now we're getting somewhere. What version of Varnish are you using?

EDIT: You can check by running varnishd -V

@maurisource
Copy link
Author

varnishd (varnish-2.1.5 SVN )
Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS

@aheadley
Copy link
Contributor

Ok, you've got 3.0.x selected in the Varnish Version setting, you need to change it to 2.1.x (the 3.0 VCL syntax is not backwards compatible).

@maurisource
Copy link
Author

Or otherwise I should upgrade the Varnish version to 3.0.x ? Can I simply do that via ssh?

@aheadley
Copy link
Contributor

Or otherwise I should upgrade the Varnish version to 3.0.x ?

That would be best, yes, 3.0.x works somewhat better than 2.1.x and supposedly also performs better.

Can I simply do that via ssh?

You should be able to, though the exact process would depend on the distro you're using. I can't help you much with that.

@maurisource
Copy link
Author

@aheadley Thanks. Upgrading my Varnish install to the latest solved the issue. Or selecting the 2.1 from the config worked also.

Thanks for your support in this matter.

I now have all caches disabled except Varnish caches.

Another question before closing this topic: could you point me in the right direction for the following:

My main magento website has 2 store view, one in French and one in English.

when I go to: www.domain.com everything is displayed fine
when I go to: www.domain.com/fr/ or www.domain.com/en/ the content is not there.

Please feel free to throw me any idea on this before I start digging too deep.

EDIT: this problem was related in #130 & #138 my base path is also "/" Maybe you know a fix for this. Or maybe able to help me in private.

@aheadley
Copy link
Contributor

I now have all caches disabled except Varnish caches.

I would recommend enabling at least the Layout and Config caches for performance.

My main magento website has 2 store view, one in French and one in English.

When you say "the content is not there", do you mean you get 404s on pages that should exist or ...?

@maurisource
Copy link
Author

@aheadley thanks for the recommendation I enabled those 2 caches also.

Yes I do get 404 error on pages that should exists: see for yourself: www.pondicherie.net/en/ www.pondicherie.net/fr/

I would like to be able to continue using the store in URL as before..

@maurisource
Copy link
Author

were you able to check it?

@aheadley
Copy link
Contributor

The missing content implies that it's an issue with your Magento configuration rather than with Turpentine/Varnish. Does it work without Varnish/Turpentine?

@maurisource
Copy link
Author

Yes, indeed it works without Varnish/Turpentine. as you can see you can access www.pondicherie.net but adding the store URL triggers that error. Turning OFF the store URL makes it work, but I unfortunately isn't the best solution for me. As I see on previous thread, there's some other people having issues too.

@maurisource
Copy link
Author

There's something I want to show you: it works well before I refresh the index management: for example: http://www.pondicherie.net/en/nighty-panties.html?___SID=U << this works with Varnish/Turpentine ON. After refresh/reindexing the data I get the cleaned url: http://www.pondicherie.net/en/nighty-panties.html which gives me a 404.

@maurisource
Copy link
Author

Seemed I've solved the issue for compatibility between the Store URLS.

So, here’s the simple solution:

Go to System > Configuration > Web > Session Validation Settings
Set Use SID on Frontend to “No”

Refresh Full Cache.
Play around with the switch in the front end for a few times English > French > English etc.

It's working for now..

@aheadley
Copy link
Contributor

Glad you got it working.

@hozefahd
Copy link

hi,
I have an issues with varnish.It cache the empty content so when i implement auto scrolling it randomly return empty for few page.Please help me

@gondo
Copy link

gondo commented May 21, 2013

this is not support group, but log for tech issues!
if you "need help" first try to look around and see if it was solved before, or open the new ticket with proper description. or contact nexcess and pay them for consulting.

@hozefahd
Copy link

please send the link when these issues have been solved.

On Tue, May 21, 2013 at 8:25 AM, gondo notifications@github.com wrote:

this is not support group, but log for tech issues!
if you "need help" first try to look around and see if it was solved
before, or open the new ticket with proper description. or contact nexcess
and pay them for consulting.


Reply to this email directly or view it on GitHubhttps://github.com//issues/144#issuecomment-18186305
.

@ptz0n
Copy link

ptz0n commented May 21, 2013

@hozefahd This issue is still closed. Please create a new one describing your problems and what tests you have done so far.

@hozefahd
Copy link

created a new issues no 200. Please check and look if u can help.

On Tue, May 21, 2013 at 5:17 PM, Erik Eng notifications@github.com wrote:

@hozefahd https://github.com/hozefahd This issue is still closed.
Please create a new one describing your problems and what tests you have
done so far.


Reply to this email directly or view it on GitHubhttps://github.com//issues/144#issuecomment-18203681
.

@lord007
Copy link

lord007 commented Jul 10, 2014

use command
php htdocs/shell/compiler.php clear

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

No branches or pull requests

6 participants