Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-Instance Module Not working for Groupoffice Version 6.8 #1217

Open
Cian-just opened this issue Jan 17, 2025 · 2 comments
Open

Multi-Instance Module Not working for Groupoffice Version 6.8 #1217

Cian-just opened this issue Jan 17, 2025 · 2 comments

Comments

@Cian-just
Copy link

After I've done all requirement listed Here: https://groupoffice.readthedocs.io/en/latest/install/extras/multi_instance.html

My multi-instance kept giving me this error my groupoffice version is 6.8.95

Database exception, DEBUG: SQLSTATE[42000]: Syntax error or access violation: 1044 Access denied for user 'groupoffice'@'localhost' to database 'go_lojiq_xyz', Full SQL: GRANT ALL PRIVILEGES ON go_lojiq_xyz.* TO 'go_lojiq_xyz'@'%'`

and when I tried GRANT ALL ON . TO 'go_lojiq_xyz'@'%' it will give me this error

[2025-01-17 13:15:57][JMAP Instance/set][warn][go\core\orm\Property:92] Validation error in go\modules\community\multi_instance\model\Instance::hostname: 11 = This hostname is not available (User exists).
[2025-01-17 13:15:57][JMAP Instance/set][log][go\core\orm\Entity:427] go\modules\community\multi_instance\model\Instance::internalSave() returned false
[2025-01-17 13:15:57][JMAP Instance/set][log][go\core\jmap\Entity:100] go\modules\community\multi_instance\model\Instance::internalSave() returned false
[2025-01-17 13:15:57][JMAP Instance/set][warn][go\core\orm\Entity:355] go\modules\community\multi_instance\model\Instance::internalSave() returned false
[2025-01-17 13:15:57][JMAP Instance/set][log][go\core\orm\Entity:356] Rolling back save operation for go\modules\community\multi_instance\model\Instance
[2025-01-17 13:15:57][JMAP Instance/query][log][go\core\jmap\Router:102] Method Instance/query,  ID: clientCallId-34

and this kept happening no matter what I tried
restarting groupoffice, GRANT ALL ON . TO 'go_lojiq_xyz'@'%', and tried making a new groupoffice

I also tried on a older version of groupoffice v6.4.97 and it worked fine so I am assuming that this error is a bug affecting the latest versions

@derjoachim
Copy link
Contributor

Your second error is what I expect it to be. Upon trying to create a new instance, the creation will cowardly stop if the selected database user already exists. So if you try to create a go_lojiq_xyz instance, the database user go_lojiq_xyz must not already exist.

If you are logged in with the groupoffice@localhost user, what is the output of SHOW GRANTS? I would expect the output to be something along the lines of

GRANT ALL PRIVILEGES ON . TO groupoffice@localhost IDENTIFIED BY PASSWORD 'foo' WITH GRANT OPTION

The WITH GRANT OPTION is needde for the groupoffice user to use the multi-instance module correctly.

@Cian-just
Copy link
Author

@derjoachim
These are the grants for my groupoffice@localhost

| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `groupoffice`@`localhost` | | GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ABORT_EXEMPT,AUDIT_ADMIN,AUTHENTICATION_POLICY_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,FIREWALL_EXEMPT,FLUSH_OPTIMIZER_COSTS,FLUSH_STATUS,FLUSH_TABLES,FLUSH_USER_RESOURCES,GROUP_REPLICATION_ADMIN,GROUP_REPLICATION_STREAM,INNODB_REDO_LOG_ARCHIVE,INNODB_REDO_LOG_ENABLE,PASSWORDLESS_USER_ADMIN,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SENSITIVE_VARIABLES_OBSERVER,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SHOW_ROUTINE,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,TELEMETRY_LOG_ADMIN,XA_RECOVER_ADMIN ON *.* TO `groupoffice`@`localhost` | | GRANT ALL PRIVILEGES ON `groupoffice`.* TO `groupoffice`@`localhost`

I've tried running
GRANT ALL PRIVILEGES ON *.* TO 'groupoffice'@'localhost' REQUIRE NONE WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;

but it outputs this error

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'REQUIRE NONE WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0' at line 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants