Sync fails diagnostics/boot with Amazon RDS #127
Labels
No labels
actions
bug
complicated
database
dependencies
documentation
downstream
duplicate
enhancement
feature
fixed already
front-end
idea
internal
invalid
investigating
javascript
low priority
milestone
minor bug
needs info
networking
nice to have
pcntl
php
question
suggestion
sync
threading
ui
ux
web
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
bcarrella/libremail#127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
i have EC2 Instance connected to Mysql RDS instance on Amazon AWS.
The configuration is ok, but when i launch the sync operation the script return "privilege error" on mysql server :
Starting IMAP sync in interactive mode
[1-Apr-20 10:00:24] DEBUG: Starting sync engine
[1-Apr-20 10:00:24] NOTICE: Process ID: 27491
[1-Apr-20 10:00:24] NOTICE: SQLSTATE[42000]: Syntax error or access violation: 1227 Access denied; you need (at least one of) the SUPER privilege(s) for this operation
[1-Apr-20 10:00:24] CRITICAL: System encountered an un-recoverable database error. Going to halt now, please see the log file for info.
#0 /home/*************public/ext_lib/libremail-master/sync/sync(222): App\Diagnostics::checkDatabaseException(Object(Pimple\Container), Object(PDOException), true, true)
#1 {main}
Now, rds is managed service and not permit SUPER user privilege as decripted below.
https://aws.amazon.com/premiumsupport/knowledge-center/rds-mysql-functions/
There are a method for bypass this problem?
I'm on DEBIAN 9, Mysql 5.6 on RDS, Php 7.3 and last version of this application.
Thanks for the writeup @mixian. My hunch is that your MySQL user doesn't have access to run some of the SQL commands at boot. The sync app tries to run the following queries:
Would you mind running
./sync -Dfrom within the sync folder. This just runs the diagnostic checks and doesn't load anything else. If this throws an error it's almost guaranteed to be themax_allowed_packetcommand. If it succeeds we'll have to do some more testing.If that above command fails, I would then ask you to please comment out line 187 of the script
/sync/sync. The line that should be commented out is$di['diagnostics']->run(). I'm curious to see if the rest of the application runs with the diagnostics disabled.Also, you might be able to circumvent this error entirely if you can somehow set the
max_allowed_packetsetting in your MySQL server directly to 16mb or higher. The query would look likeSET GLOBAL max_allowed_packet = 16777216;.The reason for this is that large emails will cause the SQL connection to drop unless the SQL query packet size is big enough to handle the whole email part in one query.
Hello! Thanks a lot for the directions. In fact, the problem was the "max_allowed_packet" parameter which on AWS RDS had only 1mb by default.
These parameters can also be changed without being a SUPER user by creating a "customized parameter group" in the RDS admin panel-.
Now I'm syncing. I hope your code can help me.
Thanks again.
Greaet! I'm going to leave this open so that I remember to add this RDS info to the documentation page about the max_allowed_packet/SQL stuff.
Documentation updated in
8348813