Nagios xi install.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jladd
Posts: 70
Joined: Fri Jan 22, 2010 11:30 am

Re: Nagios xi install.

Post by jladd »

That access denied error im not sure about the only thing i can think is that the nagios install script may create other users with permissions to the data base and it was trying to access it over root.
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Nagios xi install.

Post by mmestnik »

I'd be more concerned about that Usage line.

Perhaps postgressql just needs a restart so the previous changes can take effect. It's vary possible that your init script is missing some foo that is expected from an RPM distribution.
systems
Posts: 7
Joined: Tue Mar 09, 2010 3:45 pm

Re: Nagios xi install.

Post by systems »

I am running this ./3-dbservers script under root user. I have 2 issues below...

1.) That usage line is suppose to run the following line:

Code: Select all

/sbin/service postgresql initdb
Somehow, it never ran that line of the ./3-dbservers script. I was surprised that database was initialized even though the command did not run. It was probably initialized by the subsequent line of the script:

Code: Select all

/sbin/service postgresql start
I want to check if i need to run initdb command line? If so, what is the command to do that?

The script has a comment stating "Start Postgre (needed for Centos, as initdb doesnt work)", does that apply to Red Hat EL5.4? If that's true, then it would explain why initdb command didn't work for me.

2.) I'm not sure what you meant by that the init script is missing some foo? I suppose you meant the $mysqlpass, it is getting the variable correctly from init.sh file. I have tried to run the following command manually:

Code: Select all

mysqladmin -u root password $mysqlpass
It gave an error "Access denied for user 'root'@'localhost'..."
This looks like a permission problem, do i need to set it for the root user? Where do you change the permission, is it in /usr/lib/mysql ?

Thanks again!
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Nagios xi install.

Post by mmestnik »

I'm talking about the initdb foo.

The mysql password is a secret that only "nagioxi" knows. As for psql(postgress) I'm not sure how to access that from the command line.
MySQL and postgres are two different things.

As for setting permissions I'm vary sure that's not the issue here, mysql and postgress are what I'd consider hardened packages and it's not likely at all that they would suffer from permission issues. What you are likely fighting is a database access issue, you are having trouble logging into the database server, it's more like checking email then reading/writing to a file.
systems
Posts: 7
Joined: Tue Mar 09, 2010 3:45 pm

Re: Nagios xi install.

Post by systems »

Okay, so you're saying i should run initdb command on Red Hat 5.4
It said I cannot run as root, it asked for unprivileged user that will own the server process. Is this user "nagios"? I'm guessing I need to initialize the data directory to point at "/var/lib/pgsql/data", right?

Code: Select all

# initdb /var/lib/pgsql/data
initdb: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will own the server process.
Previously, I continued on with the installation without knowing whether i initialized postgresql correctly. When I got to B-installxi, i bumped into a couple problems. I am assuming it is related because I did not initialize postgresql. (See post: http://support.nagios.com/forum/viewtopic.php?f=6&t=197)
Am I right?

Any help is appreciated, thanks!
User avatar
admin
Site Admin
Posts: 256
Joined: Mon Oct 12, 2009 8:21 am

Re: Nagios xi install.

Post by admin »

I believe the first time the 3-dbservers script is ran, the default MySQL root password (*blank*) is set to "nagiosxi" (no quotes). Once you re-ran the script, it was still assuming the initial MySQL root password was blank. Assuming the Mysql setup completed okay the first time you ran the script, you should be able to ignore this.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Ethan Galstad
President
systems
Posts: 7
Joined: Tue Mar 09, 2010 3:45 pm

Re: Nagios xi install.

Post by systems »

Yes, I figured out the password issue. Once the mysql root password has been set the first time, you need to use the change password command(commented out in the script). I keep getting the error for mysqladmin because it was trying to set it not changing it.

But again, did you initialized postgresql simply by deleting /var/lib/pgsql/data and then starting postgresql service? Or did you use initdb command to initialize /var/lib/pgsql/data?

I suspect the database was not initialized properly, because i got a couple of error messages when trying to create postgres db structure and load postgres data at ./B-installxi. (Read this post: http://support.nagios.com/forum/viewtopic.php?f=6&t=197)

Please help, thanks so much!
tim7ad
Posts: 2
Joined: Tue Aug 10, 2010 10:06 pm

Re: Nagios xi install.

Post by tim7ad »

admin wrote:It looks like the MySQL and PostgresQL servers didn't get installed. Are you by chance trying to install XI on a 64-bit system? We ran into an issue yesterday with a 64-bit version of CentOS that failed because not all the required packages were available for 64-bit platforms.
Is there any documentation to on the required packages for 64-bit?

We are trying to install manually on a RS cloud server (which is essentially a XEN virtual machine so didn't want to install a VM player on it too).
Linux xxxxxxxx 2.6.33.5-rscloud #2 SMP Thu Jun 10 15:26:23 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

I'm receiving the same errors as above and tried to follow the advice of deleting /var/lib/pgsql/data directory and still get the same errors when running 3-dbservers

Code: Select all

[root@pronet-nagxi nagiosxi]# ./3-dbservers
Initializing PostgresQL...
Usage: /etc/init.d/postgresql {start|stop|status|restart|condrestart|condstop|reload|force-reload}
Starting PostgresQL...
Starting postgresql service:                               [FAILED]
Restarting PostgresQL...
Stopping postgresql service:                               [FAILED]
Starting postgresql service:                               [FAILED]
Starting MySQL...
Starting MySQL:                                            [  OK  ]
Setting MySQL root password...
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
Any advice?

Thanks
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Nagios xi install.

Post by mmestnik »

You should configure mysql to have a root user that does not have/use a password. Then this script will set the password and complete.
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Nagios xi install.

Post by mmestnik »

To our knoladge no-one has been able to install NagiosXI onto a 64dit system. The install script lists the packages it needs, but it does not list the packages these depend on... nor would this list be the same for you.
Locked