Validate bringing up issues i cant resolve

Ive recently updated from a very old version to the latest version. Also updated Ubuntu,PHP and mysql so i presumed id run into some issues. Any help with the below is appreciated. I know there’s a part that says report the schema issues somewhere else but as I’ve a mix of issues I thought id put them together.

Output of daily and validate below. Daily completes, Validate throws up issues.

I cant sort the collation problems. The webpage it gives seems to point t an issue with an older schema.

Also when i run the suggested mysql command “ALTER TABLE session ADD UNIQUE session_value (session_value);”

I get this

ERROR 1062 (23000): Duplicate entry ‘i31a8qk21plo5pl4mjpqkfre91’ for key ‘session_value’

Any help with how to proceed would be great.

./daily.sh
Re-running /opt/librenms/daily.sh as librenms user
Updating to latest codebase OK
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK

./validate.php

Component Version
LibreNMS 1.42.01-18-g1840e46
DB Schema 258
PHP 7.0.30-0ubuntu0.16.04.1
MySQL 5.7.23-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3

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

[OK] Composer Version: 1.7.1
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] MySQL column collation is wrong:
[FIX] Check https://t.libren.ms/-zdwk for info on how to fix.
Columns:
alert_rules rule utf8 utf8_general_ci
alert_rules severity utf8 utf8_general_ci
alert_rules extra utf8 utf8_general_ci
alert_rules name utf8 utf8_general_ci
alert_rules query utf8 utf8_general_ci
eventlog message latin1 latin1_swedish_ci
eventlog type latin1 latin1_swedish_ci
eventlog reference latin1 latin1_swedish_ci
services service_ip utf8 utf8_general_ci
services service_desc utf8 utf8_general_ci
services service_param utf8 utf8_general_ci
services service_message utf8 utf8_general_ci
[FAIL] Database: missing index (session/session_value)
[FAIL] We have detected that your database schema may be wrong, please report the following to us on IRC or the community site (https://t.libren.ms/5gscd):
[FIX] Run the following SQL statements to fix.
SQL Statements:
ALTER TABLE session ADD UNIQUE session_value (session_value);

Delete the existing index and then create the unique index.

Forgive my ignorance but what index should i delete and recreate?

A futher note, the webui is running and i can log in, polling is happening, graphs are being displayed so things look normal. Just the ./validate shows the errors above.

You may have issues with login or insecure login if you don’t fix the index for the sessions table. You could just drop the sessions table, I think the validation will show you how to recreate it.

You need to fix your collation too, there is a link in the output.