ravening commented on issue #3801: updateIpaddress api for free IP address 
throws DB exception
URL: https://github.com/apache/cloudstack/issues/3801#issuecomment-573098310
 
 
   @DaanHoogland Im trying to update the fordisplay field of the ip address. 
The api is failing while inserting record into event table
   
   
   ```
   (local) 🐵 > update ipaddress id=7429d851-f572-459e-bbc0-43367d33ca19 
fordisplay=true
   Error 530: DB Exception on: com.mysql.jdbc.JDBC42PreparedStatement@6d5e7314: 
INSERT INTO event (event.type, event.state, event.description, event.created, 
event.user_id, event.account_id, event.domain_id, event.level, event.start_id, 
event.parameters, event.uuid, event.archived, event.display) VALUES 
(_binary'NET.IPUPDATE', 'Scheduled', _binary'Updating IP address with ID=9', 
'2020-01-10 16:06:58', 2, -1, 0, _binary'INFO', 0, null, 
_binary'6498e2c0-289c-4677-a8e3-ea5a8a4bc26c', 0, 1)
   
   
   (local) 🐵 > update ipaddress id=7429d851-f572-459e-bbc0-43367d33ca19 
fordisplay=false
   Error 530: DB Exception on: com.mysql.jdbc.JDBC42PreparedStatement@25e07cd8: 
INSERT INTO event (event.type, event.state, event.description, event.created, 
event.user_id, event.account_id, event.domain_id, event.level, event.start_id, 
event.parameters, event.uuid, event.archived, event.display) VALUES 
(_binary'NET.IPUPDATE', 'Scheduled', _binary'Updating IP address with ID=9', 
'2020-01-10 16:07:04', 2, -1, 0, _binary'INFO', 0, null, 
_binary'14629aab-ba44-4d8f-b646-e456f236fad6', 0, 1)
   ```
   
   From logs
   
   ```
   2020-01-10 16:07:04,705 ERROR [c.c.e.ActionEventUtils] 
(qtp858242339-14:ctx-b0b6e3b2 ctx-f3b707bb) (logid:bf62c427) Failed to find 
account(including removed ones) by id '-1'
   2020-01-10 16:07:04,715 DEBUG [c.c.u.d.T.Transaction] 
(qtp858242339-14:ctx-b0b6e3b2 ctx-f3b707bb) (logid:bf62c427) Rolling back the 
transaction: Time = 6 Name =  qtp858242339-14; called by 
-TransactionLegacy.rollback:890-TransactionLegacy.removeUpTo:833-TransactionLegacy.close:657-TransactionContextInterceptor.invoke:36-ReflectiveMethodInvocation.proceed:174-ExposeInvocationInterceptor.invoke:92-ReflectiveMethodInvocation.proceed:185-JdkDynamicAopProxy.invoke:212-$Proxy120.persist:-1-ActionEventUtils.persistActionEvent:186-ActionEventUtils.onScheduledActionEvent:110-ApiServer.queueCommand:712
   2020-01-10 16:07:04,717 ERROR [c.c.a.ApiServer] 
(qtp858242339-14:ctx-b0b6e3b2 ctx-f3b707bb) (logid:bf62c427) unhandled 
exception executing api command: [Ljava.lang.String;@25fabf00
   com.cloud.utils.exception.CloudRuntimeException: DB Exception on: 
com.mysql.jdbc.JDBC42PreparedStatement@25e07cd8: INSERT INTO event (event.type, 
event.state, event.description, event.created, event.user_id, event.account_id, 
event.domain_id, event.level, event.start_id, event.parameters, event.uuid, 
event.archived, event.display) VALUES (_binary'NET.IPUPDATE', 'Scheduled', 
_binary'Updating IP address with ID=9', '2020-01-10 16:07:04', 2, -1, 0, 
_binary'INFO', 0, null, _binary'14629aab-ba44-4d8f-b646-e456f236fad6', 0, 1)
           at 
com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1451)
   
   Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range 
value for column 'account_id' at row 1
           at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3971)
           at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
           at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to