error fwcloud-api.service: sqlMessage: "Out of range value for column 'node_order' at row 48" | FWCloud Forum

error fwcloud-api.service: sqlMessage: "Out of range value for column 'node_order' at row 48"

Javier

New member
Hello,

I have FwCloud installed on an Ubuntu 22.04 using the install script(fwcloud-installer.sh). When I am adding networks (inside the OBJECTS) the fwcloud-api.service goes down and I get the following errors:

root@:~# systemctl status fwcloud-api.service
× fwcloud-api.service - fwcloud-api
Loaded: loaded (/etc/systemd/system/fwcloud-api.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2024-02-01 12:10:34 UTC; 1min 14s ago
Process: 17674 ExecStart=/usr/bin/npm start (code=exited, status=1/FAILURE)
Main PID: 17674 (code=exited, status=1/FAILURE)
CPU: 7.520s

Feb 01 12:10:34 siem-salt-master-new fwcloud-api[17703]: errno: 1264,
Feb 01 12:10:34 siem-salt-master-new fwcloud-api[17703]: sqlState: '22003',
Feb 01 12:10:34 siem-salt-master-new fwcloud-api[17703]: sqlMessage: "Out of range value for column 'node_order' at row 48",
Feb 01 12:10:34 siem-salt-master-new fwcloud-api[17703]: sql: 'UPDATE fwc_tree SET node_order = node_order+1 WHERE (fwcloud = 4 OR fwcloud is null)
Feb 01 12:10:34 siem-salt-master-new fwcloud-api[17703]: query: 'UPDATE fwc_tree SET node_order = node_order+1 WHERE (fwcloud = 4 OR fwcloud is null)
Feb 01 12:10:34 siem-salt-master-new fwcloud-api[17703]: parameters: []
Feb 01 12:10:34 siem-salt-master-new fwcloud-api[17703]: }
Feb 01 12:10:34 siem-salt-master-new systemd[1]: fwcloud-api.service: Main process exited, code=exited, status=1/FAILURE
Feb 01 12:10:34 siem-salt-master-new systemd[1]: fwcloud-api.service: Failed with result 'exit-code'.
Feb 01 12:10:34 siem-salt-master-new systemd[1]: fwcloud-api.service: Consumed 7.520s CPU time.


root@# cat /opt/fwcloud/api/logs/app.log | grep ERROR
2024-02-01 12:04:07|ERROR|[FAILED QUERY]: UPDATE fwc_tree SET node_order = node_order+1 WHERE (fwcloud = 4 OR fwcloud is null) AND id_parent=2469 AND node_order>=1 AND node_order<=999999 AND id<>3974

Is it possible that there is a limit on the number of networks to be added?

Thank you
 

Carles Munyoz

Administrator
Staff member
Hello Javier,
We think that is a bug in the database schema because the node_order column is of type tinyint(2) and it should be of type int(11).

Please, can you run this SQL in your FWCloud database and confirm us if it solves the problem:
SQL:
ALTER TABLE fwc_tree MODIFY node_order INT(11);

If it solves it we will create a patch version of FWCloud-API and create a new release with this bug solved.
 

Javier

New member
Hello Carles, it worked!

After modifying the database as you indicated, I added more networks and did not get the error.

Thank you very much for the solution.
 

Carles Munyoz

Administrator
Staff member
Great, we will publish a patch release soon in order to solve this bug.
Thank you very much for the report.
 
Top