[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20060104: CGI image generation with gpnexr2



Ben,

Your CGI will executed from a directory owned by your web server user
(possibly www, or nobody depending on your httpd.conf). The
"no space left on device" could be the reason the gemglb.nts file
can't be written to, or a file permission problem (unless the security
is preventing the www/nobody user from acessing IPC.

Your csh script should cd to a working directory that it has permission
to execute from, such as a temporary /tmp/.cgi_gpnexr2.$$ directory.
If you have run the script as a real user, it may create a directory
and gemglb.nts that the www user can't execute from. Using a
unique directory per cgi invocation will also avoid some stepping on 
the NTS files depending on how much work you are doing there.

I'd suggest using the gpnexr2_gif executable if you aren't doing
other overlays etc since it would avoid the need for a message queue,
which would prevent problems in the long run with large numbers of
processes kicking off at the same time (lots of students clicking
on the cgi in short time frame).

You should check your "ipcs" output as well to see if the failed
script has left message queues opened, and remove them if necessary.


If this doesn't help, can you send me your cgi csh and relevant OS information?

Steve Chiswell
Unidata User Support





>From: Ben Cotton <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200601042103.k04L3W7s023364

>I'm trying to develop a CGI script (written in perl) that will allow our 
>students to generate a Level II radar image, write some commentary about 
>it, and then generate an HTML file.  Everything is going well, except that 
>I can't get gpnexr2 to work from a CGI.  My perl CGI calls a csh script 
>that sets all of the environment variables and invokes gpnexr2 .  From the 
>shell, the script works fine, but from the CGI, it appears that the 
>message queue cannot be accessed.  Here is the output that 
>public-radar.cgi captured from my shell script...
>
>msgget: No space left on device
>msgget: No space left on device
>Error in message send = 22 itype, ichan, nwords,1,-1,2
>Error in message send = 22 itype, ichan, nwords,1,-1,1
>Error in message send = 22 itype, ichan, nwords,1,-1,3
>[GEMPLT -1] NMBRER - Mailbox read.
>[GPNEXR2 -3] Fatal error initializing GEMPLT.
>MAP Map color/dash/width/filter flag 1
>GAREA Graphics area #42.95;-78.74;2.5;2.8
>PROJ Map projection/angles/margins|dr RAD
>RADFIL Radar image filename(s)
>NEXRII|KBUF
>LATLON Line color/dash/width/freq/inc/l 0
>PANEL Panel loc/color/dash/width/regn 0
>TITLE Title color/line/title 1
>TEXT Size/fnt/wdth/brdr/N-rot/just/hw 1
>CLEAR Clear screen flag YES
>DEVICE Device|name|x size;y size|color gif|radar.tmp|540;540
>LUTFIL Enhancement lookup table filenam
>IMCBAR Color/ornt/anch/x;y/ln;wd/freq|t 1/v/lc/.05;.2/.6;.01
>TILT Radar beam elevation/tilt number 0.50
>RADPARM Radar parameter (dz, vr, sw) dz
>RADTIM Radar composite current/dattim 20060104/1926
>Parameters requested: MAP,GAREA,PROJ,RADFIL,LATLON,PANEL,TITLE,TEXT,CLEAR, 
>DEVICE,LUTFIL,IMCBAR,TILT,RADPARM,RADTIM.
>GEMPAK-GPNEXR2> GEMPAK-GPNEXR2> GEMPAK-GPNEXR2> GEMPAK-GPNEXR2> 
>GEMPAK-GPNEXR2> GEMPAK-GPNEXR2> GEMPAK-GPNEXR2> GEMPAK-GPNEXR2> 
>GEMPAK-GPNEXR2> GEMPAK-GPNEXR2>
>Error in message send = 22 itype, ichan, nwords,1,-1,3
>[IP -4] Error writing to GEMGLB.NTS.
>msgget: No space left on device
>Error in message send = 22 itype, ichan, nwords,1,-1,2
>msgget: No space left on device
>msgget: No space left on device
>Error in message send = 22 itype, ichan, nwords,1,-1,2
>Error in message send = 22 itype, ichan, nwords,1,-1,1
>Error in message send = 22 itype, ichan, nwords,1,-1,3
>[GEMPLT -1] NMBRER - Mailbox read.
>[GPEND -3] Fatal error initializing GEMPLT.
>[IP -4] Error writing to GEMGLB.NTS.
>Error in message send = 22 itype, ichan, nwords,1,-1,2
>
>
>The carriage returns are my own, I think they're properly placed.  The 
>directory that the csh script 'cd's to before doing anything else is 777, 
>so I'm not sure why it can't write to GEMGLB.NTS.
>
>
>Thanks,
>Ben Cotton
>
>==================
>Ben Cotton, KC9FYX
>LDM Administrator
>Dept of Earth & Atmos. Sci.
>Purdue University
>
>http://www.funnelfiasco.com
>
>O: (765) 49-40655
>C: (765) 586-8992
>
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.