Skip to content

Server does not start at boot. It does not start with service command either #921

Closed
Borkason opened this Issue Mar 24, 2013 · 4 comments

2 participants

@Borkason
Cherokee Project member

Original author: axelitus...@gmail.com (February 17, 2012 15:57:52)

What steps will reproduce the problem?
1. Install Cherokee Server
2. Install GitLabHQ (http://www.gitlabhq.com/)
3. Configure manually a VirtualServer and an InformationSource
4. Restart Server

What is the expected output? What do you see instead?
The server should autostart, but cherokee isn't started.

What version of the product are you using? On what operating system?
Cherokee Web Server 1.2.2

Please provide any additional information below.
The InformationSource is set as a Local Interpreter and the spawning command is the following: thin start -e production -a 127.0.0.1 -p 52390 -c /opt/gitlab/hq
This is set to run as the gitlab user account and the gitlab group

Starting the server through the command: sudo service cherokee start does not work. Running: /etc/init.d/cherokee start doesn't work either.

Starting the server through the cherokee-admin WebPage starts the server correctly and everything works fine. Even the process is spawned correctly. The server is just not started automatically on boot, nor does it start with the service command or running the init.d script

Original issue: http://code.google.com/p/cherokee/issues/detail?id=1342

@Borkason
Cherokee Project member

From axelitus...@gmail.com on February 17, 2012 16:26:27
It's strange thought because running:
sudo start-stop-daemon --start --oknodo --pidfile /var/run/cherokee.pid --exec /usr/sbin/cherokee -b (which is what the service actually does) from an account works fine once ubuntu is loaded.

I tried running this command from /etc/rc.local without luck.

The boot script though shows as trying to start Cherokee (The message Starting cherokee Web Server is displayed). It has something to do with the InformationSource, because without it the server starts with the service command and automatically on boot without a problem.

Here's my server config:
config!version = 001002002
server!bind!1!port = 80
server!collector = rrd
server!group = www-data
server!keepalive = 1
server!keepalive_max_requests = 500
server!panic_action = /usr/share/cherokee/cherokee-panic
server!pid_file = /var/run/cherokee.pid
server!server_tokens = full
server!timeout = 15
server!user = www-data
vserver!1!collector!enabled = 1
vserver!1!directory_index = index.html
vserver!1!document_root = /var/www
vserver!1!error_writer!filename = /var/log/cherokee/cherokee.error
vserver!1!error_writer!type = file
vserver!1!logger = combined
vserver!1!logger!access!buffsize = 16384
vserver!1!logger!access!filename = /var/log/cherokee/cherokee.access
vserver!1!logger!access!type = file
vserver!1!nick = default
vserver!1!rule!5!encoder!gzip = allow
vserver!1!rule!5!handler = server_info
vserver!1!rule!5!handler!type = just_about
vserver!1!rule!5!match = directory
vserver!1!rule!5!match!directory = /about
vserver!1!rule!4!document_root = /usr/lib/cgi-bin
vserver!1!rule!4!handler = cgi
vserver!1!rule!4!match = directory
vserver!1!rule!4!match!directory = /cgi-bin
vserver!1!rule!3!document_root = /usr/share/cherokee/themes
vserver!1!rule!3!handler = file
vserver!1!rule!3!match = directory
vserver!1!rule!3!match!directory = /cherokee_themes
vserver!1!rule!2!document_root = /usr/share/cherokee/icons
vserver!1!rule!2!handler = file
vserver!1!rule!2!match = directory
vserver!1!rule!2!match!directory = /icons
vserver!1!rule!1!handler = common
vserver!1!rule!1!handler!iocache = 1
vserver!1!rule!1!match = default
vserver!2!directory_index = index.html
vserver!2!disabled = 1
vserver!2!document_root = /opt/gitlab/hq/public
vserver!2!error_writer!filename = /var/log/cherokee/gitlab.error
vserver!2!error_writer!type = file
vserver!2!logger = combined
vserver!2!logger!access!filename = /var/log/cherokee/gitlab.access
vserver!2!logger!access!type = file
vserver!2!match = wildcard
vserver!2!match!domain!1 = git.server.domain.com.mx
vserver!2!nick = gitlab
vserver!2!rule!3!document_root = /usr/share/cherokee/themes
vserver!2!rule!3!handler = file
vserver!2!rule!3!match = directory
vserver!2!rule!3!match!directory = /cherokee_themes
vserver!2!rule!2!document_root = /usr/share/cherokee/icons
vserver!2!rule!2!handler = file
vserver!2!rule!2!match = directory
vserver!2!rule!2!match!directory = /icons
vserver!2!rule!1!handler = proxy
vserver!2!rule!1!handler!balancer = round_robin
vserver!2!rule!1!handler!balancer!source!10 = 1
vserver!2!rule!1!match = default
source!1!env_inherited = 1
source!1!group = gitlab
source!1!host = 127.0.0.1:52390
source!1!interpreter = thin start -e production -a 127.0.0.1 -p 52390 -c /opt/gi
tlab/hq
source!1!nick = gitlab
source!1!type = interpreter
source!1!user = gitlab

Any ideas?

@Borkason
Cherokee Project member

From ndudenho...@gmail.com on March 19, 2012 14:15:13
I have this same issue on ubuntu 10.04.

This appears to be an ubuntu issue, not a cherokee issue.
The issue is resolved by editing the startup script as follows:
NAME=cherokee
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/lib/cherokee
#​DAEMON=%sbindir%/cherokee
DAEMON=/usr/sbin/cherokee
#​PIDFILE=%localstatedir%/run/$NAME.pid
PIDFILE=/var/run/cherokee.pid
#​CONF=%sysconfdir%/cherokee/cherokee.conf
CONF=/etc/cherokee/cherokee.conf

@skinkie
Cherokee Project member
skinkie commented Mar 29, 2013

I would suggest to report this issue at Ubuntu, if it is still an issue in 12.10.

@skinkie skinkie closed this Mar 29, 2013
@Borkason
Cherokee Project member

labeled wontfix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.