Error: contacttemplates.cfg : No such file

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Error: contacttemplates.cfg : No such file

Post by lmiltchev »

Did you set up "no_proxy=localhost" in the "etc/wgetrc" as described here?
Be sure to check out our Knowledgebase for helpful articles and solutions!
hondain
Posts: 32
Joined: Wed Mar 05, 2014 1:37 pm

Re: Error: contacttemplates.cfg : No such file

Post 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
================================-
Nagios XI 5.3.2
CENT-OS as vm host
Text mode with proxy
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Error: contacttemplates.cfg : No such file

Post 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)
Be sure to check out our Knowledgebase for helpful articles and solutions!
hondain
Posts: 32
Joined: Wed Mar 05, 2014 1:37 pm

Re: Error: contacttemplates.cfg : No such file

Post 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
================================-
Nagios XI 5.3.2
CENT-OS as vm host
Text mode with proxy
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Error: contacttemplates.cfg : No such file

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
hondain
Posts: 32
Joined: Wed Mar 05, 2014 1:37 pm

Re: Error: contacttemplates.cfg : No such file

Post 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.
You do not have the required permissions to view the files attached to this post.
================================-
Nagios XI 5.3.2
CENT-OS as vm host
Text mode with proxy
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error: contacttemplates.cfg : No such file

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hondain
Posts: 32
Joined: Wed Mar 05, 2014 1:37 pm

Re: Error: contacttemplates.cfg : No such file

Post 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.
================================-
Nagios XI 5.3.2
CENT-OS as vm host
Text mode with proxy
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Error: contacttemplates.cfg : No such file

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked