webMathematica problems if using Xvnc
- To: mathgroup at smc.vnet.net
- Subject: [mg62434] webMathematica problems if using Xvnc
- From: Dave <INVALID.See-signature-for-how-to-determine at southminister-branch-line.org.uk>
- Date: Thu, 24 Nov 2005 06:33:31 -0500 (EST)
- Reply-to: Nov-2005 at southminister-branch-line.org.uk
- Sender: owner-wri-mathgroup at wolfram.com
Sorry this is a bit long, but I can't really make it shorter. Any help appreciated. I'm trying to run webMathematica on a Sun UNIX box, but are having a problem in that the only way I can use it requires a user logged in all the time on the console. Otherwise I get a "HTTP Status 500 - webMathematica timeout error." If I think about this, I can't understand how it can possibly work, since I believe there is no way for Mathematica to connect to the Xvnc without a password, and there is nowhere where the startup script has the password. The docs don't mention a password (other than say set one) so perhaps I am wrong. I'm using: Solaris 9 on a Sun Ultra 80, 360 MHz, 512 MB RAM. Mathematica 5.2 webMathematica 2.1 Tomcat 5.5.12 Xvnc Free Edition 4.1.1 (Despite I have installed this user /usr/local/apache2, it is not currently using Apache at all). I have created a user 'tomcat' under which I want to run Tomcat. I can get webMathematica working fine, with graphs etc, but ONLY if a) I don't use Xvnc b) Log into the console as user 'tomcat'. c) Run Tomcat as user tomcat. d) Run xhoost +localhost on the machine with the webMathematica, Mathematica and Tomcat. e) Don't mind the console being tied up with user 'tomcat' logged in. I'd like if possible to avoid this and use Xvnc as detailed in the documentation. http://documents.wolfram.com/webmathematica/v2/index_2_4.html I want to test by viewing on my main workstation 'sparrow'. This is what I am doing, which does *not* work. 1) From the workstation 'sparrow' I log onto the machine main-webserver, where Mathematica, Tomcat and webMathematica all run from. I log is as the user who will run Tomcat. sparrow /export/home/drkirkby % ssh -l tomcat main-webserver tomcat@main-webserver's password: 2) Next I start vncserver on the host "web-server", as a user 'tomcat' main-webserver /usr/local/apache2/apache-tomcat-5.5.12 $ vncserver New 'main-webserver:1 (tomcat)' desktop is main-webserver:1 Starting applications specified in /usr/local/apache2/apache-tomcat-5.5.12/.vnc/xstartup (SHOULD THAT START MATHEMATICA ???) Log file is /usr/local/apache2/apache-tomcat-5.5.12/.vnc/main-webserver:1.log 3) Next I start Tomcat on the machine main-webserver. Since I am logged in as user 'tomcat', it clearly starts as that user. main-webserver /usr/local/apache2/apache-tomcat-5.5.12 $ bin/startup.sh Using CATALINA_BASE: /usr/local/apache2/apache-tomcat-5.5.12 Using CATALINA_HOME: /usr/local/apache2/apache-tomcat-5.5.12 Using CATALINA_TMPDIR: /usr/local/apache2/apache-tomcat-5.5.12/temp Using JRE_HOME: /usr/java 4) At this point, the only webMathematica examples that will run are those that probably do not connect to the X server (Hello.html, Expand.html and a couple more). Others such as those that generate graphs, or even Integrate.html, which typesets output, generates a Timeout. But how is Mathematica supposed to connect to Xvnc unless it knows the password I entered? Anyway, it fails to work. 5) If I try to connect to the host "main-webserver" via Xvnc from the original workstation (sparrow) it works fine, so Xvnc is working. 6) Here is my MSP.conf file: KernelNumber=1 KernelAcquireLimit=2000 KernelTimeLimit=30000 MathLinkArguments.Windows=-linkname 'C:\\Program Files\\Wolfram Research\\Mathematica\\5.0\\MathKernel.exe -mathlink' -linkmode launch MathLinkArguments.Unix=-linkname 'math -mathlink' -linkmode launch MathLinkArguments.MacOSX=-linkname '"/Applications/Mathematica 5.0.app/Contents/MacOS/MathKernel" -mathlink' -linkmode launch MathLinkArguments=-linkname '/usr/local/bin/math -mathlink' -linkmode launch FrontEndLaunchCommand=mathematica -mathlink -display main-webserver:1 -nogui -geometry 1000x500+10+10 VerboseLogs=true StaticFileExtensions=gif:image/gif,jpg:image/jpeg,jpeg:image/jpeg 7) Here is some of the Tomcat's logs, with verbose logs eneabled. INFO: MSP: ************* Start Initializing Kernel 0 ************* Nov 23, 2005 4:56:43 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: MSPDirectory /usr/local/apache2/apache-tomcat-5.5.12/webapps/webMathematica/WEB-INF/MSPScripts Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: Mathlet Timeout 30000/1050. Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: Setting Security Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: No security file Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: AllowedContexts {Global`} Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: DisallowedContexts MSP`Utility`DisallowedContexts Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: AllowedSymbols HoldComplete[Plus, Times, Power, Sqrt, Log, Exp, HoldComplete, Infinity, Pi, E, Degree, > GoldenRatio, Catalan, EulerGamma, OutputForm, StandardForm, List, Sin, Cos, Tan, Sec, Csc, Cot, <snip - more Mathematica functions listed> > DiracDelta, UnitStep, DiscreteDelta, KroneckerDelta, Identity, Function, Slot, GrayLevel, Hue, > RGBColor, CMYKColor, Automatic, None, All, Null, O, C] Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: DisallowedSymbols MSP`Utility`DisallowedSymbols Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: Verbose Logs true Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: FrontEndLaunchCommand mathematica -mathlink -display main-webserver:1 -nogui -geometry 1000x500+10+10 Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: FrontEndGraphics = True Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: MSP`Utility`CheckToExpression = True Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Kernel 0: ImageAltText = Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Init Kernel 0: Enabling Servlet References Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: ************* End Initializing Kernel 0 ************* Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: General KernelData0:: Adding Message Listener Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Custom tag:: this evaluation is being aborted. Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Custom tag:: allocate_kernel (end tag) Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: Setting error 500 due to webMathematica timeout error. Nov 23, 2005 4:56:44 PM org.apache.catalina.core.ApplicationContext log INFO: MSP: General KernelPool::Kernel 0 returned -- Dave K http://www.southminster-branch-line.org.uk/ Please note my email address changes periodically to avoid spam. It is always of the form: month-year@domain. Hitting reply will work for a couple of months only. Later set it manually. The month is always written in 3 letters (e.g. Jan, not January etc)