Cron Problem

Cron Problem

by Michael B -
Number of replies: 12

Hello,


I've been getting error mails from my Server that look like this:


Subj.: Cron <root@server> /usr/bin/php  /var/www/clients/client1/web1/web/moodle/admin/cli/cron.php >/dev/null

Message: 

  **** Warning: can't process font stream, loading font by the name.
  **** Error reading a content stream. The page may be incomplete.
  **** Warning: Form stream has unbalanced q/Q operators (too many q's)
  **** File did not complete the page properly and may be damaged.

  **** This file had errors that were repaired or ignored.
  **** The file was produced by: 
  **** >>>> TCPDF 6.2.12 (http://www.tcpdf.org) <<<<
  **** Please notify the author of the software that produced this
  **** file that it does not conform to Adobe's published PDF
  **** specification.

  **** Warning: can't process font stream, loading font by the name.
  **** Error reading a content stream. The page may be incomplete.
  **** Warning: Form stream has unbalanced q/Q operators (too many q's)
  **** File did not complete the page properly and may be damaged.

  **** This file had errors that were repaired or ignored.
  **** The file was produced by: 
  **** >>>> TCPDF 6.2.12 (http://www.tcpdf.org) <<<<
  **** Please notify the author of the software that produced this
  **** file that it does not conform to Adobe's published PDF
  **** specification.


That message was one I just got at like ~10 minutes before posting this. I have also had some that look like this:


**** Warning:  File has an invalid xref entry:  2.  Rebuilding xref table.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.

  **** This file had errors that were repaired or ignored.
  **** The file was produced by: 
  **** >>>>  <<<<
  **** Please notify the author of the software that produced this
  **** file that it does not conform to Adobe's published PDF
  **** specification.

  **** Warning:  File has an invalid xref entry:  2.  Rebuilding xref table.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.

  **** This file had errors that were repaired or ignored.
  **** The file was produced by: 
  **** >>>>  <<<<
  **** Please notify the author of the software that produced this
  **** file that it does not conform to Adobe's published PDF
  **** specification.

  **** Warning:  File has an invalid xref entry:  2.  Rebuilding xref table.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.

  **** This file had errors that were repaired or ignored.
  **** The file was produced by: 
  **** >>>>  <<<<
  **** Please notify the author of the software that produced this
  **** file that it does not conform to Adobe's published PDF
  **** specification.

  **** Warning:  File has an invalid xref entry:  2.  Rebuilding xref table.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.
  **** Warning: stream operator isn't terminated by valid EOL.

  **** This file had errors that were repaired or ignored.
  **** The file was produced by: 
  **** >>>>  <<<<
  **** Please notify the author of the software that produced this
  **** file that it does not conform to Adobe's published PDF
  **** specification.


I have not heard form someone about this so it looks like the users don't see any error message. Moodle is also running without any problems. I'm using Moodle 3.3 but have also had this once or twice on 3.1.

Is there a fix for this or can I ignore it?

Average of ratings: -
In reply to Michael B

Re: Cron Problem

by Ken Task -
Picture of Particularly helpful Moodlers

In many years participating in these forums, don't think I've ever seen anyone report this very same thing ... even though a Google search hits on many similarly reported issues in other applications/situations.  Most of them, in looking them over, most appear to have solved their issue by updating GhostScript and or Imagemagik on their systems.

No, I would not ignore it.

See it's linux by the cron command and have a suggestion ...

Re-direct the output of the cron job to a log where you might be able to see more information than what you get via email.

Since it's linux, should be able to do this as root user:

touch /var/log/moodle-cron.log

Assuming your logs are kept in /var/log/

That creates a blank - empty - file.

Then, in the cron job itself change the ending to redirect to the log.

Change this:

/usr/bin/php  /var/www/clients/client1/web1/web/moodle/admin/cli/cron.php >/dev/null

to this

/usr/bin/php  /var/www/clients/client1/web1/web/moodle/admin/cli/cron.php > /var/log/moodle-cron.log 2>&1

Since the cron job is supposed to run every minute now, one can 'watch' the moodle-cron.log file in realtime using:

tail -f /var/log/moodle-cron.log

To see what else might be going on.

'spirit of sharing', Ken


In reply to Ken Task

Re: Cron Problem

by Michael B -

Hi Ken thanks for the hint about GhostScript. That could be the culprit. I'm running Debian 8.11 on the server in question. A ghostscript -v gives me this output:


GPL Ghostscript 9.06 (2012-08-08)

Copyright (C) 2012 Artifex Software, Inc.  All rights reserved


On my other server running Debian 9.4 it's:


GPL Ghostscript 9.20 (2016-09-26)

Copyright (C) 2016 Artifex Software, Inc.  All rights reserved.


I'll just have to wait until I upgrade to 9.X to see if it fixes the problem.

In reply to Michael B

Re: Cron Problem

by Michelle Melton -
Picture of Core developers Picture of Plugin developers

We're experience something similar with GS 9.0.7. Have you updated the version of GS on this server to see if it resolves the issue yet? We'd appreciate any feedback!

In reply to Michelle Melton

Re: Cron Problem

by Jerry Lau -

I have 9.0.7 but it seems to use the older version

# ghostscript -v
GPL Ghostscript 9.07 (2013-02-14)
Copyright (C) 2012 Artifex Software, Inc.  All rights reserved.


   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

In reply to Jerry Lau

Re: Cron Problem

by Ken Task -
Picture of Particularly helpful Moodlers

https://bugs.ghostscript.com/show_bug.cgi?id=694310
https://bugs.ghostscript.com/show_bug.cgi?id=693916

See if ghostscript is a symlink or not?

[root@server ~]# whereis ghostscript
ghostscript: /usr/bin/ghostscript

the above is symlinked:

[root@server ~]# ls -l /usr/bin/ghostscript
lrwxrwxrwx. 1 root root 2 Mar 25 22:42 /usr/bin/ghostscript -> gs

LIke finding the php-cli,

[root@server ~]# which gs
/usr/bin/gs

[root@server ~]# gs -v
GPL Ghostscript 9.07 (2013-02-14)
Copyright (C) 2012 Artifex Software, Inc.  All rights reserved.

In moodle 3.5/6 pahs:
/path to ghostscript: /usr/bin/gs

'spirit of sharing', Ken


In reply to Ken Task

Re: Cron Problem

by Jerry Lau -

mine is a symbolic link to  "/bin/gs" which is really "/bin/ghostscript"

$> whereis ghostscript

$> ghostscript: /usr/bin/ghostscript /usr/lib64/ghostscript

 /bin/ghostscript -v
GPL Ghostscript 9.07 (2013-02-14)
Copyright (C) 2012 Artifex Software, Inc.  All rights reserved.

I think I need to upgrade it to at least 9.15 I read?




In reply to Jerry Lau

Re: Cron Problem

by Ken Task -
Picture of Particularly helpful Moodlers

Unless that version is in RHEL SC (which is what your server uses), the only alt is to download and compile from source:

As root in /root ... mkdir gs

cd gs

wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs926/ghostscript-9.26.tar.gz
tar zxvf ghostscript-9.26.tar.gz
cd ghostscript-9.26
./configure
make
make install

Requires gcc and maybe other compiler stuff on your system (I already have all on a CentOS 7 boxen).

Takes longer than one would think.
Note change in path ...

/usr/local/bin/gs -v

[root@server ~]# /usr/local/bin/gs -v
GPL Ghostscript 9.26 (2018-11-20)
Copyright (C) 2018 Artifex Software, Inc.  All rights reserved.

'spirit of sharing', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Cron Problem

by Jerry Lau -
Yes Ken.. I did that as well as a build and ti did take quite a bit time during the make stage but not bad.. I'll see and put it on production and see what happens smile


In reply to Ken Task

Re: Cron Problem

by Rafiq Muhammad -

Hi Ken,

I just want to say thank you for this post. You have saved my day.

Rafiq

In reply to Rafiq Muhammad

Re: Cron Problem

by Ken Task -
Picture of Particularly helpful Moodlers

@Rfiq Muhammad ... Welcome.  Feel free to mark the posting as 'Useful' - another way to say 'Thanks'. smile

'spirit of sharing', Ken


In reply to Michael B

Re: Cron Problem

by Jerry Lau -

I have the same situation as well.. tonnes of those


 **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)
   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

   **** Warning: Form stream has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> TCPDF 6.2.13 (http://www.tcpdf.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

In reply to Michael B

Re: Cron Problem

by José Renato Castro Milanez -

Hello friend, how are you?

I have this problem too:

**** Warning: can't process font stream, loading font by the name.
**** Error reading a content stream. The page may be incomplete.
**** Warning: Form stream has unbalanced q/Q operators (too many q's)
**** File did not complete the page properly and may be damaged.

My Moodle is 3.5.4+.

My unoconv is:

unoconv 0.8.2
platform posix/linux2
python 2.7.5 (default, Mar 26 2019, 22:13:06)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
LibreOffice 5.3.6.1