Page MenuHomePhabricator

webservice does not start
Closed, ResolvedPublic

Description

http://tools.wmflabs.org/url-converter/index.cgi takes much time to load (several minutes) and sometimes just gives server errors.
The same problem occurs at http://tools.wmflabs.org/searchsbl/.

The problem seems to be that the webservice is not started correctly.

"webservice start" says
Starting webservice... started.

"webservice status" then says
Your webservice is scheduled:

queue instance "task@tools-exec-05.pmtpa.wmflabs" dropped because it is temporarily not available

repeating "webservice status" after one minute says
Your webservice is not running.

At Cloud-Services I got a hint to use
qsub -e ~/error.log -o ~/error.log -i /dev/null -q webgrid -l h_vmem=4g -b y -N "httpd-url-converter" /usr/local/bin/tool-lighttpd >/dev/null 2>&1

but that leads to (via qstat)

1961692 0.00000 httpd-url- local-url-co qw 12/24/2013 09:56:05 1

then after some seconds to

1961692 0.25000 httpd-url- local-url-co r 12/24/2013 09:56:16 webgrid@tools-webgrid-01.pmtpa 1

and finally the job dies.

error.log says:

(log.c.166) server started
(log.c.118) opening errorlog '/data/project/url-converter/access.log' failed: Permission denied
(server.c.938) Configuration of plugins failed. Going down.

the rights for access.log are

-rw-r----- 1 root local-url-converter 10985 Dec 24 09:53 access.log

Version: unspecified
Severity: normal

Details

Reference
bz58931

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:24 AM
bzimport added a project: Toolforge.
bzimport set Reference to bz58931.

You have a leftover access.log from the default apache config. You can fix your issue by simply doing:

rm access.log

And starting your webservice again.

This should probably be in a FAQ somewhere.

That's kind of strange (at least for me):

http://tools.wmflabs.org/searchsbl/ is running again, although I changed nothing. There's still no webservice running for that tool and its access.log still has the rights mentioned in my first post. But the tool works.

However I did what you said at the other tool (url-converter), although it was running now, too:
I commanded 'rm access.log' and 'webservice restart' to start the webservice. After that http://tools.wmflabs.org/url-converter/ was not reachable. But when I stopped the webservice, the tool worked again.

(Both tools are cgi-scripts written in perl, but I don't know if that's relevant for this ticket.)

It may be (relevant). Lighttpd doesn't handle /cgi-bin/ by default the same way apache does; you need to ask it do to so explicitly with a configuration stanza.

Look at the last section of

https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help/NewWeb

Where that is explained with an example.

ok, so if it works now (without explicit cgi-handling and without a running webservice), what does that mean? Does it mean that the tool does not use Lighttpd, but apache?

Is it ok, to let the tool run without a Lighttpd webservice?

(In reply to seth from comment #4)

ok, so if it works now (without explicit cgi-handling and without a running
webservice), what does that mean? Does it mean that the tool does not use
Lighttpd, but apache?

If there's no webservice running, the tool uses Apache.

Is it ok, to let the tool run without a Lighttpd webservice?

That will stop working soon, as part of the move to the new data center (cf. [[wikitech:Tool Labs/Migration to eqiad]]) will be that Apache is removed completely and only lighttpd ("webservice") will be available. So you should make sure that your tool runs with lighttpd.

I set up searchsbl as per [[de:Benutzer Diskussion:Lustiger seth#Your searchsbl tool at Labs]].