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



## bagas (Oct 21, 2020)

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


1 new server

```
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

```
[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

```
# /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

```
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

```
[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
```


```
# /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
```


----------



## bagas (Oct 22, 2020)

Found a solution like this, change Cache::SharedMemoryCache to Cache::FileCache.
In the /usr/local/share/munin/plugins/mysql_ file, change two lines.
Change.

```
BEGIN {
    eval { require Cache::SharedMemoryCache; };
```

Change to.

```
BEGIN {
eval 'require Cache::FileCache';
```

Change.

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

```
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.


----------

