server icon indicating copy to clipboard operation
server copied to clipboard

Activity notification loop - an email sent to all every 30 minutes

Open herrep opened this issue 7 years ago • 7 comments

Steps to reproduce

  1. Activate, for a chosen user account, activity notifications by email for any desired change, e.g. for file creation.
  2. Perform the desired change, e.g. by creating a file.
  3. The notification is sent to the user.

Expected behaviour

The notification should only be sent once.

Actual behaviour

The notification is sent again every 30 minutes, without ever stopping.

Server configuration

Operating system: Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-48-generic x86_64)

Web server: Apache/2.4.29 (Ubuntu)

Database: 10.1.38-MariaDB-0ubuntu0.18.04.2 Ubuntu 18.04

PHP version: PHP 7.2.17-0ubuntu0.18.04.1

Nextcloud version: (see Nextcloud admin page) NextCloud 16.0.0 // Activity 2.9.1 // Activity for shared file downloads 1.5.0

Updated from an older Nextcloud/ownCloud or fresh install: Update from NextCloud 15

Where did you install Nextcloud from: https://download.nextcloud.com/server/releases/nextcloud-16.0.0.zip

Integrity failed:

No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.2.0
  - activity: 2.9.1
  - audioplayer: 2.7.0
  - bookmarks: 1.0.5
  - calendar: 1.7.0
  - cloud_federation_api: 0.2.0
  - comments: 1.6.0
  - contacts: 3.1.1
  - dav: 1.9.2
  - event_update_notification: 0.3.4
  - federatedfilesharing: 1.6.0
  - federation: 1.6.0
  - files: 1.11.0
  - files_downloadactivity: 1.5.0
  - files_external: 1.7.0
  - files_fulltextsearch: 1.3.0
  - files_fulltextsearch_tesseract: 1.2.3
  - files_mindmap: 0.0.13
  - files_pdfviewer: 1.5.0
  - files_rightclick: 0.13.0
  - files_sharing: 1.8.0
  - files_texteditor: 2.8.0
  - files_trashbin: 1.6.0
  - files_versions: 1.9.0
  - files_videoplayer: 1.5.0
  - firstrunwizard: 2.5.0
  - fulltextsearch: 1.3.1
  - fulltextsearch_elasticsearch: 1.3.0
  - gallery: 18.3.0
  - groupfolders: 4.0.0
  - logreader: 2.1.0
  - lookup_server_connector: 1.4.0
  - mail: 0.15.1
  - metadata: 0.9.0
  - nextcloud_announcements: 1.5.0
  - notifications: 2.4.1
  - oauth2: 1.4.2
  - password_policy: 1.6.0
  - passwords: 2019.5.0
  - provisioning_api: 1.6.0
  - richdocuments: 3.3.4
  - serverinfo: 1.6.0
  - sharebymail: 1.6.0
  - spreed: 6.0.1
  - support: 1.0.0
  - survey_client: 1.4.0
  - systemtags: 1.6.0
  - theming: 1.7.0
  - twofactor_backupcodes: 1.5.0
  - updatenotification: 1.6.0
  - user_ldap: 1.6.0
  - viewer: 1.0.0
  - workflowengine: 1.6.0
Disabled:
  - admin_audit
  - bookmarks_fulltextsearch
  - encryption
  - privacy
  - recommendations

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "16.0.0.9",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "memcache.distributed": "\\OC\\Memcache\\Memcached",
        "memcached_servers": [
            [
                "localhost",
                11211
            ]
        ],
        "maintenance": false,
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "theme": "",
        "loglevel": 2,
        "mysql.utf8mb4": true,
        "data-fingerprint": "b5405bf00e53fa9b061c81b791c3ad17",
        "app_install_overwrite": [
            "calendar",
            "mail",
            "spreed",
            "bookmarks_fulltextsearch"
        ]
    }
}

Are you using external storage, if yes which one:

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP

Client configuration

irrelevant, as the bug report concerns the sending of emails

Logs

Web server error log

only one entry concerning an authorization failure regarding the access to config.php

Nextcloud log (data/nextcloud.log)

The Nextcloud Log only showed entirely unrelated log entries: There was one entry regarding a failed login because of having entered the wrong password and repeated entries each 15 minutes (cron job) because of a running fulltextsearch index command. Nothing else, especially no database or mail server related messages.

Browser log

irrelevant, as the bug report concerns the sending of emails

herrep avatar May 21 '19 09:05 herrep

The table oc_activity_mq keeps all rows even though a notification is successfully sent. My manual workaround is to delete all rows from oc_activity_mq when the loop starts again.

herrep avatar May 21 '19 09:05 herrep

Apparently, Nextcloud assumes that no email was sent out so that it constantly retries to send the activity log out again. However, I did not find a log entry for this failure. I realized this failure by using the "password lost" functionality. In this case, Nextcloud produces a log entry that the email could not be sent. However, the email notification works fine.

When entering the settings menu, Nextcloud tells me that the present email settings are wrong. As long as I enter valid email data according to the capabilities of my email server (SMTP Server, STARTTLS vs. SSL/TLS with appropriate port settings), I receive all test emails. Despite the successful delivery of the test emails, Nextcloud reports:

Connection to ssl://:465 Timed Out

This is strange, as communication via:

openssl s_client -connect :465

(performed at the shell of the Nextcloud server) works perfectly.

herrep avatar May 27 '19 09:05 herrep

As expected, when using another way of sending emails, like via sendmail, no notification loop occurs. I configured sendmail for smart host, where I used exactly the same SMTP mail server as previously directly in Nextcloud. In this case, I can circumvent the Nextcloud bug. It appears that Nextcloud processes the result messages from the SMTP server in a different way than sendmail does. Therefore, Nextcloud assumes the outgoing mail was not sent althopugh this is not true. I will gladly provide further details on the SMTP communication, but the regular log files do not show anything. So if anybody could provide a hint what to monitor, I wouzld highly appreciate this.

herrep avatar Jun 02 '19 18:06 herrep

https://github.com/nextcloud/server/blob/0229f20fdcfabaf4a54105cb687ac5068d84e1d7/config/config.sample.php#L311-L316

Change it from false to true and check the logs.

kesselb avatar Jun 02 '19 19:06 kesselb

@herrep you found the issue?

kesselb avatar Jan 28 '20 07:01 kesselb

I need to check again. Due to my workaround by using sendmail, this issue got buried...

herrep avatar Jan 28 '20 07:01 herrep

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

ghost avatar Feb 28 '20 12:02 ghost