Upgrade problem

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

Moderators: Developers, Moderators

Post Reply
johnmc
Posts: 25
Joined: Wed Dec 15, 2010 10:25 am

Upgrade problem

Post by johnmc »

Hi All,

I just upgraded my Ubuntu server from 9.10 to 10.04 LTS and I'm now having an issue with Cacti. The issue is that when I browse to http://localhost/cacti I just get a blank screen. I don't really know enough about Linux yet to know how to start troubleshooting this so I am at a complete loss. This happens in both FF and Opera so I'm fairly certain it's not browser related. Having done the exact same upgrade path on my laptop with no hitches I am somewhat perplexed as to what might have happened to the live machine.

Can anyone help me please to figure out what the heck has happened?

Additional information:
Cacti 0.8.7g
Apache 2.2.14
PHP 5.3.2

Cheers,

John
johnmc
Posts: 25
Joined: Wed Dec 15, 2010 10:25 am

Re: Upgrade problem

Post by johnmc »

Failing any help with this. Is there any way I can do a fresh install of Cacti and get my old devices and RRD data into the new install please?

Cheers,

John
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Upgrade problem

Post by noname »

johnmc wrote:The issue is that when I browse to http://localhost/cacti I just get a blank screen.
Please check out this topic:
- http://forums.cacti.net/viewtopic.php?f=2&t=19204
johnmc wrote:Is there any way I can do a fresh install of Cacti and get my old devices and RRD data into the new install please?
Try this procedure by using same version (0.8.7g) of Cacti:
- Upgrading Cacti - Cacti Docs
johnmc
Posts: 25
Joined: Wed Dec 15, 2010 10:25 am

Re: Upgrade problem

Post by johnmc »

Thanks for your reply noname. I did do the obvious google search but, at the moment, the time I can spend on this is fairly limited as Customer issues are sucking at most of my hours!

I've tried the re-install and even an upgrade to 0.8.7h but to no avail I still get a blank screen so, digging around some of the links you posted I have the following extra information so far, more may follow:

network@LAB:~/cacti$ sudo php -m

Warning: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0

Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]



mysql> show tables;
+---------------------------+
| Tables_in_cacti |
+---------------------------+
| cdef |
| cdef_items |
| colors |
| data_input |
| data_input_data |
| data_input_fields |
| data_local |
| data_template |
| data_template_data |
| data_template_data_rra |
| data_template_rrd |
| graph_local |
| graph_template_input |
| graph_template_input_defs |
| graph_templates |
| graph_templates_gprint |
| graph_templates_graph |
| graph_templates_item |
| graph_tree |
| graph_tree_items |
| host |
| host_graph |
| host_snmp_cache |
| host_snmp_query |
| host_template |
| host_template_graph |
| host_template_snmp_query |
| poller |
| poller_command |
| poller_item |
| poller_output |
| poller_reindex |
| poller_time |
| rra |
| rra_cf |
| settings |
| settings_graphs |
| settings_tree |
| snmp_query |
| snmp_query_graph |
| snmp_query_graph_rrd |
| snmp_query_graph_rrd_sv |
| snmp_query_graph_sv |
| user_auth |
| user_auth_perms |
| user_auth_realm |
| user_log |
| version |
+---------------------------+
48 rows in set (0.00 sec)

mysql> select * from settings;
+-------------------+----------------------------------------------------------------------------------------------------------------+
| name | value |
+-------------------+----------------------------------------------------------------------------------------------------------------+
| path_rrdtool | /usr/bin/rrdtool |
| path_php_binary | /usr/bin/php |
| path_snmpwalk | /usr/bin/snmpwalk |
| path_snmpget | /usr/bin/snmpget |
| path_snmpbulkwalk | /usr/bin/snmpbulkwalk |
| path_snmpgetnext | /usr/bin/snmpgetnext |
| path_cactilog | /var/www/cacti/log/cacti.log |
| snmp_version | net-snmp |
| rrdtool_version | rrd-1.3.x |
| poller_lastrun | 1317719101 |
| path_webroot | /var/www/cacti |
| date | 2011-10-04 10:05:01 |
| stats_poller | Time:18.1573 Method:cmd.php Processes:1 Threads:N/A Hosts:9 HostsPerProcess:9 DataSources:186 RRDsProcessed:99 |
| stats_recache | RecacheTime:0.0 HostsRecached:0 |
| auth_method | 1 |
+-------------------+----------------------------------------------------------------------------------------------------------------+
15 rows in set (0.00 sec)

I have tried dropping the cacti database totally, recreating and importing just the base db from the cacti.sql file but to no avail - still just get a blank screen. All settings in my config.php point to the right database, username, etc....

Cheers,

John
Last edited by johnmc on Tue Oct 04, 2011 4:39 am, edited 1 time in total.
johnmc
Posts: 25
Joined: Wed Dec 15, 2010 10:25 am

Re: Upgrade problem

Post by johnmc »

Given that an upgrade failed is there a clean way to remove all the components cacti relies on - barring Apache as I use this for Rancid, re-install them all from scratch and then try to import my db and rra data (I know how to perform that latter two functions)? The cacti interface has been unavailable for a little while now and I am a little worried about my own inability to know where to go within Linux to troubleshoot what might be causing the issue. It may well be that this is somewhat of a sledgehammer approach to things but, unfortunately I simply don't have the time, skills or technical backup, outside of this forum, to really understand what is going on :(
johnmc
Posts: 25
Joined: Wed Dec 15, 2010 10:25 am

