Cacti / plugin_weathermap

Weathermap for Cacti 1.x
MIT License
80 stars 25 forks source link

ICONFILE file not found on disk #116

Closed lutfisan closed 5 months ago

lutfisan commented 1 year ago

Hi all,

I have issues like #63 and #62. I tried to run php weathermap/cli/upgrade_configs.php but got some error

PHP: 8.1.2-1ubuntu2.11 OS: Ubuntu 22.04

PHP Warning:  include(./include/cli_check.php): Failed to open stream: No such file or directory in /opt/cacti/plugins/weathermap/cli/upgrade_configs.php on line 47
PHP Warning:  include(): Failed opening './include/cli_check.php' for inclusion (include_path='.:/usr/share/php') in /opt/cacti/plugins/weathermap/cli/upgrade_configs.php on line 47
PHP Warning:  include_once(./plugins/weathermap/lib/WeatherMap.class.php): Failed to open stream: No such file or directory in /opt/cacti/plugins/weathermap/cli/upgrade_configs.php on line 48
PHP Warning:  include_once(): Failed opening './plugins/weathermap/lib/WeatherMap.class.php' for inclusion (include_path='.:/usr/share/php') in /opt/cacti/plugins/weathermap/cli/upgrade_configs.php on line 48
PHP Warning:  Undefined variable $config in /opt/cacti/plugins/weathermap/cli/upgrade_configs.php on line 50
PHP Warning:  Trying to access array offset on value of type null in /opt/cacti/plugins/weathermap/cli/upgrade_configs.php on line 50
PHP Fatal error:  Uncaught Error: Call to undefined function cacti_sizeof() in /opt/cacti/plugins/weathermap/cli/upgrade_configs.php:65
Stack trace:
#0 {main}
  thrown in /opt/cacti/plugins/weathermap/cli/upgrade_configs.php on line 65
2023-06-07 00:48:29 - WEATHERMAP WARNING: ICONFILE file not found on disk: /opt/cacti/plugins/weathermap/_MALL skipping! [WMPOLL12]
2023-06-07 00:48:30 - WEATHERMAP WARNING: ICONFILE file not found on disk: /opt/cacti/plugins/weathermap/_MALL skipping! [WMPOLL12]
2023-06-07 00:48:39 - WEATHERMAP WARNING: ICONFILE file not found on disk: /opt/cacti/plugins/weathermap/_MALL skipping! [WMPOLL12]
2023-06-07 00:48:42 - WEATHERMAP WARNING: ICONFILE file not found on disk: /opt/cacti/plugins/weathermap/_MALL skipping! [WMPOLL12]
2023-06-07 00:48:42 - ERROR PHP ERROR in  Plugin 'weathermap': Uncaught Error: Class "IntlDateFormatter" not found in /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php:1889 Stack trace: #0 /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php(2007): WeatherMap->{closure}() #1 [internal function]: WeatherMap->{closure}() #2 /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php(2009): preg_replace_callback() #3 /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php(2017): WeatherMap->strftime() #4 /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php(3609): WeatherMap->DrawTimestamp() #5 /opt/cacti/plugins/weathermap/lib/editor.actions.php(98): WeatherMap->DrawMap() #6 /opt/cacti/plugins/weathermap/weathermap-cacti-plugin-editor.php(394): getMapAreaData() #7 {main} thrown in file: /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php on line: 1889
2023-06-07 00:48:42 - CMDPHP PHP ERROR Backtrace:  (CactiShutdownHandler())
2023-06-07 00:48:42 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'weathermap'
2023-06-07 00:48:42 - SYSTEM WARNING: Primary Admin account notifications disabled!  Unable to send administrative Email.
2023-06-07 00:48:42 - ERROR PHP WARNING in  Plugin 'weathermap': opendir(/opt/cacti/plugins/weathermap/lib/lib/datasources): Failed to open directory: No such file or directory in file: /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php  on line: 826
2023-06-07 00:48:42 - CMDPHP PHP ERROR WARNING Backtrace:  (/plugins/weathermap/weathermap-cacti-plugin-editor.php[147]:drawMap(), /plugins/weathermap/lib/editor.actions.php[110]:WeatherMap->__construct(), /plugins/weathermap/lib/WeatherMap.class.php[372]:WeatherMap->Reset(), /plugins/weathermap/lib/WeatherMap.class.php[529]:WeatherMap->LoadPlugins(), /plugins/weathermap/lib/WeatherMap.class.php[826]:opendir(), CactiErrorHandler())
2023-06-07 00:48:42 - ERROR PHP WARNING in  Plugin 'weathermap': opendir(//opt/cacti/plugins/weathermap/lib/lib/datasources): Failed to open directory: No such file or directory in file: /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php  on line: 832
2023-06-07 00:48:42 - CMDPHP PHP ERROR WARNING Backtrace:  (/plugins/weathermap/weathermap-cacti-plugin-editor.php[147]:drawMap(), /plugins/weathermap/lib/editor.actions.php[110]:WeatherMap->__construct(), /plugins/weathermap/lib/WeatherMap.class.php[372]:WeatherMap->Reset(), /plugins/weathermap/lib/WeatherMap.class.php[529]:WeatherMap->LoadPlugins(), /plugins/weathermap/lib/WeatherMap.class.php[832]:opendir(), CactiErrorHandler())
2023-06-07 00:48:42 - ERROR PHP WARNING in  Plugin 'weathermap': opendir(/opt/cacti/plugins/weathermap/lib/lib/pre): Failed to open directory: No such file or directory in file: /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php  on line: 826
2023-06-07 00:48:42 - CMDPHP PHP ERROR WARNING Backtrace:  (/plugins/weathermap/weathermap-cacti-plugin-editor.php[147]:drawMap(), /plugins/weathermap/lib/editor.actions.php[110]:WeatherMap->__construct(), /plugins/weathermap/lib/WeatherMap.class.php[372]:WeatherMap->Reset(), /plugins/weathermap/lib/WeatherMap.class.php[530]:WeatherMap->LoadPlugins(), /plugins/weathermap/lib/WeatherMap.class.php[826]:opendir(), CactiErrorHandler())
2023-06-07 00:48:42 - ERROR PHP WARNING in  Plugin 'weathermap': opendir(//opt/cacti/plugins/weathermap/lib/lib/pre): Failed to open directory: No such file or directory in file: /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php  on line: 832
2023-06-07 00:48:42 - CMDPHP PHP ERROR WARNING Backtrace:  (/plugins/weathermap/weathermap-cacti-plugin-editor.php[147]:drawMap(), /plugins/weathermap/lib/editor.actions.php[110]:WeatherMap->__construct(), /plugins/weathermap/lib/WeatherMap.class.php[372]:WeatherMap->Reset(), /plugins/weathermap/lib/WeatherMap.class.php[530]:WeatherMap->LoadPlugins(), /plugins/weathermap/lib/WeatherMap.class.php[832]:opendir(), CactiErrorHandler())
2023-06-07 00:48:42 - ERROR PHP WARNING in  Plugin 'weathermap': opendir(/opt/cacti/plugins/weathermap/lib/lib/post): Failed to open directory: No such file or directory in file: /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php  on line: 826
2023-06-07 00:48:42 - CMDPHP PHP ERROR WARNING Backtrace:  (/plugins/weathermap/weathermap-cacti-plugin-editor.php[147]:drawMap(), /plugins/weathermap/lib/editor.actions.php[110]:WeatherMap->__construct(), /plugins/weathermap/lib/WeatherMap.class.php[372]:WeatherMap->Reset(), /plugins/weathermap/lib/WeatherMap.class.php[531]:WeatherMap->LoadPlugins(), /plugins/weathermap/lib/WeatherMap.class.php[826]:opendir(), CactiErrorHandler())
2023-06-07 00:48:42 - ERROR PHP WARNING in  Plugin 'weathermap': opendir(//opt/cacti/plugins/weathermap/lib/lib/post): Failed to open directory: No such file or directory in file: /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php  on line: 832
2023-06-07 00:48:42 - CMDPHP PHP ERROR WARNING Backtrace:  (/plugins/weathermap/weathermap-cacti-plugin-editor.php[147]:drawMap(), /plugins/weathermap/lib/editor.actions.php[110]:WeatherMap->__construct(), /plugins/weathermap/lib/WeatherMap.class.php[372]:WeatherMap->Reset(), /plugins/weathermap/lib/WeatherMap.class.php[531]:WeatherMap->LoadPlugins(), /plugins/weathermap/lib/WeatherMap.class.php[832]:opendir(), CactiErrorHandler())
2023-06-07 00:48:42 - ERROR PHP WARNING in  Plugin 'weathermap': fopen(configs/PAG-SNSKG0554-02Z-PAG-SNWNS0719-01Z.conf): Failed to open stream: No such file or directory in file: /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php  on line: 2119
2023-06-07 00:48:42 - CMDPHP PHP ERROR WARNING Backtrace:  (/plugins/weathermap/weathermap-cacti-plugin-editor.php[147]:drawMap(), /plugins/weathermap/lib/editor.actions.php[114]:WeatherMap->ReadConfig(), /plugins/weathermap/lib/WeatherMap.class.php[2119]:fopen(), CactiErrorHandler())
2023-06-07 00:48:42 - ERROR PHP WARNING in  Plugin 'weathermap': file_get_contents(configs/PAG-SNSKG0554-02Z-PAG-SNWNS0719-01Z.conf): Failed to open stream: No such file or directory in file: /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php  on line: 3475
2023-06-07 00:48:42 - CMDPHP PHP ERROR WARNING Backtrace:  (/plugins/weathermap/weathermap-cacti-plugin-editor.php[147]:drawMap(), /plugins/weathermap/lib/editor.actions.php[129]:WeatherMap->DrawMap(), /plugins/weathermap/lib/WeatherMap.class.php[3475]:file_get_contents(), CactiErrorHandler())
2023-06-07 00:48:42 - ERROR PHP ERROR in  Plugin 'weathermap': Uncaught Error: Class "IntlDateFormatter" not found in /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php:1889 Stack trace: #0 /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php(2007): WeatherMap->{closure}() #1 [internal function]: WeatherMap->{closure}() #2 /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php(2009): preg_replace_callback() #3 /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php(2017): WeatherMap->strftime() #4 /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php(3609): WeatherMap->DrawTimestamp() #5 /opt/cacti/plugins/weathermap/lib/editor.actions.php(129): WeatherMap->DrawMap() #6 /opt/cacti/plugins/weathermap/weathermap-cacti-plugin-editor.php(147): drawMap() #7 {main} thrown in file: /opt/cacti/plugins/weathermap/lib/WeatherMap.class.php on line: 1889
2023-06-07 00:48:42 - CMDPHP PHP ERROR Backtrace:  (CactiShutdownHandler())
2023-06-07 00:48:42 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'weathermap'
TheWitness commented 1 year ago

What version of cacti?

lutfisan commented 1 year ago

What version of cacti?

version 1.2.23

I tried upgrading from weathermap 0.98a using this step:

  1. git clone
  2. rm -rf /opt/cacti/plugins/weathermap
  3. mv plugin_weathermap /opt/cacti/plugins/weathermap
  4. chown -R www-data:www-data /opt/cacti/plugins/weathermap
TheWitness commented 1 year ago

Read the readme carefully.