Installation

Hardcopies not working

Hardcopies not working

by Alex Jordan -
Number of replies: 5
We get the errors pasted below often when we try to create hard copies. I've observed that if I reboot the server, for a while I can get hard copies to be created, but soon enough I'll start getting these error messages again. Sometimes if I come back to it hours later then I can get a hardcopy, but not too many before the errors come back. Others have observed that if they try printing a hardcopy for a different user, then that sometimes works, but again not for long.

Does anyone have any insight as to why this would be happening? Could my server be capping how much latexing it will do in a given period for some reason?

Hardcopy Generator

 
 

4 errors occured while generating hardcopy:

  • Failed to convert TeX to PDF with command 'cd /opt/webwork/webwork2/htdocs/tmp/MTH095-model/hardcopy/work.0lSiOZe3 && /usr/bin/pdflatex --shell-escape >pdflatex.stdout 2>pdflatex.stderr hardcopy' (exit=72057594037927935 signal=127 core=128).
  • No TeX log was found.
  • Failed to rename 'hardcopy.pdf' to 'MTH095-model.alex.jordan.Section2_1.pdf' in directory '/opt/webwork/webwork2/htdocs/tmp/MTH095-model/hardcopy/work.0lSiOZe3':
  • Final hardcopy file '/opt/webwork/webwork2/htdocs/tmp/MTH095-model/hardcopy/work.0lSiOZe3/hardcopy.pdf' not found after calling 'generate_hardcopy_pdf': No such file or directory

WeBWorK was unable to generate a paper copy of this homework set. Please inform your instructor.


In reply to Alex Jordan

Re: Hardcopies not working

by Michael Gage -
You may find this helpful:


In particular by setting the PreserveTempFiles flag someone can 
go into the directory and see where in the process the latex creation failed.

The errors mean exactly what they say so  you can try to execute those 
commands one step at a time from the command line and see what works
and what doesn't.

I've never worked on a system where the number of latex processes was limited but I suppose that it's possible. 

I have seen similar cases such as this
where the problem was a full disk. 

Hope this helps. 

-- Mike

In reply to Michael Gage

Re: Hardcopies not working

by Alex Jordan -
My work.xxxxxxx folders are being created in
webwork2/htdocs/tmp/<course name>/hardcopy
not in each course's html/tmp/hardcopy folder, as that wiki link suggests. Could this be part of the problem?

In these folders for sets that fail to create a hard copy, hardcopy.tex exists, but not hardcopy.log, pdflatex.sterr, or pdlatex.stdout. The wiki author is not sure what would cause this :) For instances where the hard copy was successfully created, all of the files are there.

When I try to execute the command from the error message:
/usr/bin/pdflatex --shell-escape >pdflatex.stdout 2>pdflatex.stderr hardcopy
I get this message:
-bash: pdflatex.stdout: Permission denied
I get this message if I apply the same command to a different hardcopy.tex that had successfully compiled too. The file hardcopy.tex has these attributes:
-rw-r--r-- 1 www-data www-data 109025 Jan 5 15:05 hardcopy.tex
Do those look kosher? Each of the work.xxxxxx folders has attributes like this:
drwxr-xr-x 2 www-data wwdata 4096 Jan 5 15:05 work.2b9AgQad
With a different group; does that seem kosher?


In reply to Alex Jordan

Re: Hardcopies not working

by Michael Gage -
Using a different directory for tmp files is probably not the problem.  You are using the same convention we are at Rochester so it should be ok.

I think there is a permission problem somewhere or a disk full problem.

Remember that when you are using the website the server is executing the pdflatex command.

The best debugging strategy is to change users (use su ww-data ) to the user name for the server (ww-data?) and then try the commands from the command line.

I suspect the different group names do not make a difference since these files are meant to be accessed only by their owner.


In reply to Michael Gage

Re: Hardcopies not working

by Alex Jordan -
If it's a disk size issue, it's an odd one. I have moved where these temp files are created to /var/www/temp and the partition here has about 40 GB free.

If I go to the folder with one of these offending hardcopy.tex files and run
/usr/bin/pdflatex --shell-escape >pdflatex.stdout 2>pdflatex.stderr hardcopy
as myself, then I get the error message
-bash: pdflatex.stdout: Permission denied
If I switch to www-data, the owner of the file, and try the same command, the error message is
-su: 2: cannot create pdflatex.stdout: Permission denied
If I switch to root, the command seems to execute fine and all the output files are produced without issue (which also seems to go against the disk size theory.) I'm still quite new to Ubuntu and not sure what this could all mean.
In reply to Alex Jordan

Re: Hardcopies not working

by John Jones -
Why is one group www-data and the other wwdata?  Presumably, one is the group apache is using for the web server in which case the directory should be chown'ed to that group.  Then the permissions problem should be fixed.

John