I've noticed that in /etc/varnish/secret that it's empty And running start and then status gives me varnishd dead but pid file exists
[ec2-user@ip-xxx-xx-xx-xx httpd]$ sudo service varnish start Starting Varnish Cache: [ OK ] [ec2-user@ip-xxx-xx-xx-xx httpd]$ sudo service varnish status varnishd dead but pid file exists On Mon, Feb 15, 2016 at 11:38 AM, Mike Jones <[email protected]> wrote: > Hi, > > I've changed the backend default back to 8080. > > Security group on aws for port 8080 isn't open. > > and changed /etc/sysconfig/varnish to > > DAEMON_OPTS="-a :80 \ > -f /etc/varnish/default.vcl \ > -T localhost:6082 \ > -b localhost:8080 \ > -u varnish -g varnish \ > -s file,/var/lib/varnish/varnish_storage.bin,256m" > > When I run varnishstat I don't get any useful information > > 0+00:00:00 > Hitrate ratio: 0 0 0 > Hitrate avg: 0.0000 0.0000 0.0000 > > How do you start the varnish daemon? I've tried sudo `bash -x > /etc/init.d/varnish restart` I get http://pastebin.com/pTikCS7Y and > still nothing in varnishlog > > On Mon, Feb 15, 2016 at 10:45 AM, Tobias Honacker < > [email protected]> wrote: > >> FYI: Your backend listen on Port 8080, so you should define this in your >> varnish config (.vcl) in /etc/varnish >> >> >> 1. backend default { >> 2. .host = "127.0.0.1"; >> 3. .port = "8080"; >> 4. } >> >> >> Varnish Port 80 -> open port 80 on your firewall (Security Group AWS) >> Backend Port 8080 -> no need to open port 8080 on your firewall (Security >> Group AWS) >> >> So your /etc/sysconfig/varnish might look like: >> >> DAEMON_OPTS="-a :80 \ >> -f /etc/varnish/default.vcl \ >> T localhost:6082 \ >> -S /etc/varnish/secret \ >> -u varnish -g varnish \ >> -s file,/var/lib/varnish/varnish_storage.bin,1G" >> >> hint: with defining the backend in your config you do not need to specify >> this in your daemon_opts. >> >> If you type /etc/init.d/varnish restart and you get Stopping Varnish >> Cache: [FAILED] this might be because your varnish daemon is not alive and >> cant be stopped :) >> >> You should also read http://book.varnish-software.com/4.0/ >> >> >> 2016-02-15 11:05 GMT+01:00 Mike Jones <[email protected]>: >> >>> The output of ‘bash -x /etc/init.d/varnish start’ is >>> http://pastebin.com/YiqFDgYJ >>> >>> vcl config from '/etc/varnish/default.vcl' is >>> http://pastebin.com/wEideMfC >>> >>> Output of 'netstat -tulpn and iptables -vnL' is >>> http://pastebin.com/n5TYJVH5 >>> >>> Thanks >>> >>> On Sat, Feb 13, 2016 at 7:33 PM, Tobias Honacker < >>> [email protected]> wrote: >>> >>>> Hi, >>>> >>>> please send the vcl config and the output of netstat -tulpn and >>>> iptables -vnL >>>> >>>> >>>> greetings >>>> >>>> 2016-02-13 17:56 GMT+01:00 Mike Jones <[email protected]>: >>>> >>>>> I have a 'WordPress basic single instance' from >>>>> http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-applications-us-west-1.html >>>>> >>>>> and my varnish file, located in /etc/sysconfig/varnish, looks like >>>>> >>>>> http://pastebin.com/hZNr6Apc >>>>> >>>>> While my httpd conf file, /etc/httpd/conf/httpd.conf, looks like >>>>> >>>>> http://pastebin.com/xeZs8KQq >>>>> >>>>> Running varnishstat looks like it's running but when visiting the >>>>> webserver through the browser the page fails to load. >>>>> >>>>> On Sat, Feb 13, 2016 at 4:15 PM, Brad Tarver <[email protected]> wrote: >>>>> >>>>>> 6082 is the admin port >>>>>> >>>>>> This is my config on ubuntu: http://pastebin.com/E3tQ1eC1 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Brad Tarver >>>>>> >>>>>> >>>>>> Mike Jones wrote: >>>>>> >>>>>> Yes, I was talking about the security group, I did open that but it >>>>>> didn't make any difference. >>>>>> >>>>>> With the settings previously mentioned I tried running curl on port >>>>>> 80 on I get >>>>>> >>>>>> curl: (7) Failed to connect to localhost port 80: Connection refused. >>>>>> >>>>>> On port 8080 I get the default apache page, but adding a directory >>>>>> after the port 'curl 127.0.0.1:8080/wordpress' I get an error saying >>>>>> the page has moved. >>>>>> >>>>>> On port 6082 I get 'Authentication required' >>>>>> >>>>>> >>>>>> On Sat, Feb 13, 2016 at 1:41 PM, Lee Trout <[email protected]> wrote: >>>>>> >>>>>>> > Do I need to open port 8080 too? >>>>>>> >>>>>>> Open it where? In a security group? You should make sure you have >>>>>>> port 80 open in your security group but that won't affect local host. >>>>>>> >>>>>>> You should try curling against the interfaces on the box from the >>>>>>> box itself and make sure it's actually sending info back locally. With >>>>>>> your >>>>>>> config I believe you should be able to curl local host on port 80 as >>>>>>> well >>>>>>> since you only specified a listening port. >>>>>>> >>>>>>> On Saturday, February 13, 2016, Mike Jones < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I have a single ec2 instance running and would like to install and >>>>>>>> configure Varnish for that aws instance >>>>>>>> >>>>>>>> I've changed the default settings for varnish - >>>>>>>> /etc/sysconfig/varnish >>>>>>>> >>>>>>>> DAEMON_OPTS="-a :80 \ >>>>>>>> -T localhost:6082 \ >>>>>>>> -b localhost:8080 \ >>>>>>>> -u varnish -g varnish \ >>>>>>>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>>>>>>> >>>>>>>> and configured httpd - /etc/httpd/conf/httpd.conf to listen on port >>>>>>>> 8080 >>>>>>>> >>>>>>>> But when I restart both services, the webpage fails to load. >>>>>>>> >>>>>>>> There's nothing in the error_log and when I tail -f the access_log >>>>>>>> nothing is logged when I refresh the page. >>>>>>>> Do I need to open port 8080 too? >>>>>>>> >>>>>>>> Are there any guides on how to configure Varnish for an aws >>>>>>>> instance? >>>>>>>> >>>>>>>> Thanks >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Sorry I fat thumbed this on an iPhone >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> varnish-misc mailing >>>>>> [email protected]https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>>>>> >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> varnish-misc mailing list >>>>> [email protected] >>>>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>>>> >>>> >>>> >>> >> >
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
