I’m using 1.2.8 and I have an external script that query MySQL to return specific information about wifi (SSID, password) or voip (sip user, sip password).
The problem, is that it work maybe 1/3 of the times, jugging from trying to summon back the device after every error return, and the 2/3 of the times, it return the following error.
name: Error message: |- Cannot execute new commands: connection closed sql: select * from genieacs.voip where serial = ? - parameters:['xxxx12345678'] stack: |- Error: Cannot execute new commands: connection closed sql: select * from genieacs.voip where serial = ? - parameters:['xxxx12345678'] at Object.module.exports.createError (/opt/genieacs/ext/node_modules/mariadb/lib/misc/errors.js:61:10) at Query.throwNewError (/opt/genieacs/ext/node_modules/mariadb/lib/cmd/command.js:63:16) at _addCommandDisabled (/opt/genieacs/ext/node_modules/mariadb/lib/connection.js:1265:9) at ConnectionCallback.Connection._queryCallback (/opt/genieacs/ext/node_modules/mariadb/lib/connection.js:579:5) at Object.getVoip (/opt/genieacs/ext/voip.js:11:8)
It don’t seems to be a problem related to the DB since, I’ve done a second node script for debug purpose that call the same “external” node script than GACS (voip.js or wifi.js) to pass the search parameter and print the output from the db in objects / values path format. By exemple:
$node test.js xxxx12345678 getVoip InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.1.Line.1.Enable = Enabled InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.1.Line.1.SIP.AuthUserName = sipuser1 InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.1.Line.1.SIP.AuthPassword = passw1 InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.1.Line.2.Enable = Enabled InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.1.Line.2.SIP.AuthUserName = sipuser2 InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.1.Line.2.SIP.AuthPassword = passw2
And, if I use this script back to back several times in a row, no matter how many time, it seems to always work without any issue. I read somewhere that if a connection is already open, I have to wait for it to close but I’m not sure of how to do it in a GACS provisioning script.
Can anybody help ?