Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Jan 08, 2011 7:35 pm 
Offline
Senior Member

Joined: Tue Sep 28, 2010 12:05 pm
Posts: 90
Website: http://www.theatereleven.com
AOL: theatereleven
Location: Santa Monica, CA
I've installed Mercury on Debian per the Linode library document. Works great (love their documentation). Just have one small problem: my new drupal site will not answer on port 80. It only will answer on port 9880 which means something with my Pressflow/Varnish configuration isn't working right? Below are my files:

hostname:
indiestudio-s2

hosts:
127.0.0.1 localhost
173.255.213.31 indiestudio-s2
173.255.213.31 indiewriterdirectory.com indiestudio-s2
173.255.213.31 www.indiewriterdirectory.com

ports:
NameVirtualHost 173.255.213.31:9880
Listen 9880

<IfModule mod_ssl.c>
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
Listen 443
</IfModule>

/etc/default/varnish
instance=pressflow

DAEMON_OPTS="-a :80 \
-T localhost:6082 \
-b localhost:9880 \
-f /etc/varnish/pressflow.vcl \
-S /etc/varnish/secret \
-u varnish -g varnish \
-s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,250MB"

/etc/varnish/pressflow.vcl
backend default {
.host = "127.0.0.1";
.port = "9880";
.connect_timeout = 600s;
.first_byte_timeout = 600s;
.between_bytes_timeout = 600s;
}


If anyone can give me a heads up as to what I'm not configuring correctly that would be AWESOME.

_________________
kyler d. boudreau
theatereleven.com


Last edited by theatereleven on Sun Jan 09, 2011 4:34 pm, edited 1 time in total.

Top
   
 Post subject: Anyone on this?
PostPosted: Sat Jan 08, 2011 10:02 pm 
Offline
Senior Member

Joined: Tue Sep 28, 2010 12:05 pm
Posts: 90
Website: http://www.theatereleven.com
AOL: theatereleven
Location: Santa Monica, CA
I reinstalled from scratch after not getting something to work but still having the above problem. Any help appreciated. THANKS.

_________________
kyler d. boudreau

theatereleven.com


Last edited by theatereleven on Mon Jan 10, 2011 10:31 am, edited 2 times in total.

Top
   
 Post subject: still need help...
PostPosted: Sun Jan 09, 2011 2:18 pm 
Offline
Senior Member

Joined: Tue Sep 28, 2010 12:05 pm
Posts: 90
Website: http://www.theatereleven.com
AOL: theatereleven
Location: Santa Monica, CA
help anyone....if you need more of my configs I'll paste them in.

how do I know if varnish is even working? i know pressflow is working to some extent because when i go to my new site at http://my-site.com:9880 the drupal login screen has a search field that isn't usually there.

drupal seems to be acting completely normal except that i cannot access at port 80.

_________________
kyler d. boudreau

theatereleven.com


Top
   
 Post subject:
PostPosted: Wed Jan 12, 2011 12:55 pm 
Offline
Senior Member

Joined: Tue Sep 28, 2010 12:05 pm
Posts: 90
Website: http://www.theatereleven.com
AOL: theatereleven
Location: Santa Monica, CA
Anyone on this? I continue to access the new site via port 9880. But port 80 will not serve anything up.

_________________
kyler d. boudreau

theatereleven.com


Top
   
PostPosted: Wed Jan 12, 2011 1:05 pm 
Offline
Junior Member
User avatar

Joined: Thu Apr 23, 2009 2:32 am
Posts: 41
Website: http://www.linode.com/
Could you please provide the Apache virtualhost configuration (from /etc/apache/sites-available) for your site?


Top
   
 Post subject:
PostPosted: Wed Jan 12, 2011 2:53 pm 
Offline
Senior Member

Joined: Tue Sep 28, 2010 12:05 pm
Posts: 90
Website: http://www.theatereleven.com
AOL: theatereleven
Location: Santa Monica, CA
Hey thanks! Here it is...

<VirtualHost *:9880>
ServerName indiewriterdirectory.com
ServerAlias www.indiewriterdirectory.com
ServerAdmin admin@indiestudiofilms.com
DocumentRoot /srv/www/indie-studio
ErrorLog /srv/www/indie-studio/logs/error.log
CustomLog /srv/www/indie-studio/logs/access.log combined
</VirtualHost>

I had the exact IP named in this and the ports.conf files, but just changed to an asterisk trying to troubleshoot. The site answers to the above DNS names IF the port 9880 is appended.

Current ports.conf...

NameVirtualHost *:9880
Listen 9880

<IfModule mod_ssl.c>
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
Listen 443
</IfModule>

_________________
kyler d. boudreau

theatereleven.com


Last edited by theatereleven on Wed Jan 12, 2011 3:11 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Wed Jan 12, 2011 3:11 pm 
Offline
Senior Member

Joined: Tue Sep 28, 2010 12:05 pm
Posts: 90
Website: http://www.theatereleven.com
AOL: theatereleven
Location: Santa Monica, CA
If this helps...

When i try and restart varnish with /etc/init.d/varnish restart i get:

Starting HTTP accelerator: varnishd failed! /usr/sbin/varnishd: invalid option -- S usage: varnishd [options]

And in my Drupal it is saying:

Warning: socket_connect() [<a href='function.socket-connect'>function.socket-connect</a>]: unable to connect [111]: Connection refused in _varnish_terminal_run() (line 197 of /srv/www/indie-studio/sites/all/modules/varnish/varnish.module).

_________________
kyler d. boudreau

theatereleven.com


Top
   
 Post subject:
PostPosted: Wed Jan 12, 2011 4:44 pm 
Offline
Senior Member

Joined: Tue Sep 28, 2010 12:05 pm
Posts: 90
Website: http://www.theatereleven.com
AOL: theatereleven
Location: Santa Monica, CA
Update:

Have moved ahead a little bit - Linode pointed out that there needed to be a folder created per the error message above. I created the folder and then Varnish didn't like the DAEMON OPTS switches. Removed the -b switch. Now restarting varnish produces:

Stopping HTTP accelerator: varnishd failed!
Starting HTTP accelerator: varnishd failed!
Expected ID got '.'
(program line 92), at
(/etc/varnish/pressflow.vcl Line 8 Pos 1)
.host = "127.0.0.1";

Line eight is the host line from below:

backend default {
.host = "127.0.0.1";
.port = "9880";
.connect_timeout = 600s;
.first_byte_timeout = 600s;
.between_bytes_timeout = 600s;
.max_connections = 800;
}

But everywhere online I check this is right. Very puzzled.

_________________
kyler d. boudreau

theatereleven.com


Top
   
 Post subject: Finally fixed...
PostPosted: Wed Jan 12, 2011 5:07 pm 
Offline
Senior Member

Joined: Tue Sep 28, 2010 12:05 pm
Posts: 90
Website: http://www.theatereleven.com
AOL: theatereleven
Location: Santa Monica, CA
Before continuing, I LOVE the Linode docs so this isn't a slam in any way. Linode staff helped me troubleshoot.

1) I had to create the /usr/bin/varnishd folder. It didn't exist.

2) I think the sample /etc/default/varnish file in the doc is off. It shows the below configuration:

DAEMON_OPTS="-a :80 \
-T localhost:6082 \
-b localhost:9880 \
-f /etc/varnish/pressflow.vcl \
-S /etc/varnish/secret \
-s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,135MB"

However varnish griped at me and said only -b or -f could be used. Not both. So I used -f.

3) Then varnish didn't like the sample pressflow.vcl. Had to strip it down to this for varnish to even load:

# If you're running a single site on a server, or else want all sites
# on a server to go through Varnish you'd only need one of the following backends.
# Showing different possibilities for those who have sites that they
# don't want to run Varnish on. In this example file, Varnish is assumed to
# be running on port 80, and Apache (or whatever) on port 8080.

backend default {
set backend.host = "127.0.0.1";
set backend.port = "9880";
}

sub vcl_hash {
if (req.http.Cookie) {
set req.hash += req.http.Cookie;
}
}



*Note that this uses "set backend.host" as opposed to just ".host". Varnish didn't like .host amongst other things. So I'll have to research ideal vcl settings for pressflow sites. If anyone has any post them!

All the linode doc steps were good, but the missing folder and configuration files were getting me. Not sure if varnish versions changed or what as I'm new to this.

_________________
kyler d. boudreau

theatereleven.com


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group