Cacti Upgrade to Plugin Architecture Problems - Database

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

mapleleafs89
Posts: 7
Joined: Thu Nov 29, 2012 2:19 am

Cacti Upgrade to Plugin Architecture Problems - Database

Post by mapleleafs89 »

I have Ubuntu Server 12.04 Server installed and had cacti running fine. After trying to install PIA now I am getting error FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'

I wanted to add a Monitor plugin, so I downloaded PIA, followed the instructions and got to the point where I needed to replace all the files Using the Pre-Patched Files from the download of PIA to the install directory of my cacti /usr/share/cacti.

The tutorial on the wiki suggested an FTP program to move the files over, so I did (in the process had to change all the permissions of files to 777 so I could overwrite in the FTP program so I did. After this it said I had to Edit “include/config.php” with the database information.

Now I am confused, because when I installed cacti I let it use the default information and I am pretty sure config.php wasn't overwritten so it should be the same. I did add this part to my existing file though..

Code: Select all

/* load up old style plugins here */
$plugins = array();
//$plugins[] = 'thold';

/*
   Edit this to point to the default URL of your Cacti install
   ex: if your cacti install as at http://serverip/cacti/ this
   would be set to /cacti/
*/
$url_path = "/cacti/";
Then it says The plugin architecture includes a pa.sql file. You will need to import this into your cacti SQL database. No mention of how to do so I came across this thread, http://forums.cacti.net/about36499.html which says you can do this by

Code: Select all

mysql cacti < pa.sql -u root -p
It asked me for root password, I dont know the root password for mysql - I left all default and let cacti take care of the mysql configuration during the install process of apt-get install cacti. So of course this won't work, I then did sudo su mysql cacti < pa.sql, no errors but not sure if it worked either..

I also made changes to global.php as mentioned in the thread I linked earlier. Now when trying to load cacti I get - FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'

Now I am stumped, because I did make all the changes to config.php like the wiki said, and made the changes to global.php like that thread said

For ref these are the changes

Code: Select all

Take care of the configuration part (include/global.php), there is some additional changes needed under Ubuntu, make them correct for your configuration, here is mine:
Quote:
$config["rra_path"] = $config["base_path"]."/rra";
change it to:
$config["rra_path"] = "/var/lib/cacti/rra";


include($config["library_path"]."/adodb/adodb.inc.php");
change it to:
include("/usr/share/php/adodb/adodb.inc.php");

//I couldn't find this line with these symbols but I assumed it meant "/" to "/cacti/"
$config[’url_path’] = ‘/’;
to:
$config[’url_path’] = ‘/cacti/’;
Any help would be great!
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by paulgevers »

Hmm, I think you created a small mess, by mixing the Debian/Ubuntu package with the PIA from this site. I think the easiest way (if you can afford it) is to completely purge the cacti installation you now have (including removal of the mysql database upon request) by running

Code: Select all

apt-get purge cacti
. After that you can use my ppa (see my signature) to get a Ubuntu package of cacti including PIA as that is standard included in 0.8.8a.

If you can not afford to loose your current setup (because you have valuable data already), take a look at the differences between Debian/Ubuntu installation and the default cacti installation (see FAQ line in my signature).

I really hope you can afford to just reinstall :)
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
mapleleafs89
Posts: 7
Joined: Thu Nov 29, 2012 2:19 am

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by mapleleafs89 »

Thanks, I have purged and am going to re-install per your directions.

I have looked at your link in the signature and see only information for debian. What is the install process for Ubuntu? This package has PPA built in to cacti, correct? No need to install cacti first.
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by paulgevers »

mapleleafs89 wrote:Thanks, I have purged and am going to re-install per your directions.

I have looked at your link in the signature and see only information for debian. What is the install process for Ubuntu? This package has PPA built in to cacti, correct? No need to install cacti first.
I don't understand your question. The ppa is actualy even slightly better for Ubuntu than Debian as the naming matches better to Ubuntu. But as it is all php it should not really matter for all current versions of Ubuntu and Debian, so cacti from my ppa should be installable as

