[LON-CAPA-admin] CentOS/Red Hat/Scientific Linux 6 -- ImageMagick

Stuart Raeburn raeburn at msu.edu
Tue Jun 30 18:38:37 EDT 2015


Hi H.K.,

> Is it recommended that httpd be reload or restart every time when there is
> an update? What about loncontrol? When is a reload or restart required
> (except of course when there is a version upgrade)?

Reload of httpd is not required every time running yum update results  
in package updates, and similarly, you would only need to restart  
loncontrol in specific circumstances.

However, given that you need to reboot when you update the kernel (and  
hence loncontrol and httpd will both be stopped and started), you'll  
likely be restarting those every couple of months given the recent  
history of CentOS 6 kernel Security Updates (see:  
http://lists.centos.org/pipermail/centos-announce/ ).

Anyway, in the specific case here of an update to ImageMagick, a  
reload of httpd was required.

This morning I found I was able to view the randomlabel images in  
version 11 of /res/fsu/PhysicsLabs/PHY2048L/Torques/torques.problem  
(.gif files) in a web session on one of the fsu access servers, so you  
likely reloaded httpd on that server/VM early today, which fixed the  
missing images issue you reported yesterday following the ImageMagick  
update to 6.8.9-7.1.

Given that mod_perl loads LON-CAPA perl modules into memory on start  
up, (see /etc/httpd/conf/startup.pl), updates in dependencies of  
LON-CAPA modules should likely be followed by a reload of httpd.

The following grep command run in /home/httpd/lib/perl/Apache and  
piped to filter out unwanted output will list non-LON-CAPA  
dependencies of LON-CAPA's perl modules (imported via "use <package>"  
statements).

grep -h '^use ' *.pm |grep -v 'use Apache::' |grep -v 'use LONCAPA'  
|grep -v 'use strict' |grep -v 'use warnings' |grep -v 'use vars'  
|grep -v 'use lib ' | sort | uniq |less

If a yum update causes an update in any of the corresponding  
perl-<Module-Name> modules, you'll likely want to reload httpd.  An  
httpd reload, which causes the parent httpd to advise the children to  
exit after their current request, (i.e., a graceful restart) is  
preferred to a standard httpd restart.

If you update maxima you'll want to restart the lonmaxima daemon, or  
if you update any of the R-* packages you'll want to restart lonr.

As regards the other daemons in /home/httpd/perl the following command  
will report the modules imported via "use <package>" statements:

grep -h '^use ' * |grep -v 'use Apache::' |grep -v 'use LONCAPA' |grep  
-v 'use strict' |grep -v 'use warnings' |grep -v 'use vars' |grep -v  
'use lib' | sort | uniq |less

Note: if you make modifications to the customizable  
/home/httpd/lib/perl/localenroll.pm modules you'll also want to  
restart loncontrol.


Stuart Raeburn
LON-CAPA Academic Consortium


Quoting "H. K. Ng" <hkng at fsu.edu>:

