MadaMzandu / uisp-ros-plugin

This is a follow up replacement for the previous Uisp api for mikrotik routers.
32 stars 9 forks source link

Erros in log after the last 2 versions update. (and is not working) #38

Closed dhanielsnieto closed 1 year ago

dhanielsnieto commented 1 year ago

2023-06-15 14:49:23.782: ip address found 172.99.185.47 2023-06-15 14:49:23.785: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:49:23.785: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:49:24.035: ip address found 172.99.185.55 2023-06-15 14:49:24.037: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:49:24.037: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:49:26.519: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:41) 2023-06-15 14:49:26.519: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:49:26.519: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:49:26.780: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:41) 2023-06-15 14:49:26.780: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:49:26.780: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:50:27.540: ip address found 172.99.185.55 2023-06-15 14:50:27.542: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:50:27.542: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:50:30.240: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:41) 2023-06-15 14:50:30.240: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:50:30.240: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:51:14.840: ip address found 172.99.185.55 2023-06-15 14:51:14.843: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:51:14.843: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:51:17.516: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:41) 2023-06-15 14:51:17.516: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:51:17.516: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:51:31.113: ip address found 172.99.185.55 2023-06-15 14:51:31.116: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:51:31.116: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:51:33.759: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:41) 2023-06-15 14:51:33.759: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:51:33.759: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:52:34.894: ip address found 172.99.185.47 2023-06-15 14:52:34.896: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:52:34.896: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:52:37.559: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:41) 2023-06-15 14:52:37.559: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:52:37.559: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:52:51.367: ip address found 172.99.185.55 2023-06-15 14:52:51.371: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:52:51.371: error no: 8192 error: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated 2023-06-15 14:52:54.115: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:41) 2023-06-15 14:52:54.115: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:52:54.115: error no: 2 error: Undefined property: stdClass::$error 2023-06-15 14:53:34.218: error no: 2 error: SQLite3::exec(): table tmp.plans has 14 columns but 13 values were supplied file /data/ucrm/data/plugins/ros-plugin/lib/api_setup.php line: 40 2023-06-15 14:53:34.476: error no: 2 error: SQLite3::exec(): UNIQUE constraint failed: services.id file /data/ucrm/data/plugins/ros-plugin/lib/api_setup.php line: 40 2023-06-15 14:53:34.561: error no: 2 error: SQLite3::exec(): UNIQUE constraint failed: plans.id file /data/ucrm/data/plugins/ros-plugin/lib/api_setup.php line: 40 2023-06-15 14:53:34.561: error no: 2 error: SQLite3::exec(): no such column: address file /data/ucrm/data/plugins/ros-plugin/lib/api_setup.php line: 40 2023-06-15 14:56:35.056: error no: 2 error: Cannot modify header information - headers already sent file /data/ucrm/data/plugins/ros-plugin/lib/api_common.php line: 38 2023-06-15 14:56:35.056: error no: 2 error: Cannot modify header information - headers already sent file /data/ucrm/data/plugins/ros-plugin/lib/api_common.php line: 40 2023-06-15 14:58:03.508: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:42) file /data/ucrm/data/plugins/ros-plugin/lib/api_router.php line: 99 2023-06-15 15:00:26.042: error no: 2 error: Cannot modify header information - headers already sent file /data/ucrm/data/plugins/ros-plugin/lib/api_common.php line: 38 2023-06-15 15:00:26.042: error no: 2 error: Cannot modify header information - headers already sent file /data/ucrm/data/plugins/ros-plugin/lib/api_common.php line: 40 2023-06-15 15:09:30.065: error no: 2 error: SQLite3::exec(): table tmp.plans has 13 columns but 14 values were supplied 2023-06-15 15:09:30.293: error no: 2 error: SQLite3::exec(): UNIQUE constraint failed: services.id 2023-06-15 15:09:30.375: error no: 2 error: SQLite3::exec(): no such column: address 2023-06-15 15:09:44.861: error no: 2 error: Cannot modify header information - headers already sent 2023-06-15 15:09:44.861: error no: 2 error: Cannot modify header information - headers already sent

MadaMzandu commented 1 year ago

Thanks for the feedback, it looks like its failing to migrate previous database. Looking at it

MadaMzandu commented 1 year ago

Is the panel page able to load after install?

dhanielsnieto commented 1 year ago

Yes, everything loads correctly, but if i try to rebuild nothing happens, just got the error in log

MadaMzandu commented 1 year ago

Ok thanks I am checking. So routers are showing 0 users?

MadaMzandu commented 1 year ago

It looks like the system rebuild button is not responding. Try to use the sync device button on the devices page. It does the same thing only per router. This version is supposed to be much faster, takes a few seconds to rebuild a thousand accounts.

dhanielsnieto commented 1 year ago

