-
Notifications
You must be signed in to change notification settings - Fork 183
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
Access denied for user mail_admin
, unknown database onlyoffice_mailserver
#203
Comments
Hello @KaKi87 Please describe in more detail, is this your first new installation? Have you installed Mail Server? Are there any other changes to the yml file? |
I downloaded the Docker Compose file, adjusted it and ran
I didn't remove it from the Docker Compose file if that's what you meant.
Service names, host ports and passwords. Thanks |
It seems that the user of the mail server database did not have access when it was first launched. Therefore, the database "onlyoffice_mailserver" was not created. Check again that the user is correct to access the database - login and password. And restart the installation. We also recommend installing the latest version of Onlyoffice 12.5.2. And use docker compose older than 2.16.0. |
Yes, the environment values are identical.
The Docker Compose file contains the following : So that's wrong ?
Oh, but as I installed Docker using the official instructions for Debian 12, the output of How do I change version ? Thanks |
Based on this comment it appears that the Docker Compose files in this repo are not kept up to date with the latest versions of containers, therefore I think that this is something that users must manually check themselves? Is there a specific reason why Docker Compose older that |
Well, there's still the However, it doesn't solve anything as I'm still experiencing database errors : Also, there's this : |
Thanks, I've also got a empty |
Perhaps this pull request might help? |
No, because that's actually wrongly called a bugfix as it's rather a refactor. |
Well, I tried every revision of @evgeniy-antonyuk Would you please provide us with your insight on this ? Thanks |
It's good to hear that I'm not the only person who can't get it working... |
Please check the status of your mail server container. If it is on restart, you need to enable vsyscall in your OS, read our guide. After the reboot, all containers should start. If not, try re-creating it. |
Here's the output of
|
What about the status of the mail server container? Please try to enable vsyscall from our guide anyway. |
It's not restarting, but the
Well, turns out I don't have a |
You should use And you still have this error?
|
Alright.
Not exactly, but a similar one : EDIT : yes, actually, after a minute, I get Could we, by any chance, do a TeamViewer or something, so that we could investigate and solve this more fluently ? Thanks |
Can you provide the output of |
Well, I spotted this at the first line of that output : What I forgot, I'm sorry, is, while resetting the Docker Compose file multiple times, to change Here's the output after fixing it and restarting : https://github.com/ONLYOFFICE/Docker-CommunityServer/files/14029242/docker_logs_onlyoffice-mail-server.txt However, now I have Although all restarts are identical, their last lines differ from the initial start regarding the output of During initial start :
During every restart :
Thanks |
Have you uncommented this line in your yml file https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.workspace.yml#L57 ? |
Well, that was it, lol, I wonder why was that commented. I'm gonna make a PR with all the changes. |
Actually, that's not all, and now I'm back to the initial issue : I can't seem to be able to change the MySQL |
Does the suggestion from Carl here help with this? |
What's the point of having environment variables if the script doesn't use these ?! |
So, without changing any password, the wizard now loads fine on my computer, yay. However, when loading the exact same configuration on my VPS, it seems to crash it (SSH connection lost and unable to reconnect until reboot via provider's dashboard) 😭 |
So I let it run for 4 hours, resulting in 467 kilobytes of log : https://github.com/ONLYOFFICE/Docker-CommunityServer/files/14043346/log.txt Is any of it helping ? Also, looks like
Thanks |
I've done some more work on this also, I have written Ansible to automate everything, however the result is the same 🙄 |
I'm retrying on my server using resources limitations on every service ( Here's the output of
|
This error jumps out:
Does the Or perhaps you need to use the July 2022 image for MySQL, specifically |
If that was the issue, how could the identical configuration work on my local computer ?
That's precisely the one I'm using, if you read carefully. |
Sorry, of course your are right, I assumed you has set everything to |
This is commented out for installing on an older OS than Debian 12 or Ubuntu 22.04, and docker compose < 2.0.
We do not recommend this limitation because elasticsearch requires more memory and therefore its container is restarted: We also have a problem with changing the mysql password in yml files - it does not apply to docker containers and configuration. What error are you currently stuck on? or did you manage to install it? |
If I don't put RAM limitation I'm stuck with a server crash, if I put it I'm stuck with Thanks |
Well, I was able to run OnlyOffice. 🎉 Resolution steps :
Here's the resulting version: '3'
services:
onlyoffice-mysql-server:
container_name: onlyoffice-mysql-server
image: mysql:8.0.29
environment:
- MYSQL_ROOT_PASSWORD=my-secret-pw
networks:
- onlyoffice
stdin_open: true
tty: true
restart: always
volumes:
- ./config/mysql/conf.d:/etc/mysql/conf.d
- ./config/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- mysql_data:/var/lib/mysql
onlyoffice-community-server:
mem_limit: 2G
memswap_limit: ${SWAP_SIZE}
mem_swappiness: 100
container_name: onlyoffice-community-server
image: onlyoffice/communityserver:latest
depends_on:
- onlyoffice-mysql-server
- onlyoffice-document-server
- onlyoffice-mail-server
environment:
- ONLYOFFICE_CORE_MACHINEKEY=core_secret
- DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server
- DOCUMENT_SERVER_JWT_ENABLED=true
- DOCUMENT_SERVER_JWT_SECRET=jwt_secret
- DOCUMENT_SERVER_JWT_HEADER=AuthorizationJwt
- MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw
- MYSQL_SERVER_DB_NAME=onlyoffice
- MYSQL_SERVER_HOST=onlyoffice-mysql-server
- MYSQL_SERVER_USER=onlyoffice_user
- MYSQL_SERVER_PASS=onlyoffice_pass
- MAIL_SERVER_API_PORT=8081
- MAIL_SERVER_API_HOST=onlyoffice-mail-server
- MAIL_SERVER_DB_HOST=onlyoffice-mysql-server
- MAIL_SERVER_DB_PORT=3306
- MAIL_SERVER_DB_NAME=onlyoffice_mailserver
- MAIL_SERVER_DB_USER=mail_admin
- MAIL_SERVER_DB_PASS=Isadmin123
- ELASTICSEARCH_SERVER_HOST=onlyoffice-elasticsearch
- ELASTICSEARCH_SERVER_HTTPPORT=9200
networks:
- onlyoffice
ports:
- '3000:80'
- '5222:5222'
stdin_open: true
tty: true
restart: always
privileged: true
cgroup: host
volumes:
- community_data:/var/www/onlyoffice/Data
- community_log:/var/log/onlyoffice
- community_letsencrypt:/etc/letsencrypt
- document_data:/var/www/onlyoffice/DocumentServerData
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- ./certs:/var/www/onlyoffice/Data/certs
onlyoffice-document-server:
mem_limit: 512M
memswap_limit: ${SWAP_SIZE}
mem_swappiness: 100
container_name: onlyoffice-document-server
image: onlyoffice/documentserver:latest
stdin_open: true
tty: true
restart: always
environment:
- JWT_ENABLED=true
- JWT_SECRET=jwt_secret
- JWT_HEADER=AuthorizationJwt
networks:
- onlyoffice
expose:
- '80'
- '443'
volumes:
- document_data:/var/www/onlyoffice/Data
- document_log:/var/log/onlyoffice
- ./document_fonts:/usr/share/fonts/truetype/custom
- document_forgotten:/var/lib/onlyoffice/documentserver/App_Data/cache/files/forgotten
onlyoffice-mail-server:
mem_limit: 512M
memswap_limit: ${SWAP_SIZE}
mem_swappiness: 100
cgroup: host
container_name: onlyoffice-mail-server
image: onlyoffice/mailserver:latest
depends_on:
- onlyoffice-mysql-server
hostname: ${MAIL_SERVER_HOSTNAME}
environment:
- MYSQL_SERVER=onlyoffice-mysql-server
- MYSQL_SERVER_PORT=3306
- MYSQL_ROOT_USER=mail_admin
- MYSQL_ROOT_PASSWD=Isadmin123
- MYSQL_SERVER_DB_NAME=onlyoffice_mailserver
networks:
- onlyoffice
restart: always
privileged: true
ports: ['25:25', '110:110','143:143', '465:465','587:587', '993:993', '995:995']
stdin_open: true
tty: true
expose:
- '8081'
- '3306'
volumes:
- mail_data:/var/vmail
- mail_certs:/etc/pki/tls/mailserver
- mail_log:/var/log
networks:
onlyoffice:
driver: 'bridge'
volumes:
mail_data:
mail_certs:
mail_log:
mail_mysql:
document_data:
document_log:
document_forgotten:
community_mysql:
community_data:
community_log:
community_letsencrypt:
mysql_data: When using this, a At rest, OnlyOffice uses 6 GB of swap, so I recommend allocating at least 12 GB for the whole server, and surprisingly Now I'll just have to figure out why the Mail app sees my 2 TXT records without seeing my MX record despite whatsmydns.net seeing it. 🤔 |
@Carazyda I'd be interested in more details about the following issue if you have any further information on it:
I'm trying to get it all working with passwords which are different from the default and the database are not being created. |
Hello,
When trying to install OnlyOffice Workspace using
docker-compose.workspace.yml
, I'm encountering the following error :ERROR 1045 (28000): Access denied for user 'mail_admin'@'172.18.0.6' (using password: YES)
.So I manually accessed the database and noticed that user doesn't exist at all, therefore I changed
MAIL_SERVER_DB_USER=mail_admin
toMAIL_SERVER_DB_USER=root
andMYSQL_ROOT_USER=mail_admin
to useMYSQL_ROOT_USER=root
, and now I'm encountering another error :ERROR 1049 (42000): Unknown database 'onlyoffice_mailserver'
.It seems no migration occurs despite starting the server for the first time.
What to do ?
Thanks
The text was updated successfully, but these errors were encountered: