Page 2 of 2

Re: Error: contacttemplates.cfg : No such file

Posted: Thu Mar 06, 2014 2:59 pm
by lmiltchev
Did you set up "no_proxy=localhost" in the "etc/wgetrc" as described here?

Re: Error: contacttemplates.cfg : No such file

Posted: Mon Mar 10, 2014 6:00 am
by hondain
We had to add this, but after a reboot the problem remains. (actual IP obscured)

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
#https_proxy = http://proxy.yoyodyne.com:18023/
#http_proxy = http://proxy.yoyodyne.com:18023/
#ftp_proxy = http://proxy.yoyodyne.com:18023/
http_proxy=http://XXX.XXX.XXX.XX:XX/
# If you do not want to use proxy at all, set this to off.
use_proxy = on
no_proxy = localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Hosts to exclude from proxying

Re: Error: contacttemplates.cfg : No such file

Posted: Mon Mar 10, 2014 11:07 am
by lmiltchev
I believe you need to change this line:

Code: Select all

http_proxy=http://XXX.XXX.XXX.XX:XX/ 
to this:

Code: Select all

http_proxy=http://myname:[email protected]:XX/ 
What do you have in the "/etc/yum.conf"? (hide sensitive info)

Re: Error: contacttemplates.cfg : No such file

Posted: Mon Mar 10, 2014 11:13 am
by hondain
We are setup to use our proxy w/o authentication (our internet connection is only temporary, this will be removed when we do a full roll out), so I believe that line is correct (our network guys confirm this, and we are able to pull updates from RHN).

Below is our /etc/yum.conf

[root@LXHMIMON01 ~]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
# The proxy server - proxy server:port number
proxy=http://XXX.XXX.XXX.XX:XX

# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

Re: Error: contacttemplates.cfg : No such file

Posted: Mon Mar 10, 2014 2:35 pm
by lmiltchev
Go to the install directory:

Code: Select all

cd /tmp/nagiosxi/
and run the following command:

Code: Select all

./upgrade 2> /tmp/debug.txt
See if the upgrade will fix your issue. Check for config errors:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
If this fails, post the "/tmp/debug.txt" file.

Re: Error: contacttemplates.cfg : No such file

Posted: Tue Mar 11, 2014 5:36 am
by hondain
This did not appear to resolve the issue. The debug.txt file is attached, as well as the result of

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
below.

Code: Select all

[root@LXHMIMON01 nagiosxi]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 3.5.0
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or directory
   Error processing object config files!


***> One or more problems was encountered while processing the config files...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.

Re: Error: contacttemplates.cfg : No such file

Posted: Tue Mar 11, 2014 8:08 am
by scottwilkerson
It is really hard to determine what has been changed on this system. Things that stand out to be were the following from the original install.log

Code: Select all

useradd: user 'nagios' already exists
groupadd: group 'nagios' already exists
As well as the fact that PHP is dumping Stack trace info, which certainly isn't the default behavior of a clean minimal install of RHEL.

I would strongly recommend starting again on a clean minimal install of RHEL, only changing what is required for your proxy as opposed to patching together a machine that might have other problems in the future.

Re: Error: contacttemplates.cfg : No such file

Posted: Tue Mar 11, 2014 8:18 am
by hondain
We can do a fresh install. Does it make sense given our past difficulties to have one of your support staff remote in and do the install after we reload the LPAR? My counterpart is emailing the staff member that helped us before (abrist) to see if they can support, though any technician would suffice if they are not available. We're in a time crunch for this to be functional, so we'll support whatever works. We should have the server ready for the install at 12:00 EST.

Re: Error: contacttemplates.cfg : No such file

Posted: Tue Mar 11, 2014 1:29 pm
by lmiltchev
abrist has a remote session, already scheduled for today with you, so we will continue communicating via mails. I am locking this topic.