after sync each device, all subscribers are available again, but is not suspending or making changes in the accounts

MadaMzandu commented 1 year ago

Ok bug has been found will reupload build shortly

dhanielsnieto commented 1 year ago

Thank you so much, I’m ready to test again

MadaMzandu commented 1 year ago

Ok new version uploaded. Please test and let me know

dhanielsnieto commented 1 year ago

Now i got:

2023-06-16 05:23:43.373: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:42) file /data/ucrm/data/plugins/ros-plugin/lib/api_router.php line 99 2023-06-16 05:24:15.117: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:42) file /data/ucrm/data/plugins/ros-plugin/lib/api_router.php line 99 2023-06-16 05:24:31.223: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:42) file /data/ucrm/data/plugins/ros-plugin/lib/api_router.php line 99 2023-06-16 05:25:17.239: error no: 2 error: stream_socket_client(): Unable to connect to 72.252.4.49:8728 (Operation timed out) file /data/ucrm/data/plugins/ros-plugin/lib/routeros_api.class.php line 50 2023-06-16 05:25:22.877: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:42) file /data/ucrm/data/plugins/ros-plugin/lib/api_router.php line 99 2023-06-16 05:25:34.836: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:42) file /data/ucrm/data/plugins/ros-plugin/lib/api_router.php line 99 2023-06-16 05:25:51.011: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:42) file /data/ucrm/data/plugins/ros-plugin/lib/api_router.php line 99 2023-06-16 05:25:51.468: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:42) file /data/ucrm/data/plugins/ros-plugin/lib/api_router.php line 99 2023-06-16 05:25:51.921: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:42) file /data/ucrm/data/plugins/ros-plugin/lib/api_router.php line 99 2023-06-16 05:25:52.101: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:42) file /data/ucrm/data/plugins/ros-plugin/lib/api_router.php line 99 2023-06-16 05:25:52.365: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:42) file /data/ucrm/data/plugins/ros-plugin/lib/api_router.php line 99

MadaMzandu commented 1 year ago

_2023-06-16 05:25:17.239: error no: 2 error: stream_socket_client(): Unable to connect to 72.252.4.49:8728 (Operation timed out) file /data/ucrm/data/plugins/ros-plugin/lib/routerosapi.class.php line 50

The header information errors are none critical http errors, don't worry about these will fix them shortly. But the error above indicates a network problem when checking this device's status.

Have you been able to test the rebuild feature and verify that editing/suspending is working on other devices?

kostopravby commented 1 year ago

fresh install the latest version. 2023-06-16 09:14:43.772: error no: 2 error: Invalid argument supplied for foreach() file /data/ucrm/data/plugins/ros-plugin/lib/api_attributes.php line 138 2023-06-16 09:14:43.773: error no: 2 error: Invalid argument supplied for foreach() file /data/ucrm/data/plugins/ros-plugin/lib/api_attributes.php line 138 2023-06-16 09:14:43.775: error no: 2 error: Invalid argument supplied for foreach() file /data/ucrm/data/plugins/ros-plugin/lib/api_attributes.php line 138 2023-06-16 09:14:44.094: error no: 2 error: Cannot modify header information - headers already sent by (output started at /data/ucrm/data/plugins/ros-plugin/lib/api_common.php:42) file /data/ucrm/data/plugins/ros-plugin/lib/api_router.php line 99

MadaMzandu commented 1 year ago

Thanks will apply fix. For now just add devices and error will go away.

MadaMzandu commented 1 year ago

Have reupped version 2.0.2 with indicated fixes please test and let me know thanks.

kostopravby commented 1 year ago

I added attributes and mikrotik. now when I try to open the main page i see the following: { "status": "failed", "error": true, "message": "near \"OMARINO\": syntax error", "data": [] }

dhanielsnieto commented 1 year ago

After the last update everything is working for me!, thank you so much if i found something else i'll let you know

MadaMzandu commented 1 year ago

After the last update everything is working for me!, thank you so much if i found something else i'll let you know

Thanks. Let me know if anything else

kostopravby commented 1 year ago

I added attributes and mikrotik. now when I try to open the main page i see the following: { "status": "failed", "error": true, "message": "near "OMARINO": syntax error", "data": [] }

I think that you must escape symbol "' ' " in client names

MadaMzandu commented 1 year ago

I added attributes and mikrotik. now when I try to open the main page i see the following: { "status": "failed", "error": true, "message": "near "OMARINO": syntax error", "data": [] }

I was about to ask if the client has symbols in the name. Let me check if its being escaped.

MadaMzandu commented 1 year ago

Version 2.0.2 has been reupped with fix. Please test and let me know. Thanks

kostopravby commented 1 year ago

working

MadaMzandu commented 1 year ago

Thanks. Let me know if something else comes up again