Re: Upgrade problem

Post by johnmc »

Further information, from deeper investigation,. Typing the following from the install directory of my cacti install (which is /var/www/cacti) I get a lot of error output but it is the same two error messages repeated many times. The command is:

find . -name \*.php -exec php -l {} \; | grep -v "No syntax"

This gives me the aforementioned errors:

Warning: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0

Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Upgrade problem

Post by TheWitness »

it's a php.ini or php5.ini setting to control deprecation errors. You need to resolve that first. To me it appears that you upgraded more than just Cacti. Also, your Apache Error log is vital to fixing these types of errors. Please seek it out. In the future, don't upgrade so much at one time.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
johnmc
Posts: 25
Joined: Wed Dec 15, 2010 10:25 am

Re: Upgrade problem

Post by johnmc »

The only thing, and I use that phrase with reservation, I upgraded was from Ubuntu 9.10 to 10.04.3 LTS. Unfortunately this was pretty much forced on me and I had no choice but to upgrade it :) I dry-ran this twice on a separate machine and encountered no issues with either Cacti or Rancid. Sod's Law though when I did it on the live server this issue with Cacti appeared. Aside from the OS upgrade and the upgrade to 0.8.7h of Cacti in an attempt to resolve the blank screen I have not upgraded, or changed anything as an individual product. I told the upgrade not to upgrade any .ini files or other settings files as part of the upgrade process.

I will see if I can find the apache logs - I hope they're in a sensible place. I'm no expert with Unix-based OSes but the excellence of both the Cacti and Rancid tools, just as a starting tool-kit, makes it impossible to ignore as an OS and be able to economically support my customers.

You've given me something else to look at and compare though with the php settings as I still have the working upgraded machine and I can hopefully compare the files and see if there is any glaring differences.

Thanks,

John
johnmc
Posts: 25
Joined: Wed Dec 15, 2010 10:25 am

Re: Upgrade problem

Post by johnmc »

I have attached my apache error log file. Even to my untrained eye this seems to suggest that my PHP is not working very well. The question is: is it worth attempting to resolve these issues or would a removal and re-install of PHP probably resolve them?

Thanks,

John
Attachments
errorlog.tar.gz
Apache error log
(694 Bytes) Downloaded 154 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Upgrade problem

Post by TheWitness »

You've somehow hacked in a bad php binary. You need to correct the references to the missing files. You should also upgrade to the 0.8.7h version as it turns off the deprecation warning automatically. Rolling your own PHP should rarely be required in this day in age.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
johnmc
Posts: 25
Joined: Wed Dec 15, 2010 10:25 am

Re: Upgrade problem

Post by johnmc »

Thanks for the info. I assure you I have done nothing intentional to the php that I remember. My installation instructions and process came from the openmaniak site for both Rancid and Cacti and this is how I always install the products on Ubuntu as it seems to be the most fool-proof way for a novice like me since the apt-get repositories are not up-to-date and I don't like the way it installs under that process as it makes upgrading a little more difficult.

Is my answer to remove and then re-install php then or should I attempt to fix whatever is broken in the exisiting php install?

Thanks,

John
johnmc
Posts: 25
Joined: Wed Dec 15, 2010 10:25 am

Re: Upgrade problem

Post by johnmc »

Right, so I have "fixed" my problem with the blank screen and can now access my Cacti.

I had to edit my php5.ini file for apache2 to point the extensions setting to the right folder which seems to have a date format rather than any sensible sort of name.

Is there a better way to do this? Should I comment out that configuration and see what happens? It's possible that's there for another reason but right now I cannot think what that might be. I installed everything on this server around 8 months to a year ago or so whilst it was in a lab environment so stupidly did not write down what I was doing and why for every change to it.

Thanks for the prods in the right direction! :)
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Upgrade problem

Post by TheWitness »

It came with the PHP 5.3 upgrade. There is no better way when spinning your own PHP. You simply have to be able to run:

Code: Select all

php -m
And have it run clean. A good test for Apache is to place a file in the we root like this:

Code: Select all

<?php print phpinfo();?>
And point your browser to it.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
johnmc
Posts: 25
Joined: Wed Dec 15, 2010 10:25 am

Re: Upgrade problem

Post by johnmc »

Thanks to all the help as I now have my Cacti up and running and collecting data again which is fantastic so thank you all very much for your help and patience!

I really have no idea why my PHP is configured in the way it is but it's clearly something that's been done on the machine at some point for reasons I don't remember or possibly have no knowledge of them being done. I'm loathe to mess about with it too much as I don't know what, if anything, I will break on the machine. The only software that I am aware of that's active on the machine aside from Cacti and Rancid is GNS3. This software was never on my test-bed as it's not really mission critical but equally I don't want to break it because the second I do I know we'll want to use it :)

I suppose my best bet for a complete resolution for the PHP, or at least the easiest for me to deal with. would be a complete machine rebuild. I know this is not very elegant but I inherited this machine as an already built box so I'm not sure of its entire history and it spent over a year in a Lab environment being tinkered with before being put into a live situation so who knows why some things work the way they do. However, I would prefer to document exactly what's gone "wrong" this time around so that I, or whoever else in the future, can be aware of and hopefully avoid the pitfalls you guys have kindly helped me get around!

Cheers,

John
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests