Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Jun 17, 2019 8:16 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Error upgrading from 1.1.37 to 1.2.1
PostPosted: Fri Jan 25, 2019 11:41 am 
Offline
Cacti User

Joined: Tue Mar 31, 2009 10:05 am
Posts: 279
We are currently running 1.1.37 and trying to upgrade to 1.2.1 using the same upgrade method we have used in the past, but we are getting the following error regarding version 1.2.0 instead:

System log file is not available for writing, please enable write access Log: /usr/local/cacti-1.2.0/log/cacti.log

The steps we use to upgrade are below (the old version is in /usr/local/cacti-1.1.37 which is symlinked to /usr/local/cacti)

sudo tar zvxf cacti-1.2.1.tar.gz
sudo chown root:wheel cacti-1.2.1
cd cacti-1.2.1
sudo chown zzhoppy:wheel –R *
vi /usr/local/cacti/include/config.php (copy DB name and DB PW and update ->) /usr/local/cacti-1.2.1/include/config.php
rm -rf /usr/local/cacti-1.2.1/rra
ln -s /usr/local/cacti1x_rra /usr/local/cacti-1.2.1/rra
sudo cp -u /usr/local/cacti/scripts/* /usr/local/cacti-1.2.1/scripts
sudo cp -u -R /usr/local/cacti/plugins/* /usr/local/cacti-1.2.1/plugins
cp -u -R /usr/local/cacti/resource/* /usr/local/cacti-1.2.1/resource
sudo cp /usr/local/cacti/utils.sh /usr/local/cacti-1.2.1/
sudo chown nobody:wheel -R /usr/local/cacti-1.2.1/resource/
sudo chown nobody:wheel -R /usr/local/cacti-1.2.1/scripts/
sudo chown nobody:wheel -R /usr/local/cacti-1.2.1/log/
sudo chown nobody:wheel -R /usr/local/cacti-1.2.1/cache/
mysqldump -l -u cactiuser -p --add-drop-table cacti1x > /usr/local/cacti1.1.37.sql
rm cacti
ln -s /usr/local/cacti-1.2.1 /usr/local/cacti


Last edited by stormonts on Wed Feb 13, 2019 3:57 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Fri Jan 25, 2019 5:04 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
Check that you are not getting bit by SELinux and that the log directory and files within are writable by the user your website runs under.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Sat Jan 26, 2019 5:00 pm 
Offline
Cacti User

Joined: Tue Mar 31, 2009 10:05 am
Posts: 279
SELinux is not enabled on this server.

Unless something changed regarding required permissions between 1.1.37 and 1.2.1, the permissions on the "log" directory are the same as what worked in 1.1.37.

drwxrwxr-x 2 nobody wheel 4096 Jan 26 04:13 log/

I tried adding write permissions to "other" and the problem still exists.

Why am I seeing an error about 1.2.0 when that version has never touched this server?


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Mon Jan 28, 2019 8:23 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
What user does your website run under? What user does your poller run under?

What groups do they belong to? ("groups <username>" usually tells you)

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Mon Jan 28, 2019 9:45 am 
Offline
Cacti User

Joined: Tue Mar 31, 2009 10:05 am
Posts: 279
Apache runs as "nobody" which is in the "nobody" group.

The poller runs as "cactiuser" which is in the "wheel" and "cacti" groups.


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Mon Jan 28, 2019 10:25 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
Do the files in the log directory also reflect the same permissions? (664 for files, 775 for directories).

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Mon Jan 28, 2019 3:49 pm 
Offline
Cacti User

Joined: Tue Mar 31, 2009 10:05 am
Posts: 279
There is only one file in /usr/local/cacti-1.2.1/log and it is .htaccess.

-rw-rw-r-- 1 nobody wheel 170 Jan 20 11:01 .htaccess

The contents of that file and the permissions are the exact same as the one that is in the /usr/local/cacti-1.1.37 directory that is working.


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Wed Jan 30, 2019 11:25 am 
Offline
Cacti User

Joined: Tue Mar 31, 2009 10:05 am
Posts: 279
I created /usr/local/cacti-1.2.0/log and it get rid of the error (not sure why that is needed, since we are going from 1.1.37 to 1.2.1 as mentioned earlier).

Now I am being directed to the login screen for 1.1.37, I enter my credentials, and then it directs me to http://util-st-01/cacti/install/install.php (which is the correct server) but the page is totally blank and I don't see the GNU agreement.


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Wed Jan 30, 2019 1:36 pm 
Offline
Cacti User

Joined: Tue Mar 31, 2009 10:05 am
Posts: 279
I gave up and am attempting Cacti 1.2.0. I get the same issue with being directed to a login page and then a blank page at http://util-st-01/cacti/install/install.php. Looking at cacti.error.log, there are a bunch of errors which oddly reference both 1.2.0 and 1.2.1. Is PHP 7.2.13 supported?

Code:
[Wed Jan 30 13:30:41.657960 2019] [proxy_fcgi:error] [pid 18483:tid 140688289085184] [client 172.21.133.21:58197] AH01071: Got error 'PHP message: PHP Warning:  include_once(./lib/ldap.php): failed to open stream: No such file or directory in /usr/local/cacti-1.2.0/auth_login.php on line 122\nPHP message: PHP Stack trace:\nPHP message: PHP   1. {main}() /usr/local/cacti-1.2.1/install/install.php:0\nPHP message: PHP   2. include_once() /usr/local/cacti-1.2.1/install/install.php:28\nPHP message: PHP   3. require_once() /usr/local/cacti-1.2.0/include/auth.php:95\nPHP message: PHP Warning:  include_once(): Failed opening './lib/ldap.php' for inclusion (include_path='.:/usr/local/php-7.2.13/php/includes:/usr/local/php-7.2.13/lib/php:/usr/local/smarty/libs') in /usr/local/cacti-1.2.0/auth_login.php on line 122\nPHP message: PHP Stack trace:\nPHP message: PHP   1. {main}() /usr/local/cacti-1.2.1/install/install.php:0\nPHP message: PHP   2. include_once() /usr/local/cacti-1.2.1/install/install.php:28\nPHP message: PHP   3. require_once() /usr/local/cacti-1.2.0/include/auth.php:95\nPHP message: PHP Fatal error:  Uncaught Error: Call to undefined function cacti_ldap_search_dn() in /usr/local/cacti-1.2.0/auth_login.php:125\nStack trace:\n#0 /usr/local/cacti-1.2.0/include/auth.php(95): require_once()\n#1 /usr/local/cacti-1.2.1/install/install.php(28): include_once('/usr/local/cact...')\n#2 {main}\n  thrown in /usr/local/cacti-1.2.0/auth_login.php on line 125\n', referer: http://util-st-01/cacti/install/install.php


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Wed Jan 30, 2019 2:43 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
It sounds like you have several issues going on here and one of them is to do with using a synlink. Any paths that Cacti has worked out (and it may well have ignored the symlink because a lot of things use REALPATH to work out the proper location) maybe wrong in the DB's settings tables.

Another issue may be due to SELinux which must have the correct context set against the folders and files in order to work. Failing to do that under CentOS 7, for example, prevents apache from even displaying the site.

You should also check the folder that your apache configuration is pointed at and make sure it's definitely the 1.2.1 folders and that Cacti has all the subfolders are present because log and install are generally created if you extract any source files.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Wed Jan 30, 2019 2:59 pm 
Offline
Cacti User

Joined: Tue Mar 31, 2009 10:05 am
Posts: 279
seLinux is not running on this server so that can be ruled out.

We have always used the symlink before and it has never been an issue (and currently isn't an issue with 1.1.37). Apache is pointing to the symlinked directory

Code:
<VirtualHost util-st-01:80>
ServerName util-st-01
DirectoryIndex index.html index.html.var index.php index.xml
Alias /cacti /usr/local/cacti/
<Directory /usr/local/cacti>
  Options None
  AllowOverride Authconfig Options
  Require all granted
</Directory>
ErrorLog /usr/ims/maintenance/webservers/util-st-01/logs/cacti.error_log
CustomLog /usr/ims/maintenance/webservers/util-st-01/logs/cacti.access_log combined
</VirtualHost>


What should I check in the DB settings tables?


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Wed Jan 30, 2019 6:08 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
Code:
SELECT * FROM settings where value like '/usr/local/cacti%'

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Wed Jan 30, 2019 8:07 pm 
Offline
Cacti User

Joined: Tue Mar 31, 2009 10:05 am
Posts: 279
Below is the output. How can I change those entries to recognize our symlinked directory (/usr/local/cacti) instead of the version specific paths?

Code:
mysql> SELECT * FROM settings where value like '/usr/local/cacti%';
+---------------------------+---------------------------------------------+
| name                      | value                                       |
+---------------------------+---------------------------------------------+
| boost_png_cache_directory | /usr/local/cacti/cache/boost/               |
| path_cactilog             | /usr/local/cacti-1.2.0/log/cacti.log        |
| path_stderrlog            | /usr/local/cacti-1.2.0/log/cacti_stderr.log |
| path_stderrrlog           | /usr/local/cacti-1.2.0/log/cacti_stderr.log |
| path_webroot              | /usr/local/cacti-1.1.37                     |
| realtime_cache_path       | /usr/local/cacti/cache/realtime/            |
| spikekill_backupdir       | /usr/local/cacti/cache/spikekill/           |
+---------------------------+---------------------------------------------+
7 rows in set (0.00 sec)


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Thu Jan 31, 2019 3:35 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
Just update them in the database for now. One you have completed the installation, I would be curious whether they revert back to non-symlinked. We may need to examine that process.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2
PostPosted: Thu Jan 31, 2019 8:53 am 
Offline
Cacti User

Joined: Tue Mar 31, 2009 10:05 am
Posts: 279
Progress, but I am still stuck. I updated MySQL to this:

Code:
mysql> SELECT * FROM settings where value like '/usr/local/cacti%';
+---------------------------+---------------------------------------------+
| name                      | value                                       |
+---------------------------+---------------------------------------------+
| boost_png_cache_directory | /usr/local/cacti/cache/boost/               |
| path_cactilog             | /usr/local/cacti-1.2.0/log/cacti.log        |
| path_stderrlog            | /usr/local/cacti-1.2.0/log/cacti_stderr.log |
| path_stderrrlog           | /usr/local/cacti-1.2.0/log/cacti_stderr.log |
| path_webroot              | /usr/local/cacti-1.1.37                     |
| realtime_cache_path       | /usr/local/cacti/cache/realtime/            |
| spikekill_backupdir       | /usr/local/cacti/cache/spikekill/           |
+---------------------------+---------------------------------------------+
7 rows in set (0.00 sec)

mysql> UPDATE settings SET value = '/usr/local/cacti/log/cacti.log' WHERE NAME = 'path_cactilog';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> UPDATE settings SET value = '/usr/local/cacti/log/cacti_stderr.log' WHERE NAME = 'path_stderrlog';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> UPDATE settings SET value = '/usr/local/cacti/log/cacti_stderr.log' WHERE NAME = 'path_stderrrlog';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> SELECT * FROM settings where value like '/usr/local/cacti%';
+---------------------------+---------------------------------------+
| name                      | value                                 |
+---------------------------+---------------------------------------+
| boost_png_cache_directory | /usr/local/cacti/cache/boost/         |
| path_cactilog             | /usr/local/cacti/log/cacti.log        |
| path_stderrlog            | /usr/local/cacti/log/cacti_stderr.log |
| path_stderrrlog           | /usr/local/cacti/log/cacti_stderr.log |
| path_webroot              | /usr/local/cacti-1.1.37               |
| realtime_cache_path       | /usr/local/cacti/cache/realtime/      |
| spikekill_backupdir       | /usr/local/cacti/cache/spikekill/     |
+---------------------------+---------------------------------------+
7 rows in set (0.00 sec)


I then update the symlink to point /usr/local/cacti to /usr/local/cacti-1.2.1.
When I go to http://util-st-01/cacti, I am re-directed to http://util-st-01/cacti/install and I see the License Agreement. I check the Accept box and then click Begin. I am then taken to the screen shown below but there is no way forward after that.
Attachment:
checks.png
checks.png [ 37.4 KiB | Viewed 710 times ]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group