Couldn't add a map file

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

ceenizz
Posts: 5
Joined: Wed Mar 29, 2017 9:36 am

Re: Couldn't add a map file

Post by ceenizz »

When I roll back the driver I get Missing file: /usr/share/php/adodb/drivers/adodb-mysql.inc.php and a boatload of text error output in my browser.
ceenizz
Posts: 5
Joined: Wed Mar 29, 2017 9:36 am

Re: Couldn't add a map file

Post by ceenizz »

setting mysqli to mysql in config.php breaks stuff........missing file error at the top of the browser complaining about ADO stuff.......Ill try the risky version just for testing i suppose :D
ceenizz
Posts: 5
Joined: Wed Mar 29, 2017 9:36 am

Re: Couldn't add a map file

Post by ceenizz »

This looks pretty cool howie. I can see test maps! Im gonna go with this for a day or 2 and see if I have problems. If I do I will circle back around to trying to get cacti to use the old driver.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Couldn't add a map file

Post by Howie »

OK. Feedback on the new one is welcome!

Depending on which data sources you use, you might not have any issues (data sources that use the database are still broken - poller_output, dsstats, cactihost)

But it's still the version I'm changing so you might get hot fresh bugs, too.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
jackie
Cacti User
Posts: 71
Joined: Fri Sep 14, 2007 12:43 pm

Re: Couldn't add a map file

Post by jackie »

I'm running into what looks like the same issue with:

Ubuntu 16.04
PHP 5.6.30-10
mysql 5.7.18
apache2.4.18-2
cacti 0.8.8f
weathermap 0.98

When I try to install the plugin with the cacti GUI I see a browser screen with:

Access denied for user ''@'localhost' (using password: NO)

Errors in apache2 log:

[Thu May 25 09:11:15.459800 2017] [:error] [pid 125655] [client 129.82.53.64:49934] PHP Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in /usr/local/share/cacti/plugins/weathermap/setup.php on line 295, referer: https://129.82.1.214/cacti/plugins.php
[Thu May 25 09:11:15.459917 2017] [:error] [pid 125655] [client 129.82.53.64:49934] PHP Warning: mysql_query(): A link to the server could not be established in /usr/local/share/cacti/plugins/weathermap/setup.php on line 295, referer: https://129.82.1.214/cacti/plugins.php

I don't see a version 0.98a on github. So, want to confirm the solution is to use one of the later commits in the master branch.

Thanks for any info.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Couldn't add a map file

Post by Howie »

with mysql or mysqli as the database type? I would expect that combination to work.

On github it will be the latest in database-refactor, BUT you will get bugs too. The editor was broken for a while yesterday for example. There are some parts that definitely don't work with Cacti 1.x too.

git clone -b database-refactor https://github.com/howardjones/network-weathermap.git weathermap

should get you a current version. You need to read the readme to do a few extra steps to get some missing javascript (because this is the dev version).
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
jackie
Cacti User
Posts: 71
Joined: Fri Sep 14, 2007 12:43 pm

Re: Couldn't add a map file

Post by jackie »

Thanks for quick response, Howie. Yes, configuration is using mysqli.

Tried the current version you suggested, and when I went to the GUI to install the plugin, it appeared nothing happened. Just saw this in the apache2 access log, nothing in error log:

129.82.53.64 - - [25/May/2017:14:55:10 -0600] "GET /cacti/plugins.php?mode=install&id=weathermap HTTP/1.1" 302 463 "https://129.82.x.xxx/cacti/plugins.php" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0"
129.82.53.64 - - [25/May/2017:14:55:10 -0600] "GET /cacti/plugins.php HTTP/1.1" 200 3416 "https://129.82.x.xxx/cacti/plugins.php" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0"

Also, just a couple of notes:

1) 'bower install' gave an error about /usr/bin/env missing. I had to 'ln -s /usr/bin/nodejs /usr/bin/node' first.

2) Instead of 'bower install' had to run 'bower --allow-root install' to allow sudo access.

Unfortunately I won't be able to work more on this for a week or so. I've tried WM 0.97c, 0.98 and this latest release and have issues with all of them. Maybe something is amiss on our new system. We have used WM for years on Ubuntu 12.04, cacti 0.8.8b, WM 0.97b. Thanks again.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Couldn't add a map file

Post by Howie »

None of that needed to run as root :-)

