Cannot open/usr/local/varnish/var/varnish/test. localdomain/

Source: Internet
Author: User
Tags varnish

After varnish is installed and started, the following error occurs when the varnishlog command is used: Cannot open/usr/local/varnish/var/varnish/test. localdomain /_. vsm: No such file or directory

650) this. width = 650; "src =" http://img1.51cto.com/attachment/201309/160523412.jpg "title =" tempUnnamed QQ Screenshot20130913155003.JPG "alt =" 160523412.jpg"/>

Run the command # ls/usr/local/varnish/var/varnish to check whether the directory test. localdomain does not exist.

Solution 1:

If you use-n <instancename>So varnishlog must be added.-n <instancename>。

Note: If you do not know whether the-n option is added and it is started with servcie varnishd start or/etc/init. d/varnishd start, cat/Etc/init. d/varnishd | more.

Solution 2:

1. Use ps-ef | grep varnishd to view the varnishd pid.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/06061W330-1.jpg "title =" tempUnnamed QQ Screenshot20130913155127.JPG "alt =" 160700965.jpg"/>

We can see that I have two varnishd processes here, because the varnishd execution user set in the varnish configuration file is www, so here it should be 2563

2,Use lsof-p <varnishdPID> | grep vsm VIEW _ actual vsm path

What I already know in the previous stepvarnishdPIDIs 2563, so the command here isLsof-p 2563 | grep vsm

3. mkdir/usr/local/varnish/var/varnish/test. localdomain/

Note: The test. localdomain here should be the host name in your error prompt

4. Create a soft link to the _. vsm path shown above

# Ln-s/var/log/varnish/_. vsm/usr/local/varnish/var/varnish/test. localdomain/_. vsm

5. Execute #./varnishlog

Access the http proxy service of varnish to view the log.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/06061S119-2.jpg "title =" tempUnnamed QQ Screenshot20130913155253.JPG "alt =" 162612148.jpg"/>


Reference: http://stackoverflow.com/questions/12165818/varnish-cache-log-not-working

This article from the "Idle pool small building" blog, please be sure to keep this source http://soarwilldo.blog.51cto.com/5520138/1296500

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.