"Packet for query is too large" message in appstore.log when applying a Symantec App Center app policy to an Android app

Article:TECH203275  |  Created: 2013-02-26  |  Updated: 2013-07-25  |  Article URL http://www.symantec.com/docs/TECH203275
Article Type
Technical Solution

Product(s)

Issue



When wrapping an Android app (i.e.  applying an App Policy to an app), the following error occurs in the appstore.log

  


Error



timestamp=2013-01-20 21:34:29.301,logname=aclog,level=DEBUG,module=databaseblob,function=save,line=215,tenant=[tenant name],username=[username],sessionid=d206155b8d4d70a432a9a64b37edd981,url=/appstore/webapi2/app/save,msgid=,msg=errors com.mysql.jdbc.PacketTooBigException: Packet for query is too large (18098699 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
 
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3291)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1983)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)
at com.mysql.jdbc.UpdatableResultSet.updateRow(UpdatableResultSet.java:2411)
at com.nukona.DatabaseBlob.store(DatabaseBlob.java:117)
at com.nukona.DatabaseBlob.main(DatabaseBlob.java:343)
com.mysql.jdbc.PacketTooBigException: Packet for query is too large (18098699 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3291)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1983)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)
at com.mysql.jdbc.UpdatableResultSet.updateRow(UpdatableResultSet.java:2411)
at com.nukona.DatabaseBlob.store(DatabaseBlob.java:117)
at com.nukona.DatabaseBlob.main(DatabaseBlob.java:343)
  

Environment



  • Symantec App Center 4.x

  


Cause



This error may occur in a production installation of App Center if the MySQL server's max_allowed_packet variable is set too low.
  
  

Solution



Alter the MySQL server's max_allowed_packet variable to be larger than the size of the .apk being wrapped:
 
  1. On the MySQL server, edit the file:  /etc/my.cnf
      
  2. Locate the max_allowed_packet variable and increase its value  (e.g.  max_allowed_packet=419430400)
        
  3. Save the file, then restart the mysqld daemon
        
  4. On the App Center server, change the working directory to:  /usr/local/nukona/appstore_cu/
        
  5. Run the following command to restart the App Center services:  # ./scripts/nukona-services.sh restart 
     
      

For more information, see Wrapping an app to add security


Supplemental Materials

SourceETrack
Value3057474
Description

isowrapdeamon Error in mysql database enviroment:packet for query is too large, need to change max_allowed_packet variable



Article URL http://www.symantec.com/docs/TECH203275


Terms of use for this information are found in Legal Notices