Code: Select all

add-apt-repository ppa:paul-climbing/cacti
apt-get update
apt-get install cacti
And yes. cacti 0.8.8a already has the plugin architecture build in, so no need ot install cacti first, just install cacti... ;)
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
mapleleafs89
Posts: 7
Joined: Thu Nov 29, 2012 2:19 am

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by mapleleafs89 »

I see I've run the commands listed but it seems it did not work, or just installed the regular cacti and not your PPA

See below

Code: Select all

root@domU-12-31-39-18-3E-F1:/home/ubuntu# add-apt-repository ppa:paul-climbing/cacti
You are about to add the following PPA to your system:
 Package my work for Debian cacti in a stand alone location.
 More info: https://launchpad.net/~paul-climbing/+archive/cacti
Press [ENTER] to continue or ctrl-c to cancel adding it

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.K66RKTho4e --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv BBE04B0D0729378E6FF865A28C851674F96FD737
gpg: requesting key F96FD737 from hkp server keyserver.ubuntu.com
gpg: key F96FD737: public key "Launchpad PPA for Paul Gevers" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
root@domU-12-31-39-18-3E-F1:/home/ubuntu# apt-get update
Ign http://us-east-1.ec2.archive.ubuntu.com precise InRelease
Ign http://us-east-1.ec2.archive.ubuntu.com precise-updates InRelease
Get:1 http://us-east-1.ec2.archive.ubuntu.com precise Release.gpg [198 B]
Get:2 http://us-east-1.ec2.archive.ubuntu.com precise-updates Release.gpg [198 B]
Hit http://us-east-1.ec2.archive.ubuntu.com precise Release
Ign http://security.ubuntu.com precise-security InRelease
Get:3 http://us-east-1.ec2.archive.ubuntu.com precise-updates Release [49.6 kB]
Ign http://ppa.launchpad.net precise InRelease
Get:4 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:5 http://us-east-1.ec2.archive.ubuntu.com precise/main Sources [934 kB]
Ign http://ppa.launchpad.net precise Release.gpg
Get:6 http://us-east-1.ec2.archive.ubuntu.com precise/universe Sources [5,019 kB]
Ign http://ppa.launchpad.net precise Release
Get:7 http://security.ubuntu.com precise-security Release [49.6 kB]
Ign http://ppa.launchpad.net precise/main TranslationIndex
Get:8 http://security.ubuntu.com precise-security/main Sources [55.9 kB]
Get:9 http://us-east-1.ec2.archive.ubuntu.com precise/main amd64 Packages [1,273 kB]
Get:10 http://us-east-1.ec2.archive.ubuntu.com precise/universe amd64 Packages [4,786 kB]
Get:11 http://security.ubuntu.com precise-security/universe Sources [17.7 kB]
Get:12 http://security.ubuntu.com precise-security/main amd64 Packages [199 kB]
Get:13 http://us-east-1.ec2.archive.ubuntu.com precise/main i386 Packages [1,274 kB]
Get:14 http://us-east-1.ec2.archive.ubuntu.com precise/universe i386 Packages [4,796 kB]
Err http://ppa.launchpad.net precise/main Sources
  404  Not Found
Get:15 http://us-east-1.ec2.archive.ubuntu.com precise/main TranslationIndex [3,706 B]
Get:16 http://us-east-1.ec2.archive.ubuntu.com precise/universe TranslationIndex [2,922 B]
Get:17 http://us-east-1.ec2.archive.ubuntu.com precise-updates/main Sources [193 kB]
Err http://ppa.launchpad.net precise/main amd64 Packages
  404  Not Found
Err http://ppa.launchpad.net precise/main i386 Packages
  404  Not Found
