[x] API Error when modifying MAC addresses
2024-09-14 19:24:16|DEBUG|--------------------------------------------------
2024-09-14 19:24:16|DEBUG|METHOD: PUT PATHNAME: /interface
2024-09-14 19:24:16|DEBUG|
UPDATE interface
SET name = 'eth0',
labelName = '',
type = 11,
comment = NULL,
mac = '01:02:03:AA:BB:CC'
WHERE id = 36
2024-09-14 19:24:16|DEBUG|
UPDATE interface
SET name = 'eth0',
labelName = '',
type = 11,
comment = NULL,
mac = '01:02:03:AA:BB:CC'
WHERE id = 36
2024-09-14 19:24:16|DEBUG|UPDATE ipobj H inner join interfaceipobj I on I.ipobj=H.id set H.updated_at= CURRENT_TIMESTAMP WHERE I.interface = 36
2024-09-14 19:24:16|DEBUG|UPDATE ipobj H inner join interfaceipobj I on I.ipobj=H.id set H.updated_at= CURRENT_TIMESTAMP WHERE I.interface = 36
node:_http_outgoing:659
throw new ERR_HTTP_HEADERS_SENT('set');
^
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ServerResponse.setHeader (node:_http_outgoing:659:11)
at ServerResponse.header (/opt/fwcloud/api/node_modules/express/lib/response.js:794:10)
at ServerResponse.send (/opt/fwcloud/api/node_modules/express/lib/response.js:174:12)
at ServerResponse.json (/opt/fwcloud/api/node_modules/express/lib/response.js:278:15)
at /opt/fwcloud/api/dist/src/routes/interface/interface.js:194:37
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_HTTP_HEADERS_SENT'
}
Node.js v20.16.0
[x] The api fails when you try to save a keepalived type rule
2024-09-15 20:51:42|DEBUG|METHOD: POST PATHNAME: /fwclouds/2/firewalls/6/system/keepalivedRules
/opt/fwcloud/api/node_modules/typeorm/entity-manager/EntityManager.js:600
if (!options.where) {
^
TypeError: Cannot read properties of undefined (reading 'where')
at EntityManager.findOne (/opt/fwcloud/api/node_modules/typeorm/entity-manager/EntityManager.js:600:22)
at EntityManager.findOneOrFail (/opt/fwcloud/api/node_modules/typeorm/entity-manager/EntityManager.js:650:21)
at Repository.findOneOrFail (/opt/fwcloud/api/node_modules/typeorm/repository/Repository.js:282:29)
at /opt/fwcloud/api/dist/src/models/system/keepalived/keepalived_r/keepalived_r.service.js:94:172
at Array.some ()
at KeepalivedRuleService.store (/opt/fwcloud/api/dist/src/models/system/keepalived/keepalived_r/keepalived_r.service.js:94:63)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async KeepalivedController.create (/opt/fwcloud/api/dist/src/controllers/system/keepalived/keepalived.controller.js:74:36)
at async /opt/fwcloud/api/dist/src/fonaments/http/router/router.service.js:131:33
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client at ServerResponse.setHeader (node:_http_outgoing:659:11) at ServerResponse.header (/opt/fwcloud/api/node_modules/express/lib/response.js:794:10) at ServerResponse.send (/opt/fwcloud/api/node_modules/express/lib/response.js:174:12) at ServerResponse.json (/opt/fwcloud/api/node_modules/express/lib/response.js:278:15) at /opt/fwcloud/api/dist/src/routes/interface/interface.js:194:37 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 'ERR_HTTP_HEADERS_SENT' }
Node.js v20.16.0
TypeError: Cannot read properties of undefined (reading 'where') at EntityManager.findOne (/opt/fwcloud/api/node_modules/typeorm/entity-manager/EntityManager.js:600:22) at EntityManager.findOneOrFail (/opt/fwcloud/api/node_modules/typeorm/entity-manager/EntityManager.js:650:21) at Repository.findOneOrFail (/opt/fwcloud/api/node_modules/typeorm/repository/Repository.js:282:29) at /opt/fwcloud/api/dist/src/models/system/keepalived/keepalived_r/keepalived_r.service.js:94:172 at Array.some ()
at KeepalivedRuleService.store (/opt/fwcloud/api/dist/src/models/system/keepalived/keepalived_r/keepalived_r.service.js:94:63)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async KeepalivedController.create (/opt/fwcloud/api/dist/src/controllers/system/keepalived/keepalived.controller.js:74:36)
at async /opt/fwcloud/api/dist/src/fonaments/http/router/router.service.js:131:33
Node.js v20.16.0