From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62414 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: Thu, 7 Oct 2010 09:34:06 +0200 Message-ID: References: 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 1286436871 29883 80.91.229.12 (7 Oct 2010 07:34:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Oct 2010 07:34:31 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 07 09:34:28 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 1P3kzj-0005zz-C9 for gctc-ntg-context-518@m.gmane.org; Thu, 07 Oct 2010 09:34:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D4DCDCA728; Thu, 7 Oct 2010 09:34:26 +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 Dz2kkEV7zdEq; Thu, 7 Oct 2010 09:34:23 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 25272CA70D; Thu, 7 Oct 2010 09:34:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6D089CA70D for ; Thu, 7 Oct 2010 09:34:21 +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 Yopqrky-ba6n for ; Thu, 7 Oct 2010 09:34:09 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 7408CCA709 for ; Thu, 7 Oct 2010 09:34:09 +0200 (CEST) Original-Received: from turan.fiee.net (turan.fiee.net [87.230.77.106]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o977Y81Q026443 for ; Thu, 7 Oct 2010 09:34:08 +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 22F0F35D4402A for ; Thu, 7 Oct 2010 09:34:08 +0200 (CEST) Original-Received: from [10.128.9.9] (89-117.77-83.cust.bluewin.ch [83.77.117.89]) by turan.fiee.net (Postfix) with ESMTP for ; Thu, 7 Oct 2010 09:34:07 +0200 (CEST) In-Reply-To: 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: 0rDfHy8Lz - 519533b27333 - 20101007 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:62414 Archived-At: Am 2010-10-07 um 09:06 schrieb Henning Hraban Ramm: > Hi together! > > I'm trying since about a week to get ConTeXt running as a background > process of a web application. > It's always hanging, and I get no log. > > "ps axef" shows the call stack: > > \_ /var/www/xxx/bin/python /var/www/xxx/releases/current/cerebrale/ > manage.py runfcgi method=threaded ... > \_ /bin/sh -c cd /var/www/xxx/_textemp && /var/opt/context/tex/ > texmf-linux-64/bin/context ... > \_ /bin/sh /var/opt/context/tex/texmf-linux-64/bin/context -- > purgeall --batchmode --result=/var/www/xxx/_textemp/xxx.pdf > \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun > --script context --purgeall --batchmode --result=/ ... > \_ [uname] > > I.e. it looks like texlua calls uname in a way that lets the process > hang forever. > If I call the same from an active shell everything runs fine. Also > uname alone works in the shell command. > Any ideas what I could/should check? > > I don't think it could be the PATH, since ConTeXt's bin as well as > all the system tools are in: > PATH=/var/opt/context/tex/texmf-linux-64/bin:/var/www/cerebrale/bin:/ > command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/ > sbin:/usr/X11R6/bin > TEXMFOS=/var/opt/context/tex/texmf-linux-64 > TEXROOT=/var/opt/context/tex > > The user that runs the server process (incl. sub-shell and ConTeXt) > owns all the TeX files and the directory. > > Maybe it's a Python problem, here's my call: > subprocess.Popen(cmd.encode('utf-8'), shell=True, stderr=logfile, > stdout=logfile) > > But I can call several other commands in this way without problems. > The whole thing (incl. ConTeXt) works on my Mac (OSX 10.5.8) at home. > Everything I call before ConTeXt shows up in the logfile. I tried to call mtxrun directly and replaced the calls to uname -m with their return value (x86_64). Now the texlua process itself hangs, even if not "defunct" it doesn't do anything: \_ /var/www/xxx/bin/python /var/www/xxx/releases/current/cerebrale/ manage.py runfcgi method=threaded ... \_ /bin/sh -c cd /var/www/xxx/_textemp && mtxrun --script context "prd_paket --batchmode --once" PATH=/var/opt/context/tex/texmf- linux-64/bin:/var/www/xxx/bin:... \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun -- script context prd_paket --batchmode --once TEXMFOS=/var/opt/context/ tex/texmf-linux-64 VIRTUAL_ENV=/var/www/xxx PATH=/var/opt/context/tex/ texmf-linux-64/bin:... Help? 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 ___________________________________________________________________________________