Get:18 http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe Sources [65.4 kB]
Get:19 http://us-east-1.ec2.archive.ubuntu.com precise-updates/main amd64 Packages [434 kB]
Get:20 http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe amd64 Packages [159 kB]
Ign http://ppa.launchpad.net precise/main Translation-en_US
Get:21 http://us-east-1.ec2.archive.ubuntu.com precise-updates/main i386 Packages [442 kB]
Get:22 http://security.ubuntu.com precise-security/universe amd64 Packages [57.7 kB]
Ign http://ppa.launchpad.net precise/main Translation-en
Get:23 http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe i386 Packages [160 kB]
Get:24 http://us-east-1.ec2.archive.ubuntu.com precise-updates/main TranslationIndex [3,564 B]
Get:25 http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe TranslationIndex [2,850 B]
Get:26 http://us-east-1.ec2.archive.ubuntu.com precise/main Translation-en [726 kB]
Get:27 http://us-east-1.ec2.archive.ubuntu.com precise/universe Translation-en [3,341 kB]
Get:28 http://security.ubuntu.com precise-security/main i386 Packages [206 kB]
Get:29 http://us-east-1.ec2.archive.ubuntu.com precise-updates/main Translation-en [214 kB]
Get:30 http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe Translation-en [95.6 kB]
Get:31 http://security.ubuntu.com precise-security/universe i386 Packages [58.4 kB]
Get:32 http://security.ubuntu.com precise-security/main TranslationIndex [73 B]
Get:33 http://security.ubuntu.com precise-security/universe TranslationIndex [73 B]
Hit http://security.ubuntu.com precise-security/main Translation-en
Hit http://security.ubuntu.com precise-security/universe Translation-en
Fetched 24.6 MB in 13s (1,891 kB/s)
W: Failed to fetch http://ppa.launchpad.net/paul-climbing/cacti/ubuntu/dists/precise/main/source/Sources  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/paul-climbing/cacti/ubuntu/dists/precise/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/paul-climbing/cacti/ubuntu/dists/precise/main/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
root@domU-12-31-39-18-3E-F1:/home/ubuntu# apt-get install cacti
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  php5-ldap
The following NEW packages will be installed:
  cacti
0 upgraded, 1 newly installed, 0 to remove and 54 not upgraded.
Need to get 0 B/1,891 kB of archives.
After this operation, 4,766 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package cacti.
(Reading database ... 27513 files and directories currently installed.)
Unpacking cacti (from .../cacti_0.8.7i-2ubuntu1_all.deb) ...
Setting up cacti (0.8.7i-2ubuntu1) ...
dbconfig-common: writing config to /etc/dbconfig-common/cacti.conf

Creating config file /etc/dbconfig-common/cacti.conf with new version

Creating config file /etc/cacti/debian.php with new version
granting access to database cacti for cacti@localhost: success.
verifying access for cacti@localhost: success.
creating database cacti: success.
verifying database cacti exists: success.
populating database via sql...  done.
dbconfig-common: flushing administrative password

Creating config file /etc/cacti/apache.conf with new version
 * Reloading web server config apache2                                                [ OK ]
root@domU-12-31-39-18-3E-F1:/home/ubuntu#
And when I login to cacti I get Version 0.8.7i


Thanks again for the help :)
mapleleafs89
Posts: 7
Joined: Thu Nov 29, 2012 2:19 am

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by mapleleafs89 »

I see I've run the commands listed but it seems it did not work, or just installed the regular cacti and not your PPA

See below

Code: Select all

root@domU-12-31-39-18-3E-F1:/home/ubuntu# add-apt-repository ppa:paul-climbing/cacti
You are about to add the following PPA to your system:
 Package my work for Debian cacti in a stand alone location.
 More info: https://launchpad.net/~paul-climbing/+archive/cacti
