From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62441 Path: news.gmane.org!not-for-mail From: Henning Hraban Ramm Newsgroups: gmane.comp.tex.context Subject: Re: calling ConTeXt as a background process Date: Fri, 8 Oct 2010 10:00:43 +0200 Message-ID: <2932BD8B-6EC7-4D37-A816-467484051DE8@fiee.net> References: <4CAD8800.2010909@elvenkind.com> <4CAD8D8A.6040802@elvenkind.com> <5A1428AE-DA31-4120-9B35-102E7B42D8AC@fiee.net> <90F33E64-7BB9-4DEB-9E89-A4FC99169401@awi.de> <48470924-D44D-4010-B895-12EA664C4D90@fiee.net> <4CAE0E7B.4000307@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1286524858 10145 80.91.229.12 (8 Oct 2010 08:00:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Oct 2010 08:00:58 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 08 10:00:57 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P47sr-0002hE-BT for gctc-ntg-context-518@m.gmane.org; Fri, 08 Oct 2010 10:00:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1F2C8CA6E2; Fri, 8 Oct 2010 10:00:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YVNpr9KxYuTQ; Fri, 8 Oct 2010 10:00:50 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 808EDCA72B; Fri, 8 Oct 2010 10:00:50 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E52F9CA72F for ; Fri, 8 Oct 2010 10:00:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ewEYeFSGxG-w for ; Fri, 8 Oct 2010 10:00:47 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 54437CA72B for ; Fri, 8 Oct 2010 10:00:47 +0200 (CEST) Original-Received: from turan.fiee.net (turan.fiee.net [87.230.77.106]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9880kBZ013297 for ; Fri, 8 Oct 2010 10:00:46 +0200 X-No-Auth: unauthenticated sender Original-Received: from turan.fiee.net (lvps87-230-77-106.dedicated.hosteurope.de [127.0.0.1]) by turan.fiee.net (Postfix) with ESMTP id A6B112E14400A for ; Fri, 8 Oct 2010 10:00:45 +0200 (CEST) Original-Received: from [10.128.9.9] (199-149.76-83.cust.bluewin.ch [83.76.149.199]) by turan.fiee.net (Postfix) with ESMTP for ; Fri, 8 Oct 2010 10:00:45 +0200 (CEST) In-Reply-To: <4CAE0E7B.4000307@elvenkind.com> X-Mailer: Apple Mail (2.936) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=87.230.77.106; country=DE; region=07; city=Host; latitude=51.6500; longitude=6.1833; http://maps.google.com/maps?q=51.6500,6.1833&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05Dg80KQJ - 689d1e66b5a4 - 20101008 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.216 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:62441 Archived-At: Summary so far: * Machine: virtual server on Debian 5.0 (x86_64) (I thought it was Ubuntu, because I run that on my other Linux machines, sorry). * Webserver: Django 1.2/fcgi (Python 2.5) behind Nginx I can run ConTeXt without any problems from the shell, also as the same user that runs the server process. From the shell it doesn't matter if I call it as "context" (that's a shell script calling mtxrun), "mtxrun", other shell script or simple Python script. I want to run ConTeXt from the server process (at the end I want it to run via Celery/RabbitMQ, but that doesn't matter at the moment), but it hangs at the texlua process and doesn't do anything. - With an unmodified mtxrun that hangs at its external "uname" call (gets "defunct"); I patched it to just take "x86_64" instead of calling uname. - After that it doesn't matter how I call ConTeXt, it always hangs at texlua. - I tried os.system (that directly uses C's system call) and several variants of subprocess.Popen - I tried calling setuptex as well as setting PATH, TEXROOT and TEXMFOS for the environment of the process and checked that they exist in the call. - Calls of several linux tools via os.system or subprocess.Popen worked. I suspected SElinux settings, Taco hinted at AppArmor, but both aren't active, as far as I can tell. So, the problem is with the web server and texlua. Django/fcgi unfortunately swallows error messages (known problem of the fcgi mode). Next I'll try a different server setup. Unfortunately Apache with mod_wsgi or mod_python is too heavy for my virtual server (with Nginx I can run more that 5 Django sites, with Apache I had massive ressource problems with 3-4). Green Unicorn (http://gunicorn.org/) looks good for my purpose. Sorry for the OT thread, I suspected the problem being more in the LuaTeX area. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________