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

[Bug]: Exception: The bucket will not be created because the name is not dns compatible ( backblaze S3 bucket) #51185

Open
5 of 8 tasks
Retidurc opened this issue Mar 2, 2025 · 5 comments · May be fixed by #51192
Open
5 of 8 tasks

Comments

@Retidurc
Copy link
Contributor

Retidurc commented Mar 2, 2025

⚠️ This issue respects the following points: ⚠️

Bug description

While trying to create a folder backed by backblaze S3 solution, nextcloud complains that the name is not DNS compatible.
I am following Backblaze instructions : https://www.backblaze.com/docs/cloud-storage-integrate-nextcloud-with-backblaze-b2

To do so, i've created a bucket like so :

Image
named "rhebryn-archives", the endpoint is s3.us-west-004.backblazeb2.com

Yet, when trying to add the config as follow, nextcloud complains about an invalid dns name :

Image

This may looks like a valid error, but there is no indication whatsoever on how to fix it

Steps to reproduce

  1. Try to add a backblaze bucket in nextcloud
  2. Save the configuration

Expected behavior

Having the bucket mounted

Nextcloud Server version

30

Operating system

Other

PHP engine version

PHP 8.2

Web server

None

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.retidurc.fr",
            "cloud.ryckaert.me",
            "cloud.zaziss.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/cloud.retidurc.fr",
        "dbtype": "pgsql",
        "version": "30.0.6.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbpersistent": true,
        "installed": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 0,
        "updater.release.channel": "stable",
        "app_install_overwrite": [
            "admin_notifications",
            "tasks",
            "ocr",
            "ransomware_detection",
            "calendar",
            "workflow_pdf_converter",
            "deck",
            "event_update_notification",
            "audioplayer",
            "metadata",
            "files_external_gdrive",
            "camerarawpreviews",
            "extract",
            "impersonate",
            "news",
            "polls",
            "ransomware_protection",
            "files_snapshots",
            "unsplash",
            "dropit",
            "checksum",
            "mindmap_app",
            "breezedark",
            "contacts",
            "keeporsweep",
            "social",
            "dicomviewer",
            "occweb",
            "files_archive",
            "duplicatefinder",
            "maps",
            "quicknotes"
        ],
        "mail_smtpmode": "sendmail",
        "mail_sendmailmode": "pipe",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "1025",
        "encryption.legacy_format_support": false,
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "debug": false,
        "profiler": false,
        "default_phone_region": "FR",
        "enabledPreviewProviders": [
            "OC\\Preview\\PDF",
            "OC\\Preview\\Image",
            "OC\\Preview\\Photoshop",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\SVG",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MKV",
            "OC\\Preview\\MP4",
            "OC\\Preview\\AVI",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\Krita"
        ],
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpstreamoptions": {
            "ssl": {
                "allow_self_signed": true,
                "verify_peer": false,
                "verify_peer_name": false
            }
        },
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "maintenance_window_start": 2
    }
}

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

@Retidurc Retidurc added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Mar 2, 2025
@susnux
Copy link
Contributor

susnux commented Mar 2, 2025

Can you enable debug log level (log_level = 0) and check for log messaged for app = objectstore ?

@joshtrichards
Copy link
Member

Are you certain there isn't a space at the end of the bucket name or something?

Check by running occ files_external:list --output=json_pretty maybe?

@susnux
Copy link
Contributor

susnux commented Mar 2, 2025

Are you certain there isn't a space at the end of the bucket name or something?

Thats also my guess (and why I asked for the log)

@Retidurc
Copy link
Contributor Author

Retidurc commented Mar 2, 2025

There was indeed a whitespace, but in the beginning of both the bucket name, and the domain name.
Trailing whitespaces where what I double checked first. And due to the wording of the error I was thinking about something more technical as the cause .

Should I mark this as resolved? Technically not a bug, but I think maaaaybe the error messages need to be a bit more explicit about leading or trailing whitespaces, just to not mislead about the real issue.

@joshtrichards
Copy link
Member

Technically not a bug, but I think maaaaybe the error messages need to be a bit more explicit about leading or trailing whitespaces, just to not mislead about the real issue.

I agree.

Not everyone knows the acceptable characters for DNS hostnames off the top of their head. ;-)

And "DNS compatible" may be a bit too vague.

As for spaces, we could trim them I think safely automatically. We do that in many other places already.

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

Successfully merging a pull request may close this issue.

4 participants