Press [ENTER] to continue or ctrl-c to cancel adding it

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.K66RKTho4e --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv BBE04B0D0729378E6FF865A28C851674F96FD737
gpg: requesting key F96FD737 from hkp server keyserver.ubuntu.com
gpg: key F96FD737: public key "Launchpad PPA for Paul Gevers" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
root@domU-12-31-39-18-3E-F1:/home/ubuntu# apt-get update
Ign http://us-east-1.ec2.archive.ubuntu.com precise InRelease
Ign http://us-east-1.ec2.archive.ubuntu.com precise-updates InRelease
Get:1 http://us-east-1.ec2.archive.ubuntu.com precise Release.gpg [198 B]
Get:2 http://us-east-1.ec2.archive.ubuntu.com precise-updates Release.gpg [198 B]
Hit http://us-east-1.ec2.archive.ubuntu.com precise Release
Ign http://security.ubuntu.com precise-security InRelease
Get:3 http://us-east-1.ec2.archive.ubuntu.com precise-updates Release [49.6 kB]
Ign http://ppa.launchpad.net precise InRelease
Get:4 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:5 http://us-east-1.ec2.archive.ubuntu.com precise/main Sources [934 kB]
Ign http://ppa.launchpad.net precise Release.gpg
Get:6 http://us-east-1.ec2.archive.ubuntu.com precise/universe Sources [5,019 kB]
Ign http://ppa.launchpad.net precise Release
Get:7 http://security.ubuntu.com precise-security Release [49.6 kB]
Ign http://ppa.launchpad.net precise/main TranslationIndex
Get:8 http://security.ubuntu.com precise-security/main Sources [55.9 kB]
Get:9 http://us-east-1.ec2.archive.ubuntu.com precise/main amd64 Packages [1,273 kB]
Get:10 http://us-east-1.ec2.archive.ubuntu.com precise/universe amd64 Packages [4,786 kB]
Get:11 http://security.ubuntu.com precise-security/universe Sources [17.7 kB]
Get:12 http://security.ubuntu.com precise-security/main amd64 Packages [199 kB]
Get:13 http://us-east-1.ec2.archive.ubuntu.com precise/main i386 Packages [1,274 kB]
Get:14 http://us-east-1.ec2.archive.ubuntu.com precise/universe i386 Packages [4,796 kB]
Err http://ppa.launchpad.net precise/main Sources
  404  Not Found
Get:15 http://us-east-1.ec2.archive.ubuntu.com precise/main TranslationIndex [3,706 B]
Get:16 http://us-east-1.ec2.archive.ubuntu.com precise/universe TranslationIndex [2,922 B]
Get:17 http://us-east-1.ec2.archive.ubuntu.com precise-updates/main Sources [193 kB]
Err http://ppa.launchpad.net precise/main amd64 Packages
  404  Not Found
Err http://ppa.launchpad.net precise/main i386 Packages
  404  Not Found
Get:18 http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe Sources [65.4 kB]
Get:19 http://us-east-1.ec2.archive.ubuntu.com precise-updates/main amd64 Packages [434 kB]
Get:20 http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe amd64 Packages [159 kB]
Ign http://ppa.launchpad.net precise/main Translation-en_US
Get:21 http://us-east-1.ec2.archive.ubuntu.com precise-updates/main i386 Packages [442 kB]
Get:22 http://security.ubuntu.com precise-security/universe amd64 Packages [57.7 kB]
Ign http://ppa.launchpad.net precise/main Translation-en
Get:23 http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe i386 Packages [160 kB]
Get:24 http://us-east-1.ec2.archive.ubuntu.com precise-updates/main TranslationIndex [3,564 B]
Get:25 http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe TranslationIndex [2,850 B]
Get:26 http://us-east-1.ec2.archive.ubuntu.com precise/main Translation-en [726 kB]
Get:27 http://us-east-1.ec2.archive.ubuntu.com precise/universe Translation-en [3,341 kB]
Get:28 http://security.ubuntu.com precise-security/main i386 Packages [206 kB]
Get:29 http://us-east-1.ec2.archive.ubuntu.com precise-updates/main Translation-en [214 kB]
Get:30 http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe Translation-en [95.6 kB]
Get:31 http://security.ubuntu.com precise-security/universe i386 Packages [58.4 kB]
Get:32 http://security.ubuntu.com precise-security/main TranslationIndex [73 B]
Get:33 http://security.ubuntu.com precise-security/universe TranslationIndex [73 B]
Hit http://security.ubuntu.com precise-security/main Translation-en
Hit http://security.ubuntu.com precise-security/universe Translation-en
Fetched 24.6 MB in 13s (1,891 kB/s)
W: Failed to fetch http://ppa.launchpad.net/paul-climbing/cacti/ubuntu/dists/precise/main/source/Sources  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/paul-climbing/cacti/ubuntu/dists/precise/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/paul-climbing/cacti/ubuntu/dists/precise/main/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
root@domU-12-31-39-18-3E-F1:/home/ubuntu# apt-get install cacti
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  php5-ldap
The following NEW packages will be installed:
  cacti
