You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot access offset of type string on string {"userId":1,"exception":"[object] (TypeError(code: 0): Cannot access offset of type string on string at /opt/librenms/includes/common.php:294)"}
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'device_id' cannot be null (Connection: mysql, SQL: insert into `devices_attribs` (`attrib_type`, `attrib_value`, `device_id`) values (port_id_notes:2, test, ?)) {"userId":1,"exception":"[object] (Illuminate\\Database\\QueryException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'device_id' cannot be null (Connection: mysql, SQL: insert into `devices_attribs` (`attrib_type`, `attrib_value`, `device_id`) values (port_id_notes:2, test, ?)) at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:822)
[previous exception] [object] (PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'device_id' cannot be null at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:580)"}
I just want to update the port notes via the api,so it shows up ie)
/device/device=63/tab=port/port=3953/view=notes/
Any advice?
Output of ./validate.php
./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS | 24.1.0-39-gf9fc80966 (2024-01-17T16:58:08-05:00)
DB Schema | 2023_12_12_171400_alert_rule_note (277)
PHP | 8.1.2-1ubuntu2.14
Python | 3.10.12
Database | MariaDB 10.6.12-MariaDB-0ubuntu0.22.04.1
RRDTool | 1.7.2
SNMP | 5.9.1
===========================================
[OK] Composer Version: 2.6.6
[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] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok
What was the last working version of LibreNMS?
No response
Anything in the logs that might be useful for us?
No response
The text was updated successfully, but these errors were encountered:
PipoCanaja
changed the title
Can't update port notes
API - Can't update port notes
Jan 18, 2024
The problem
I can't update the port notes. I keep getting :
Cannot access offset of type string on string {"userId":1,"exception":"[object] (TypeError(code: 0): Cannot access offset of type string on string at /opt/librenms/includes/common.php:294)"}
curl -svk -X PATCH -H "X-Auth-Token: " -H "Content-Type: application/json" -d '{"notes": "test"}' https://librenms-server/api/v0/devices/63/port/3953
I've tried different variations too. I even used the example in the notes:
https://docs.librenms.org/API/Devices/#update_device_port_notes
but it still fails. When I change the device_id to a hostname (from select hostname from devices;), I get:
I just want to update the port notes via the api,so it shows up ie)
/device/device=63/tab=port/port=3953/view=notes/
Any advice?
Output of ./validate.php
What was the last working version of LibreNMS?
No response
Anything in the logs that might be useful for us?
No response
The text was updated successfully, but these errors were encountered: