Failed to create share at /usr/local/lib/perl5/site_perl/Cache/SharedMemoryBackend.pm line 85.

bagas

Active Member

Reaction score: 2
Messages: 148

Hello.
There are two servers.
Error starting the monitoring script in Muning.
Please help me figure it out.


1 new server
Code:
FreeBSD 12
munin-common-2.0.64                =
munin-node-2.0.64                  =
p5-Cache-2.11                      =
p5-Cache-Cache-1.08                =
p5-DBD-mysql-4.050                 =
perl5-5.32.0                       =


plugins.conf
Code:
[mysql*]
env.mysqlconnection DBI:mysql:mysql;host=localhost;port=3306
env.mysqluser munin
env.mysqlopts -u munin -pmy_password
env.mysqlpassword my_password
env.mysqladmin /usr/local/bin/mysqladmin
env.mysqlshow /usr/local/bin/mysqlshow



error
Code:
# /usr/local/share/munin/plugins/mysql_ suggest
Failed to create share at /usr/local/lib/perl5/site_perl/Cache/SharedMemoryBackend.pm line 85.



2 server old server
Code:
FreeBSD 12
munin-common-2.0.64                =
munin-node-2.0.64                  =
p5-Cache-2.11                      =
p5-Cache-Cache-1.08                =
p5-DBD-mysql-4.050                 =
perl5-5.32.0                       =


plugins.conf
Code:
[mysql*]
env.mysqlconnection DBI:mysql:mysql;host=localhost;port=3306
env.mysqluser munin
env.mysqlopts -u munin -pmy_password
env.mysqlpassword my_password
env.mysqladmin /usr/local/bin/mysqladmin
env.mysqlshow /usr/local/bin/mysqlshow


Code:
# /usr/local/share/munin/plugins/mysql_ suggest
bin_relay_log
binlog_groupcommit
commands
connections
files_tables
innodb_bpool
innodb_bpool_act
innodb_insert_buf
innodb_io
innodb_io_pend
innodb_log
innodb_rows
innodb_semaphores
innodb_tnx
myisam_indexes
network_traffic
qcache
qcache_mem
replication
select_types
slow
sorts
table_locks
tmp_tables
 
OP
bagas

bagas

Active Member

Reaction score: 2
Messages: 148

Found a solution like this, change Cache::SharedMemoryCache to Cache::FileCache.
In the /usr/local/share/munin/plugins/mysql_ file, change two lines.
Change.
Code:
BEGIN {
    eval { require Cache::SharedMemoryCache; };


Change to.
Code:
BEGIN {
eval 'require Cache::FileCache';


Change.
Code:
my $shared_memory_cache ;
if ($has_cache)
{
  $shared_memory_cache = Cache::SharedMemoryCache->new(\%cache_options)

Change to.
Code:
my $shared_memory_cache ;
if ($has_cache)
{
$shared_memory_cache = Cache::FileCache->new(\%cache_options)


I don't understand why it doesn't work with Cache :: SharedMemoryCache.
 
Top