0 upgraded, 1 newly installed, 0 to remove and 54 not upgraded.
Need to get 0 B/1,891 kB of archives.
After this operation, 4,766 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package cacti.
(Reading database ... 27513 files and directories currently installed.)
Unpacking cacti (from .../cacti_0.8.7i-2ubuntu1_all.deb) ...
Setting up cacti (0.8.7i-2ubuntu1) ...
dbconfig-common: writing config to /etc/dbconfig-common/cacti.conf

Creating config file /etc/dbconfig-common/cacti.conf with new version

Creating config file /etc/cacti/debian.php with new version
granting access to database cacti for cacti@localhost: success.
verifying access for cacti@localhost: success.
creating database cacti: success.
verifying database cacti exists: success.
populating database via sql...  done.
dbconfig-common: flushing administrative password

Creating config file /etc/cacti/apache.conf with new version
 * Reloading web server config apache2                                                [ OK ]
root@domU-12-31-39-18-3E-F1:/home/ubuntu#
And when I login to cacti I get Version 0.8.7i


Thanks again for the help :)
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by paulgevers »

Hmm, I see. My mistake, you are running precise, and the ppa is by default for quantal. You can use it with precise, though, but you need to edit the sources file, either /etc/sources.list or a file in /etc/sources.list.d/ that contains the cacti source. Change the line containing

Code: Select all

deb http://ppa.launchpad.net/paul-climbing/cacti/ubuntu precise main 
to

Code: Select all

deb http://ppa.launchpad.net/paul-climbing/cacti/ubuntu quantal main 
update apt-get again and install.
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
mapleleafs89
Posts: 7
Joined: Thu Nov 29, 2012 2:19 am

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by mapleleafs89 »

in /etc/apt/sources.list.d/paul-climbing-cacti-precise.list I found this line, does it matter if I change only the one line to quantal or should I do both?

Code: Select all

deb http://ppa.launchpad.net/paul-climbing/cacti/ubuntu precise main
deb-src http://ppa.launchpad.net/paul-climbing/cacti/ubuntu precise main
in /etc/apt/sources.list I found

Code: Select all

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise main
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise main

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates main
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates main

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise universe
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise multiverse
# deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise multiverse
# deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates multiverse
# deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
# deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse



deb http://security.ubuntu.com/ubuntu precise-security main
deb-src http://security.ubuntu.com/ubuntu precise-security main
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe

paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by paulgevers »

mapleleafs89 wrote:in /etc/apt/sources.list.d/paul-climbing-cacti-precise.list I found

Code: Select all

deb http://ppa.launchpad.net/paul-climbing/cacti/ubuntu precise main
deb-src http://ppa.launchpad.net/paul-climbing/cacti/ubuntu precise main
What is different from these lines from what I said? Just change precise in those line to quantal and you should be fine.
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
mapleleafs89
Posts: 7
Joined: Thu Nov 29, 2012 2:19 am

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by mapleleafs89 »

Sorry, I realized I am blind after lol.

Thanks, it is working after changing those lines as you previously stated.

Thanks again, lifesaver.
clicker666
Posts: 11
Joined: Mon Jan 23, 2006 3:49 pm

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by clicker666 »

Paul - I installed cacti using your ppa and I get 404's. I had previously installed cacti from the standard repos and it worked, but plugins broke it. I apt-get remove cacti and cacti-spine, and checked that the databases and users were all removed, as well as the directories. When I install your cacti I get:

Code: Select all

root@cacti:~# apt-get install cacti
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  php5-ldap moreutils
The following NEW packages will be installed:
  cacti
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2,112 kB of archives.
After this operation, 4,848 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package cacti.
(Reading database ... 40914 files and directories currently installed.)
Unpacking cacti (from .../cacti_0.8.8a-4+ppa1q_all.deb) ...
Setting up cacti (0.8.8a-4+ppa1q) ...
dbconfig-common: writing config to /etc/dbconfig-common/cacti.conf
granting access to database cacti for cacti@localhost: success.
verifying access for cacti@localhost: success.
creating database cacti: success.
verifying database cacti exists: success.
populating database via sql...  done.
dbconfig-common: flushing administrative password
When I navigate to http://serverip/cacti I get a 404. Navigating to http://serverip shows me the default "It works!" page for Apache. (located at /var/www/index.html)
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by paulgevers »

clicker666 wrote:Paul - I installed cacti using your ppa and I get 404's.
I was confused some lines before I realized you meant at your own site, not while installing.

What answer did you give to the debconf question about installing the configuration for Apache?

Please show the output of the following commands:

Code: Select all

ls -al /etc/apache2/conf.d/cacti.conf

Code: Select all

ls -al /etc/cacti/apache.conf

Code: Select all

cat /etc/cacti/apache.conf

Code: Select all

cat /usr/share/doc/cacti/cacti.apache.conf
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
clicker666
Posts: 11
Joined: Mon Jan 23, 2006 3:49 pm

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by clicker666 »

When prompted (which only happened the first time, never again) I selected Apache2.

Code: Select all

root@cacti:/# ls -al /etc/apache2/conf.d/cacti.conf
ls: cannot access /etc/apache2/conf.d/cacti.conf: No such file or directory

Code: Select all

root@cacti:/# ls -al /etc/cacti/apache.conf
-rw-r--r-- 1 root root 528 Dec 30  2011 /etc/cacti/apache.conf

Code: Select all

root@cacti:/# cat /etc/cacti/apache.conf
Alias /cacti /usr/share/cacti/site

<Directory /usr/share/cacti/site>
        Options +FollowSymLinks
        AllowOverride None
        order allow,deny
        allow from all

        AddType application/x-httpd-php .php

        <IfModule mod_php5.c>
                php_flag magic_quotes_gpc Off
                php_flag short_open_tag On
                php_flag register_globals Off
                php_flag register_argc_argv On
                php_flag track_vars On
                # this setting is necessary for some locales
                php_value mbstring.func_overload 0
                php_value include_path .
        </IfModule>

        DirectoryIndex index.php
</Directory>

Code: Select all

root@cacti:/# cat /usr/share/doc/cacti/cacti.apache.conf
Alias /cacti /usr/share/cacti/site

<Directory /usr/share/cacti/site>
        Options +FollowSymLinks
        AllowOverride None
        order allow,deny
        allow from all

        AddType application/x-httpd-php .php

        <IfModule mod_php5.c>
                php_flag magic_quotes_gpc Off
                php_flag short_open_tag On
                php_flag register_globals Off
                php_flag register_argc_argv On
                php_flag track_vars On
                # this setting is necessary for some locales
                php_value mbstring.func_overload 0
                php_value include_path .
        </IfModule>

        DirectoryIndex index.php
</Directory>
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by paulgevers »

clicker666 wrote:When prompted (which only happened the first time, never again) I selected Apache2.
Did you removed or purged cacti before reinstalling it again?
clicker666 wrote:

Code: Select all

root@cacti:/# ls -al /etc/apache2/conf.d/cacti.conf
ls: cannot access /etc/apache2/conf.d/cacti.conf: No such file or directory
Please make a softlink:

Code: Select all

ln -s ../../cacti/apache.conf /etc/apache2/conf.d/cacti.conf
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
clicker666
Posts: 11
Joined: Mon Jan 23, 2006 3:49 pm

Re: Cacti Upgrade to Plugin Architecture Problems - Database

Post by clicker666 »

Yes, I tried removing it completely so that it would cleanly reinstall. (at least I had hoped) :wink:

After a quick restart of the Apache2 service your solution worked perfectly. Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests