[imps] validator front end not talking to servlet

Martin Sharratt Martin.Sharratt at uwe.ac.uk
Tue Apr 24 03:44:43 PDT 2012


Hi Andrei

After building the validator, I remember having problems running it as it seemed to be tied to the terminal process and died as soon as I tried to do something else.  I created an script to run the validator in the background and eventually converted it to a startup script.  This seems to work ok - at least I've had no complaints and it's been up and running since December.  This is on a Debian 6.0 box.    The startup script is copied below.  I can't for the life of me remember where I got the java parameters but suspect this command line is generated by build.py.  If you want to copy the script, you should note that from nohup to the 2>&1 is all one line.


Martin S

#!/bin/bash

### BEGIN INIT INFO
# Provides:        validator.nu
# Required-Start:   $network $remote_fs $syslog $named
# Required-Stop:   $network $remote_fs $syslog $named
# Default-Start:   2 3 4 5
# Default-Stop:
# Short-Description: HTML5 validation add-in to W3c validator
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin
cd /usr/local/checker
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
nohup java -XX:-DontCompileHugeMethods -Xms131072k -Xmx131072k -XX:ThreadStackSize=2048 -classpath ./dependencies/commons-codec-1.4/commons-codec-1.4.jar:./dependencies/commons-httpclient-3.1/commons-httpclient-3.1.jar:./dependencies/commons-logging-1.1.1/commons-logging-1.1.1.jar:./dependencies/commons-logging-1.1.1/commons-logging-adapters-1.1.1.jar:./dependencies/commons-logging-1.1.1/commons-logging-api-1.1.1.jar:./dependencies/icu4j-charsets-4_4_2.jar:./dependencies/icu4j-4_4_2.jar:./dependencies/iri-0.5/lib/iri.jar:./dependencies/jetty-6.1.26/lib/servlet-api-2.5-20081211.jar:./dependencies/jetty-6.1.26/lib/jetty-6.1.26.jar:./dependencies/jetty-6.1.26/lib/jetty-util-6.1.26.jar:./dependencies/jetty-6.1.26/lib/ext/jetty-ajp-6.1.26.jar:./dependencies/apache-log4j-1.2.15/log4j-1.2.15.jar:./dependencies/rhino1_7R1/js.jar:./dependencies/xerces-2_9_1/xercesImpl.jar:./dependencies/xerces-2_9_1/xml-apis.jar:./dependencies/slf4j-1.5.2/slf4j-log4j12-1.5.2.jar:./dependencies/commons-fileupload-1.2.1/lib/commons-fileupload-1.2.1.jar:./dependencies/isorelax.jar:./dependencies/mozilla/intl/chardet/java/dist/lib/chardet.jar:./dependencies/saxon9.jar:./jars/non-schema.jar:./jars/io-xml-util.jar:./jars/htmlparser.jar:./jars/hs-aelfred2.jar:./jars/html5-datatypes.jar:./jars/validator.jar:jing-trang/build/jing.jar -Dnu.validator.servlet.log4j-properties=validator/log4j.properties -Dnu.validator.servlet.version=3 -Dnu.validator.servlet.service-name=Validator.nu -Dorg.whattf.datatype.lang-registry=http://www.iana.org/assignments/language-subtag-registry -Dorg.whattf.datatype.charset-registry=http://www.iana.org/assignments/character-sets -Dorg.whattf.datatype.warn=true -Dnu.validator.servlet.about-page=http://about.validator.nu/ -Dnu.validator.servlet.style-sheet=http://about.validator.nu/style.css -Dnu.validator.servlet.icon=http://about.validator.nu/icon.png -Dnu.validator.servlet.script=http://about.validator.nu/script.js -Dnu.validator.spec.microsyntax-descriptions=http://wiki.whatwg.org/wiki/MicrosyntaxDescriptions -Dnu.validator.spec.alt-advice=http://wiki.whatwg.org/wiki/Validator.nu_alt_advice -Dnu.validator.spec.html5-load=file:validator/spec/html5.html -Dnu.validator.spec.html5-link=http://www.whatwg.org/specs/web-apps/current-work/ -Dnu.validator.servlet.max-file-size=7340032 -Dnu.validator.servlet.connection-timeout=5000 -Dnu.validator.servlet.socket-timeout=5000 -Dorg.mortbay.http.HttpRequest.maxFormContentSize=7340032 -Dnu.validator.servlet.host.generic= -Dnu.validator.servlet.host.html5= -Dnu.validator.servlet.host.parsetree= -Dnu.validator.servlet.path.generic=/ -Dnu.validator.servlet.path.html5=/html5/ -Dnu.validator.servlet.path.parsetree=/parsetree/ nu.validator.servlet.Main 8888 >> logs/log.txt 2>&1

.


From: implementors-bounces at lists.whatwg.org [mailto:implementors-bounces at lists.whatwg.org] On Behalf Of Rancid Iodine
Sent: 19 April 2012 12:20
To: Michael[tm] Smith
Cc: implementors at lists.whatwg.org
Subject: Re: [imps] validator front end not talking to servlet

Some progress.

The tcpdump/wireshark traffic capture didn't help, but I tried a few different variations in the whole procedure and long story short here's the result:

http requests will hang if

1 - you build/run the servlet in background

2 - you build/run the servlet it in a screen session

or

3 - you build/run the servlet from a script, as I did from /etc/rc.local

In order to maintain a "service" with this, one needs to build/run the servlet in a console so it's completely hooked into the parent (terminal) process for some reason, and this is what I'm doing now (from a console in our vmware vcenter). Some people would call it an ugly solution, but that would be their problem :). You'd think there's something fairly basic one could do from the linux perspective to get around this, but I'm not sure what it is, never having come across this before.

One final question: is there any provision for the use of a network proxy, thus to enable validation outside of a firewall? Nothing obvious comes up in http://about.validator.nu , and it's no big issue considering we are more interested in being able to validate html5 inside the firewall, but I ask just in case we can have our cake and eat it too.

Thanks again for all your help.

Andrei
On 18 April 2012 21:58, Michael[tm] Smith <mike at w3.org<mailto:mike at w3.org>> wrote:
Rancid Iodine <rancid.iodine at gmail.com<mailto:rancid.iodine at gmail.com>>, 2012-04-18 17:22 +0100:

> I made the changes to log4j.properties which you suggested and restarted
> the servlet. Output looks like this:
> [...]
> Is there any obvious problem in any of that?
No, sorry. I have no idea at all what might be the cause for it no responding.

 --Mike


--
Michael[tm] Smith http://people.w3.org/mike

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/implementors-whatwg.org/attachments/20120424/363e76af/attachment-0002.htm>


More information about the Implementors mailing list