> Hi Stuart,
>
> Is it recommended that httpd be reload or restart every time when there is
> an update? What about loncontrol? When is a reload or restart required
> (except of course when there is a version upgrade)?
>
> Thanks,
> -hk
>
>
>
> On Mon, Jun 29, 2015 at 9:23 PM, Stuart Raeburn <raeburn at msu.edu> wrote:
>
>> Hi H.K.,
>>
>> > Now the randomlabel images do not show up. See
>> >
>> > /res/fsu/PhysicsLabs/PHY2048L/Torques/torques.problem
>>
>> I recommend reloading Apache after updating ImageMagick to
>> 6.8.9-7.1.centos6.lc on CentOS 6, by using:
>>
>> /etc/init.d/httpd reload
>>
>> On a CentOS 6 server (with ImageMagick 6.8.9) I was able to display
>> all four randomlabel images in version 11, i.e., the version of
>> torques.problem in which the background image is still a .gif,
>> (Graphics/meterRuler.gif).
>>
>> Display was successful for web, and also for printout (where the
>> meterRuler.gif was converted to an meterRuler.gif.eps).
>>
>>
>> Stuart Raeburn
>> LON-CAPA Academic Consortium
>>
>>
>> Quoting "H. K. Ng" <hkng at fsu.edu>:
>>
>> > Thanks Stuart for the fix.
>> >
>> > It appears that there may be another problem (not sure if it is related).
>> > Now the randomlabel images do not show up. See
>> >
>> > /res/fsu/PhysicsLabs/PHY2048L/Torques/torques.problem
>> >
>> > There are 4 randomlabel images and non of them show up.
>> >
>> > Regards,
>> > -hk
>> >
>> >
>> > On Sat, Jun 27, 2015 at 12:42 PM, Stuart Raeburn <raeburn at msu.edu>
>> wrote:
>> >
>> >> Hi H.K.,
>> >>
>> >> > When I did a yum update, it was not successful. Seems like there is a
>> >> > conflict between existing packages that depend on the older version of
>> >> > ImageMagick.
>> >>
>> >> The server/VM for which you attempted to update ImageMagick had
>> >> inkscape installed, and the inkscape package had been built with a
>> >> specific version of
>> >> ImageMagick-c++-devel (6.5.4.7-7), so had a it dependency on the same
>> >> version of ImageMagick-c++.
>> >>
>> >> As LON-CAPA does not require inkscape one solution would be to simply
>> >> remove it using: yum remove inkscape
>> >>
>> >> Alternatively, if you want to retain inkscape, you will need to update
>> >> inkscape to a version built with ImageMagick-c++-devel-6.8.9.
>> >>
>> >> Accordingly, I have added the ImageMagick-c++-devel, ImageMagick-c++,
>> >> and ImageMagick-devel packages for 6.8.9-7.1.centos6.lc, and also
>> >> inkscape-0.47-6.1.centos6.lc packages to the LON-CAPA yum repositories
>> >> for CentOS 6.
>> >>
>> >> yum clean all
>> >> yum update
>> >>
>> >> should now be successful, unless you have other packages installed
>> >> which were also built with ImageMagick-c++-devel.
>> >>
>> >> Notes:
>> >>
>> >> 1. There was a problem building ImageMagick-devel using the orginal
>> >> .spec file for ImageMagick, so I fixed it and replaced the ImageMagick
>> >> 6.8.9-7.centos6.lc packages added yesterday with ImageMagick
>> >> 6.8.9-7.1.centos6.lc packages built today.
>> >>
>> >> 2. The inkscape package is not installed if you set up a LON-CAPA
>> >> instance using the recommended minimal install of Linux, followed by
>> >> installation of the LONCAPA-prerequisites rpm.
>> >>
>> >> 3. ImageMagick-c++, ImageMagick-c++-devel, ImageMagick-devel, and
>> >> inkscape-0.47-6.1 packages have also been added to the LON-CAPA yum
>> >> repositories for Red Hat 6 and Scientific Linux 6.
>> >>
>> >>
>> >> Stuart Raeburn
>> >> LON-CAPA Academic Consortium
>> >>
>> >>
>> >> Quoting "H. K. Ng" <hkng at fsu.edu>:
>> >>
>> >> > Hi Stuart,
>> >> >
>> >> > When I did a yum update, it was not successful. Seems like there is a
>> >> > conflict between existing packages that depend on the older version of
>> >> > ImageMagick. Part of the message is attached below.
>> >> >
>> >> > -hk
>> >> >
>> >> > Resolving Dependencies
>> >> > --> Running transaction check
>> >> > ---> Package ImageMagick.x86_64 0:6.5.4.7-7.el6_5 will be updated
>> >> > --> Processing Dependency: libMagickCore.so.2()(64bit) for package:
>> >> > inkscape-0.47-6.el6.x86_64
>> >> > ...
>> >> > ...<removed>
>> >> >
>> >> > --> Finished Dependency Resolution
>> >> > Error: Package: ImageMagick-c++-6.5.4.7-7.el6_5.x86_64 (@updates)
>> >> >            Requires: libMagickCore.so.2()(64bit)
>> >> >            Removing: ImageMagick-6.5.4.7-7.el6_5.x86_64 (@updates)
>> >> >                libMagickCore.so.2()(64bit)
>> >> >            Updated By: ImageMagick-6.8.9-7.centos6.lc.x86_64
>> >> > (loncapa-updates-basearch)
>> >> >                Not found
>> >> > Error: Package: inkscape-0.47-6.el6.x86_64 (@base/$releasever)
>> >> >            Requires: libMagickCore.so.2()(64bit)
>> >> >            Removing: ImageMagick-6.5.4.7-7.el6_5.x86_64 (@updates)
>> >> >                libMagickCore.so.2()(64bit)
>> >> >            Updated By: ImageMagick-6.8.9-7.centos6.lc.x86_64
>> >> > (loncapa-updates-basearch)
>> >> >                Not found
>> >> > Error: Package: ImageMagick-c++-6.5.4.7-7.el6_5.x86_64 (@updates)
>> >> >            Requires: libMagickWand.so.2()(64bit)
>> >> >            Removing: ImageMagick-6.5.4.7-7.el6_5.x86_64 (@updates)
>> >> >                libMagickWand.so.2()(64bit)
>> >> >            Updated By: ImageMagick-6.8.9-7.centos6.lc.x86_64
>> >> > (loncapa-updates-basearch)
>> >> >                Not found
>> >> >  You could try using --skip-broken to work around the problem
>> >> >  You could try running: rpm -Va --nofiles --nodigest
>> >> >
>> >> > On Fri, Jun 26, 2015 at 11:18 AM, Stuart Raeburn <raeburn at msu.edu>
>> >> wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> Packages for ImageMagick and ImageMagick-perl which contain newer
>> >> >> versions than those present in the distribution's standard
>> >> >> repositories have been added to LON-CAPA's own yum repositories for
>> >> >> CentOS, Red Hat, and Scientific Linux 6 (both 64 bit and 32 bit
>> >> >> architectures).
>> >> >>
>> >> >> When the CHECKRPMS script (run by cron on alternate nights) next runs
>> >> >> it will advise using yum to update ImageMagick and ImageMagick-perl
>> >> >> from 6.5.4.7-7.el6 to 6.8.9-7.dist6.lc (where dist = centos, rhel,
>> or
>> >> >> sl).
>> >> >>
>> >> >> The newer packages create valid postscript when generating PDF
>> >> >> printouts in LON-CAPA for resources containing certain types of jpeg
>> >> >> images (e.g., see
>> >> >>
>> http://mail.lon-capa.org/pipermail/lon-capa-users/2015-June/004878.html
>> >> >> ).
>> >> >>
>> >> >> ImageMagick for LON-CAPA servers running other distros: CentOS 5 or
>> 7,
>> >> >> Ubuntu 12 or 14, or SLES11 do not need updating, as they already
>> >> >> support printout generation for resources of this type.
>> >> >>
>> >> >> In the case of CentOS/Red Hat/Scientific Linux 5, updated ImageMagick
>> >> >> rpms which were built previously (June 2014 -- rev. 6.8.8.2) to
>> >> >> address a different issue to do with conversion of 8-bit alpha
>> channel
>> >> >> png files (see bug 6652 --
>> >> >> http://bugs.loncapa.org/show_bug.cgi?id=6652#c9) can also support
>> >> >> conversion of these jpeg images.
>> >> >>
>> >> >> At least one other distro -- Ubuntu 10 LTS -- needs a newer version
>> of
>> >> >> ImageMagick to support printout generation for resources containing
>> >> >> these types of jpeg images.  However, 10.04 LTS reached end of life
>> on
>> >> >> April 30, 2015, so any LON-CAPA domains running servers still using
>> it
>> >> >> should consider upgrading to either Ubuntu 12 LTS or 14 LTS.
>> >> >>
>> >> >>
>> >> >> Stuart Raeburn
>> >> >> LON-CAPA Academic Consortium
>> >> >>
>> >> >> _______________________________________________
>> >> >> LON-CAPA-admin mailing list
>> >> >> LON-CAPA-admin at mail.lon-capa.org
>> >> >> http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin



More information about the LON-CAPA-admin mailing list