Activating Mail Server on Workspace: 8081 and :3306 error

I am trying to install workspace on my digitalocean droplet and have mail server activated on the same. However every time I put the IP address I get error that can’t connect to port 8081 and when I open it up it says can’t connect to port 3306. And when I run docker of MySQL server on that port, the whole community server collapses and is not accessible or available. I have been on this for the past 5 days.

Hello @givenality
Please point me to the guide which you used for Workspace installation.

However every time I put the IP address I get error that can’t connect to port 8081

Please reproduce the situation and make screenshots. Also please provide us with whole Community server and Mail server logs folders. For docker, they are located here (on the host):
/app/onlyoffice/CommunityServer/logs/
/app/onlyoffice/MailServer/logs/

I have the same issue. I am also using a digital ocean droplet for my workspace server.
I installed the mail module through the control panel here:

I followed the directions to add a MX record to the A section of my custom domain from this link: https://helpcenter.onlyoffice.com/installation/mail-install-docker.aspx

Here is the error message:

I also tried the IP address of the server and got the same result. I have no ufw firewall and already did the iptables commands to accept ports 8081 and 3306.

What is the resolution here?

Hello @zionad
Please collect Community server and Mail server logs. We need to take a look at them. They are located here:
/app/onlyoffice/CommunityServer/logs/
/app/onlyoffice/MailServer/logs/

Which logs do you need? Or should I just send them all?
Ill message you directly for that.

Hello @zionad
Thank you for the provided logs. it seems that Community server cannot connect with Mail server. Please go to the host and double check that specified container address is correct (127.0.0.1). You can check it with docker inspect command. Please let us know the result.

It doesnt appear that the mail server has an assigned address.
Here is the output for the mail server:

