Mysql Error Error: Unknown column 'state_translations.state_value'

Hello,

we have error in logs:
2018-03-23 14:04:14 MySQL Error: Unknown column ‘state_translations.state_value’ in ‘where clause’ (SELECT * FROM sensors WHERE (sensors.device_id = ‘14’) && ((sensors.sensor_current = state_translations.state_value && state_translations.state_generic_value = 2) ))
/opt/librenms/poller.php 14 2018-03-23 14:04:14 - 1 devices polled in 5.322 secs
2018-03-23 14:04:14 MySQL Error: Unknown column ‘state_translations.state_value’ in ‘where clause’ (SELECT * FROM sensors WHERE (sensors.device_id = ‘71’) && ((sensors.sensor_current = state_translations.state_value && state_translations.state_generic_value = 2) ))
/opt/librenms/poller.php 71 2018-03-23 14:04:14 - 1 devices polled in 1.684 secs
2018-03-23 14:04:14 MySQL Error: Unknown column ‘state_translations.state_value’ in ‘where clause’ (SELECT * FROM sensors WHERE (sensors.device_id = ‘51’) && ((sensors.sensor_current = state_translations.state_value && state_translations.state_generic_value = 2) ))
/opt/librenms/poller.php 51 2018-03-23 14:04:14 - 1 devices polled in 1.614 secs
2018-03-23 14:04:17 MySQL Error: Unknown column ‘state_translations.state_value’ in ‘where clause’ (SELECT * FROM sensors WHERE (sensors.device_id = ‘50’) && ((sensors.sensor_current = state_translations.state_value && state_translations.state_generic_value = 2) ))
/opt/librenms/poller.php 50 2018-03-23 14:04:17 - 1 devices polled in 1.687 secs
2018-03-23 14:04:17 MySQL Error: Unknown column ‘state_translations.state_value’ in ‘where clause’ (SELECT * FROM sensors WHERE (sensors.device_id = ‘55’) && ((sensors.sensor_current = state_translations.state_value && state_translations.state_generic_value = 2) ))

in poller service configration: https://docs.librenms.org/#Extensions/Poller-Service/

daily.php - OK.
Validate:

Component Version
LibreNMS 1.37-94-g0c0a70c
DB Schema 247
PHP 7.0.28-0ubuntu0.16.04.1
MySQL 5.7.21-20-log
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3

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

[OK] Composer Version: 1.6.3
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

Appears to be known issue and fix is on the way by @murrant

https://github.com/librenms/librenms/pull/8459

I executed: ./scripts/github-apply 8459
on pollers vm and front.
Problem still exist.

You need to run ./daily.sh to regenerate the sql query.

Work! Thanks.
but, now we have:

Component Version
LibreNMS 1.37-94-g0c0a70c
DB Schema 247
PHP 7.0.28-0ubuntu0.16.04.1
MySQL 5.7.21-20-log
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3

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

[OK] Composer Version: 1.6.3
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX] You can fix this with ./scripts/github-remove
Modified Files:
includes/alerts.inc.php

How to remove this warn?

1 Like

You can ./scripts/github-remove -d The fix has been merge upstream.