As far as I know, on Ubuntu 16.04, with php 5.6 and a mysql (not mysqli) data source, the 0.98 release version should run OK.

Ubuntu 16.04 is fairly well tested with the git version too, because that's what is used for the Vagrant test environment we use now. (both for Cacti 1.x and 0.8.8h, mostly with php 5.6 but also 7.0). In the git repo, there is the script that's used to automatically build a test server - maybe that would highlight any differences? ( it's in weathermap/dev/Vagrant/cacti-develop.sh - don't run it on your server though)

Next time I have a fresh 0.8.8h install, I'll try your combination with 0.98 release. Probably over the weekend.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
jackie
Cacti User
Posts: 71
Joined: Fri Sep 14, 2007 12:43 pm

Re: Couldn't add a map file

Post by jackie »

Hi Howie,

I'm back on this project, and happy to report some progress. I see you updated the database-refactor branch. So, I tried installing the latest version. Under plugin management I can now install the weathermap plugin (couldn't do so before). The "Weathermaps" option appears on the console under Management, and the "weathermap" tab also appears now.

I'm rendering the graphs external to cacti using weathermap-cacti-rebuild.php. However, when it is run I see the error:
PHP Fatal error: Call to private method WeatherMapConfigReader::readConfigFile() from context 'WeatherMap' in /usr/local/share/cacti/plugins/weathermap/lib/Weathermap.class.php on line 547
Do you have any ideas what might be causing that?

Thanks again for all your help!
Jackie
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Couldn't add a map file

Post by Howie »

Yes, change line 1156 of lib/WeatherMapConfigReader.class.php so that it says public instead of private at the beginning.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
jackie
Cacti User
Posts: 71
Joined: Fri Sep 14, 2007 12:43 pm

Re: Couldn't add a map file

Post by jackie »

That was it! Weathermaps are being generated! I've been struggling with this for awhile, so really appreciate your help!

I am seeing some differences in what the weathermaps look like though. I'll investigate more. If I do find issues that aren't already reported, I assume you want them posted on github.

Thanks again! Real breakthrough for us!
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Couldn't add a map file

Post by Howie »

jackie wrote:That was it! Weathermaps are being generated! I've been struggling with this for awhile, so really appreciate your help!

I am seeing some differences in what the weathermaps look like though. I'll investigate more. If I do find issues that aren't already reported, I assume you want them posted on github.

Thanks again! Real breakthrough for us!
Yes please (for new issues). There will always be minor differences especially in font rendering when you move between OS or PHP versions - the freetype library is quite variable!
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
anmomin1
Cacti User
Posts: 63
Joined: Mon May 29, 2017 4:14 pm

Re: Couldn't add a map file

Post by anmomin1 »

Hi Howie,

The savior... need help.. all of the sudden I can't add map .. and getting following error:

/var/log/httpd/error_log
[error] [client XXX.XXX.XXX.XXX] PHP Warning: fgets() expects parameter 1 to be resource, boolean given in /var/www/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php on line 861, referer: http://XXX.XXX.XXX.XXX/cacti/plugins/we ... n-mgmt.php

PHP Version 5.3.3
PHP OS Linux
Cacti Version 0.8.8h
Cacti OS unix
SNMP Version NET-SNMP version: 5.5
RRDTool Version RRDTool 1.3.x

I had all graphs working don't want to recreate them again.. not sure what happened that caused above error.
Howie wrote:
jackie wrote:That was it! Weathermaps are being generated! I've been struggling with this for awhile, so really appreciate your help!

I am seeing some differences in what the weathermaps look like though. I'll investigate more. If I do find issues that aren't already reported, I assume you want them posted on github.

Thanks again! Real breakthrough for us!
Yes please (for new issues). There will always be minor differences especially in font rendering when you move between OS or PHP versions - the freetype library is quite variable!
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Couldn't add a map file

Post by Howie »

Unless this is part of the same issue (I can't see that it is)... please create a new topic, and also mention which version of weathermap you are talking about!
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
anmomin1
Cacti User
Posts: 63
Joined: Mon May 29, 2017 4:14 pm

Re: Couldn't add a map file

Post by anmomin1 »

As instructed I have created new topic for my issue with weathermap version:
viewtopic.php?f=16&t=59201

Thanks for your help.
Howie wrote:Unless this is part of the same issue (I can't see that it is)... please create a new topic, and also mention which version of weathermap you are talking about!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests