Error 1062 when poller runs

A couple of days ago this error stated coming in once an hour. The duplicate entry is the hostname of my librenms server. I dont know how a duplicate could have been created. I am no db admin and havent been in it.

pymysql.err.IntegrityError: (1062, “Duplicate entry ‘vm-umfs-librenms’ for key ‘pollers_poller_name_unique’”)

Here is the full output for the error.
https://p.libren.ms/view/9f674258

validate:

Component Version
LibreNMS 22.7.0-30-g3309750f3
DB Schema 2022_07_19_081224_plugins_unique_index (244)
PHP 7.4.30
Python 3.9.2
Database MariaDB 10.5.15-MariaDB-0+deb11u1
RRDTool 1.7.2
SNMP 5.9

====================================

[OK] Composer Version: 2.3.10
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[WARN] PHP version 8.1 is the minimum supported version as of September, 2022. We recommend you update PHP to a supported version (8.1 suggested) to continue to receive updates. If you do not update PHP, LibreNMS will continue to function but stop receiving bug fixes and updates.
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[OK] rrd_dir is writable
[OK] rrdtool version ok

Are you using distributed polling ? if so how many pollers ?
poller_name field must be unique

MariaDB [librenms]> explain pollers;
±------------±-----------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±------------±-----------------±-----±----±--------±---------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| poller_name | varchar(255) | NO | UNI | NULL | |
| last_polled | datetime | NO | | NULL | |
| devices | int(10) unsigned | NO | | NULL | |
| time_taken | double | NO | | NULL | |
±------------±-----------------±-----±----±--------±---------------+
5 rows in set (0.001 sec)

you can check the entries in pollers table with below command

select * from pollers;

No other pollers. Just the one librenms server.

When I run select * from pollers; I just get a flashing curser
MariaDB [librenms]> explain pollers;
±------------±-----------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±------------±-----------------±-----±----±--------±---------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| poller_name | varchar(255) | NO | UNI | NULL | |
| last_polled | datetime | NO | | NULL | |
| devices | int(10) unsigned | NO | | NULL | |
| time_taken | double | NO | | NULL | |
±------------±-----------------±-----±----±--------±---------------+
5 rows in set (0.004 sec)

MariaDB [librenms]> select * from pollers

Here is my config:

Have a look in misc/config_definitions.json for examples of settings you can set here. DO NOT EDIT misc/config_definitions.json!

// This is the user LibreNMS will run as
//Please ensure this user is created and has the correct permissions to your install
#$config[‘user’] = ‘librenms’;

This should only be set if you want to force a particular hostname/port

It will prevent the web interface being usable form any other hostname

#$config[‘base_url’] = “/”;

Enable this to use rrdcached. Be sure rrd_dir is within the rrdcached dir

and that your web server has permission to talk to rrdcached.

#$config[‘rrdcached’] = “unix:/var/run/rrdcached.sock”;

Default community

$config[‘snmp’][‘community’] = array(‘’);
$config[‘snmp’][‘community’] = array('
’);
$config[‘snmp’][‘community’] = array(’
******’);

Authentication Model

#$config[‘auth_mechanism’] = “mysql”; # default, other options: ldap, http-auth
#$config[‘http_auth_guest’] = “guest”; # remember to configure this user if you use http-auth

List of RFC1918 networks to allow scanning-based discovery

$config[‘nets’][] = “10.0.0.0/8”;
$config[‘nets’][] = “172.16.0.0/12”;
$config[‘nets’][] = “192.168.0.0/16”;
$config[‘nets’][] = “100.100.0.0/16”;

Uncomment the next line to disable daily updates

#$config[‘update’] = 0;

Number in days of how long to keep old rrd files. 0 disables this feature

#$config[‘rrd_purge’] = 0;

Uncomment to submit callback stats via proxy

#$config[‘callback_proxy’] = “hostname:port”;

Set default port association mode for new devices (default: ifIndex)

$config[‘default_port_association_mode’] = ‘ifIndex’;

Enable the in-built billing extension

#$config[‘enable_billing’] = 1;

Enable the in-built services support (Nagios plugins)

$config[‘show_services’] = 1;
$config[‘nagios_plugins’] = “/usr/lib/nagios/plugins”;
$config[‘discover_services’] = true;
$config[‘discover_services_templates’] = true;
$config[‘service_poller_enabled’] = true;
$config[‘service_discovery_enabled’] = true;
$config[‘service_services_enabled’] = true;

“;” is missing in query

select * from pollers;

Thanks,
MariaDB [librenms]> select * from pollers;
±—±-----------------±--------------------±--------±-----------+
| id | poller_name | last_polled | devices | time_taken |
±—±-----------------±--------------------±--------±-----------+
| 43 | vm-umfs-librenms | 2022-08-04 09:21:25 | 39 | 82 |
±—±-----------------±--------------------±--------±-----------+
1 row in set (0.001 sec)

Should I delete that poller? It looks like it should be there. Thats the name of my libenms vm.

I backed up the DB then deleted that entry. It just came back as a different id and still throws the same error.

I also just received this error. I hope this may give us a clue.

We just attempted to update your install but failed. The information below
should help you fix this.

error: cannot lock ref ‘refs/remotes/origin/master’: is at
c25629343fcd1879e76cdc4899c9b8e4f2769118 but expected
0f37f68bfdfa5a30fbe2509c7eafc945a4b6df37

Anybody have any suggestions?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.