root@office:~# docker images
REPOSITORY                   TAG           IMAGE ID       CREATED        SIZE
onlyoffice/documentserver    8.1.3.2       011630116202   11 days ago    3.59GB
onlyoffice/documentserver    8.1.1.1       fcde2d8f7e1d   2 months ago   3.97GB
onlyoffice/documentserver    8.0.1.1       01da3778d001   6 months ago   3.34GB
onlyoffice/communityserver   12.6.0.1900   2f1ef5d2e729   7 months ago   5.19GB
onlyoffice/controlpanel      3.5.2.530     d50c0c309a33   8 months ago   683MB
mysql                        8.0.29        33037edcac9b   2 years ago    444MB
onlyoffice/elasticsearch     7.16.3        77bcd079c9e1   2 years ago    646MB
onlyoffice/mailserver        1.6.75        222be3f84e5e   4 years ago    1.86GB
root@office:~# docker inspect 222be3f84e5e
[
    {
        "Id": "sha256:222be3f84e5e0f6311011385e196d6881195ceb60fe56fb27eebaf33c9b38ae7",
        "RepoTags": [
            "onlyoffice/mailserver:1.6.75"
        ],
        "RepoDigests": [
            "onlyoffice/mailserver@sha256:529aba6a1beb3534d2b195406b4cda8073e81c5edd79b624e410486e3be23fca"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2020-08-04T12:54:08.131117707Z",
        "DockerVersion": "19.03.12",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "143/tcp": {},
                "25/tcp": {},
                "3306/tcp": {},
                "4190/tcp": {},
                "465/tcp": {},
                "587/tcp": {},
                "8081/tcp": {},
                "993/tcp": {},
                "995/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "export CONFIGURATION_ONLY='YES' &&     export USE_DOCKER='YES' &&     bash -C '/usr/src/iRedMail/install_mail.sh';"
            ],
            "Image": "sha256:e956f672111420ce31b4ed7ee1e2a6b8eca38938c169d5043fcbf199aa9cb63a",
            "Volumes": {
                "/etc/pki/tls/mailserver": {},
                "/var/lib/mysql": {},
                "/var/log": {},
                "/var/vmail": {}
            },
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "License": "GPLv2",
                "Vendor": "CentOS",
                "maintainer": "Ascensio System SIA <support@onlyoffice.com>",
                "onlyoffice.mailserver.release-date": "2020-04-02",
                "onlyoffice.mailserver.release-date.sign": "",
                "onlyoffice.mailserver.version": "1.6.74"
            }
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 1864712764,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/d3a9e6b8aec323d4448efa34131109d3e8cd2b725f8059bbff89eead6f6e0ab7/diff:/var/lib/docker/overlay2/21277715948be2aa276e17c417a42e044353656b7a87bbc213699700bc2f1ebd/diff:/var/lib/docker/overlay2/740786de933dd1f571d0c6a85c8eef59274617059092ed041fcf4aa1139ebe08/diff:/var/lib/docker/overlay2/7bacde5f896e9b1fe654add1b6825ff8fd0aa11b78c0b34ab9fba7f5756eeb51/diff",
                "MergedDir": "/var/lib/docker/overlay2/cbf3d73a91d1f8eae366c42344974bb6866b0dac34a7c596f4f9abc0a913b4f6/merged",
                "UpperDir": "/var/lib/docker/overlay2/cbf3d73a91d1f8eae366c42344974bb6866b0dac34a7c596f4f9abc0a913b4f6/diff",
                "WorkDir": "/var/lib/docker/overlay2/cbf3d73a91d1f8eae366c42344974bb6866b0dac34a7c596f4f9abc0a913b4f6/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:69bd93b9db4e01f67316852e99bec9d8b3a657e0de17911994627360a16cb022",
                "sha256:522f00f336804094c0e8802d06cd191c7107bc5a1abae082413c9cae4a88e10c",
                "sha256:0ab8c499206c794f75fbfdc40d18b8a30314f60b16b9ea51eaaa50e3ceb44e01",
                "sha256:6a67e2d395a61f875ae54a697a023cfcdfdfd6e059ba30c4b5d6ea072fdb726e",
                "sha256:0093a75c52af572eba9d662091c6bbf6cf0d49a2a005bce05458cd27bc046e7a"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

Here is the output for the community server:

root@office:~# docker inspect 2f1ef5d2e729
[
    {
        "Id": "sha256:2f1ef5d2e729bcfc789217f0438f16386d71367353694e26181c49036c6a6390",
        "RepoTags": [
            "onlyoffice/communityserver:12.6.0.1900"
        ],
        "RepoDigests": [
            "onlyoffice/communityserver@sha256:45f2f3ab138c5c3fd16ea8d7c6f2480058d4b42fe90a9b197da331683c4f2cbe"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2024-02-19T12:35:34.608398401Z",
        "DockerVersion": "19.03.12",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "3306/tcp": {},
                "443/tcp": {},
                "5222/tcp": {},
                "5280/tcp": {},
                "80/tcp": {},
                "9865/tcp": {},
                "9866/tcp": {},
                "9871/tcp": {},
                "9882/tcp": {},
                "9888/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "LANG=en_US.UTF-8",
                "LANGUAGE=en_US:en",
                "LC_ALL=en_US.UTF-8",
                "ELASTICSEARCH_VERSION=7.16.3"
            ],
            "Cmd": [
                "/app/run-community-server.sh"
            ],
            "Image": "sha256:460339057de24358fed7f15789ccb01bf806a3c2194dbdefa4e749bdb541a47b",
            "Volumes": {
                "/etc/letsencrypt": {},
                "/sys/fs/cgroup": {},
                "/var/lib/mysql": {},
                "/var/log/onlyoffice": {},
                "/var/www/onlyoffice/Data": {}
            },
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "description": "Community Server is a free open-source collaborative system developed to manage documents, projects, customer relationship and emails, all in one place.",
                "maintainer": "Ascensio System SIA <support@onlyoffice.com>",
                "onlyoffice.community.release-date": "20240219",
                "onlyoffice.community.version": "12.6.0.1900",
                "org.opencontainers.image.ref.name": "ubuntu",
                "org.opencontainers.image.version": "22.04",
                "securitytxt": "https://www.onlyoffice.com/.well-known/security.txt"
            }
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 5190084944,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/64bc61a716d420873e614077962d24d162791d882ad10425d0de5e74dda5ef41/diff:/var/lib/docker/overlay2/c05cfe4d30aabc0156507f04656f86eb56b517dc59cbbeeabe86b8db5dad32e9/diff:/var/lib/docker/overlay2/f458dfaa092791637f228192ceaf56cde93309352726d409125e20f6e251ac8e/diff:/var/lib/docker/overlay2/cb7cd1c22ad11f3f0b8719acc714b7f638cd2042e8f219ee3d446477e68d1764/diff:/var/lib/docker/overlay2/a7e4d7b8c43d236fc8ab210bda0426a0564f748dea8bdb3e9ba30c385d693ea8/diff",
                "MergedDir": "/var/lib/docker/overlay2/9b86a71853a7c1aac3bb674fbcb1dbe4c3b7d7876c9138c9f1d4d025621d818a/merged",
                "UpperDir": "/var/lib/docker/overlay2/9b86a71853a7c1aac3bb674fbcb1dbe4c3b7d7876c9138c9f1d4d025621d818a/diff",
                "WorkDir": "/var/lib/docker/overlay2/9b86a71853a7c1aac3bb674fbcb1dbe4c3b7d7876c9138c9f1d4d025621d818a/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:1a102d1cac2bdae8a0160ac4365d4f8653e9d6da56c793a665d556ae07fb7f82",
                "sha256:c2c05f39b98317e7093932d0aebc7ef42465574795c81ed5a1e18c0f71e7df5a",
                "sha256:836f1da256c478ba8f11f65b2f68ffda4612fa695cadd95e62c06037ce9a766c",
                "sha256:b42ddd7c54a2b39df6709937b2b2dff7d751b1d7c1da55a822327c19111912d7",
                "sha256:63df5c011b1e0cc99c85945c3d79da5c13715da518ad69fb696636024d631ae5",
                "sha256:1b709ca4a787ce84b841f483f9c2fe24a2f231406276fd783413be4be34acb6e"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

For reference, the domain I am trying to use for mail is vanguardadj.online. I have already put in the A record in the domain settings. Here is the results of the dig command (on the server):

root@office:~# dig -t A mx.vanguardadj.online; <<>> DiG 9.18.28-0ubuntu0.22.04.1-Ubuntu <<>> -t A mx.vanguardadj.online;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 256
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;mx.vanguardadj.online.         IN      A

;; ANSWER SECTION:
mx.vanguardadj.online.  6572    IN      A       206.189.252.75

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Sep 17 14:07:48 UTC 2024
;; MSG SIZE  rcvd: 66

and dig on the IP (on the server):

root@office:~# dig -x 206.189.252.75; <<>> DiG 9.18.28-0ubuntu0.22.04.1-Ubuntu <<>> -x 206.189.252.75;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 52687
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;75.252.189.206.in-addr.arpa.   IN      PTR

;; AUTHORITY SECTION:
252.189.206.in-addr.arpa. 1800  IN      SOA     ns1.digitalocean.com. hostmaster.252.189.206.in-addr.arpa. 1695251658 10800 3600 604800 1800

;; Query time: 116 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Sep 17 14:08:20 UTC 2024
;; MSG SIZE  rcvd: 123

Let me know if there is anything else you need. I have also tried typing in mx.vanguardadj.online and get the same result.

image

When I installed the mail module, I used the vanguardadj.online domain at the prompt.

Thanks for your help!

Were you able to figure out what the issue is? We need to get this functionality up and running asap.

Thank you!

Hi @zionad :saluting_face:

Thank you for providing the information.
It seems the connection issue might be related to the current Mail Server IP configuration.

Please try the following steps:

  1. In the “Mail Server IP” field, enter the container name onlyoffice-mail-server
  2. In the “Mail Server database host” field, enter the container name onlyoffice-mysql-server

Additionally, could you please provide the output of the following command for further troubleshooting:

docker ps -a

Hi Nikolas, here is the result of those steps:

I used the database password that I setup, and even tried the default “my-secret-pw”. I think the username might be incorrect.

Here is the result of the docker command you requested:

root@office:~# docker ps -aCONTAINER ID   IMAGE                                    COMMAND                  CREATED        STATUS      PORTS                                                                                                                                                                                  NAMES0ccea6c4f551   onlyoffice/mailserver                    "/bin/sh -c 'export …"   8 days ago     Created                                                                                                                                                                                            gracious_engelbart
7abba5ef2d9d   onlyoffice/mailserver:1.6.75             "/bin/sh -c 'export …"   2 weeks ago    Up 9 days   0.0.0.0:25->25/tcp, :::25->25/tcp, 0.0.0.0:143->143/tcp, :::143->143/tcp, 465/tcp, 993/tcp, 995/tcp, 3306/tcp, 4190/tcp, 0.0.0.0:587->587/tcp, :::587->587/tcp, 8081/tcp               onlyoffice-mail-server
db2a64041d48   onlyoffice/documentserver:8.1.3.2        "/app/ds/run-documen…"   2 weeks ago    Up 9 days   80/tcp, 443/tcp                                                                                                                                                                        onlyoffice-document-server
ed6f5f037964   onlyoffice/communityserver:12.6.0.1900   "/app/run-community-…"   3 months ago   Up 9 days   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 3306/tcp, 5280/tcp, 9865-9866/tcp, 9871/tcp, 9882/tcp, 0.0.0.0:5222->5222/tcp, :::5222->5222/tcp, 9888/tcp   onlyoffice-community-server
332e7c5ad000   onlyoffice/controlpanel:3.5.2.530        "/var/www/onlyoffice…"   3 months ago   Up 9 days   80/tcp, 443/tcp                                                                                                                                                                        onlyoffice-control-panel
43892910dd76   onlyoffice/elasticsearch:7.16.3          "/bin/tini -- /usr/l…"   3 months ago   Up 9 days   9200/tcp, 9300/tcp                                                                                                                                                                     onlyoffice-elasticsearch
80243bee1c89   mysql:8.0.29                             "docker-entrypoint.s…"   3 months ago   Up 9 days   3306/tcp, 33060/tcp                                                                                                                                                                    onlyoffice-mysql-server

Thank you for your assistance!

Ken

Hi @Nikolas, as of this morning, we have completely lost all access to 0auth Microsoft email accounts. See screenshot:
2024-10-01_10-27 outlook mail error

How is the progress on my mailserver issue? We desperately need an option to host our own email for internal CRM use. There is alot of correspondence that is piling up.

Hi @zionad

The error message specifically points to a failed authentication method caching_sha2_password

As far as I know, we have been using the mysql_native_password authentication method. The issue you’re seeing might be due to the fact that caching_sha2_password is being used instead.

For reference, you can check the ONLYOFFICE Mail Server installation guide, where they explicitly recommend using mysql_native_password to avoid possible issues.

Hmm…

Well, the password issue comes down to the 0auth feature change that all Microsoft email products have switched over to as of a week ago.

But my main problem is that the mail server I installed through the control panel in Workspace is not able to communicate with the Workspace Community module. The instructions in the support area (Adding ONLYOFFICE Mail to ONLYOFFICE Workspace installation - ONLYOFFICE) said that after installing the mail module through control panel, the mail server would be available in the Workspace. Except when I go to the mail settings in Workspace I see that it still needs to connect to the mail server manually and I am getting an error where it cannot communicate.

All that information is above our posts here, along with the results of the last query you asked me to perform on the mail server.

Also, I dont know if it is relevant, but here is the output of the dig commands on the workspace server (Digital Ocean Droplet):

root@office:~# dig -t A mx.vanguardadj.online
; <<>> DiG 9.18.28-0ubuntu0.22.04.1-Ubuntu <<>> -t A mx.vanguardadj.online
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32589
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;mx.vanguardadj.online.         IN      A

;; ANSWER SECTION:
mx.vanguardadj.online.  2341    IN      A       206.189.252.75

;; Query time: 4 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Oct 01 16:16:24 UTC 2024
;; MSG SIZE  rcvd: 66

root@office:~# dig -x 206.189.252.75

; <<>> DiG 9.18.28-0ubuntu0.22.04.1-Ubuntu <<>> -x 206.189.252.75
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 25299
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;75.252.189.206.in-addr.arpa.   IN      PTR

;; AUTHORITY SECTION:
252.189.206.in-addr.arpa. 1800  IN      SOA     ns1.digitalocean.com. hostmaster.252.189.206.in-addr.arpa. 1695251658 10800 3600 604800 1800

;; Query time: 52 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Oct 01 16:16:52 UTC 2024
;; MSG SIZE  rcvd: 123

Is the PTR answer incorrect?

@Nikolas Can you give me any help here? I have been trying to host our own email in the mail server module for weeks and am still stuck at this same error message.

Hi @zionad,

I see the issue you’re facing, and I understand the importance of getting this resolved. It seems likely that the issue is related to the initial setup of the mail server via the Control Panel.

We’re currently reviewing this scenario for any known issues. However, based on the current situation (without diving deeper into the database or verifying if the mail_admin user and onlyoffice_mailserver database were successfully created), I’d suggest the following steps:

  1. Create a Server Snapshot Backup: This will ensure that you have the option to roll back to the last working version if anything goes wrong.
  2. Backup your Workspace: You can follow this guide here to create backups of your portal data and restore them if needed.
  3. Clean Installation of Workspace with Mail Server: I recommend reinstalling the Workspace using the setup script with the mail server parameter enabled. You can find detailed instructions here on how to configure the installation script, including enabling the mail server during the installation.

Please ensure you have all your backups ready before proceeding.
Let me know how it goes or if you encounter any further issues!

Thanks for the reply. Except, my installation was a Digital Ocean droplet. There was no option to configure the mail server at startup. I had to enable it later.
The scenario you are suggesting would require alot of downtime for my company. There has to be a different way to figure out why the mail server wont communicate with the workspace.

Thank you for your response :handshake:

I understand that your installation was on a DigitalOcean droplet, and that you enabled the mail server after the initial setup. I appreciate your concerns about downtime for your company.

We are currently aware of a bug affecting the mail server connectivity. Specifically, there is an issue where the mail server installed via the Control Panel does not connect properly. Our team is actively working on a fix for this issue.

Based on your current situation, without delving deeper into the database or verifying the successful creation of the mail_admin user and onlyoffice_mailserver database, I would recommend the following course of action:

  1. Backup your data: Create a backup of your current setup and save it locally. For guidance on how to back up, please refer to the OnlyOffice Backup Documentation.
  2. Retrieve the machine key: You can find it in the following path: /app/onlyoffice/CommunityServer/data/.private/machinekey.
  3. Remove existing containers and data: Delete the containers and clear the data in the /app/ directory.
  4. Reinstall ONLYOFFICE Workspace: Initiate the installation again with the mail server by using the -md parameter and include your old machine key with the -mk parameter. Detailed installation steps can be found in the OnlyOffice Installation Guide.
  5. Restore the backup: After the reinstallation, restore your backup through the control panel.
  6. Run the installation script again: Execute the installation script one more time, adding the -u true parameter.
  7. Locate the mail server container IP: Use the command docker inspect onlyoffice-mail-server to find the IP address of the mail server container.
  8. Configure mail server settings: In the portal settings, enter the following:
    • Mail Server IP: the IP address of the mail server container (IMPORTANT: ensure you use the IP address)
    • Mail Server database host: onlyoffice-mysql-server
    • Leave the other parameters at their default values.

Finally, connect and save the settings. This process should resolve the connectivity issues you are experiencing.

If you find that these steps do not resolve your concerns, please consider discussing the option of dedicated support with our sales department. Dedicated support can provide more tailored assistance to meet your needs. You can find more information about this option here.

If you encounter any further issues, please don’t hesitate to reach out.

Thank you for your patience as we work towards resolving this bug.

1 Like

I appreciate the reply and help. I dont have the time to do this now, but I have saved it for a later winter project. For now, I just purchased email hosting and am using the internal mail in workspace as a client to access it and link to CRM project.

Thanks for your work here.

Ken

1 Like