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]: MongoDB 改变了 Request URL 格式 || [Bug]: MongoDB changed the Request URL format #2404

Open
leimao opened this issue Mar 26, 2024 · 1 comment
Labels
bug Something isn't working Inactive

Comments

@leimao
Copy link

leimao commented Mar 26, 2024

问题描述 | Describe the bug

MongoDB URL 的新要求:

mongodb://admin:<password>@ac-1cwx7lh-shard-00-00.ktanrgk.mongodb.net:27017,ac-1cwx7lh-shard-00-01.ktanrgk.mongodb.net:27017,ac-1cwx7lh-shard-00-02.ktanrgk.mongodb.net:27017/?ssl=true&replicaSet=atlas-maqbvt-shard-0&authSource=admin&retryWrites=true&w=majority&appName=Waline-DB

Waline URL 的内容:

mongodb://admin:<password>@ac-1cwx7lh-shard-00-00.ktanrgk.mongodb.net:27017,ac-1cwx7lh-shard-00-01.ktanrgk.mongodb.net:27017,ac-1cwx7lh-shard-00-02.ktanrgk.mongodb.net:27017/Waline-DB?replicaSet=atlas-maqbvt-shard-0&authSource=admin&ssl=true

注意新要求里的 appName.

错误信息:

(node:8) [DEP0170] DeprecationWarning: The URL mongodb://admin:<password>@ac-1cwx7lh-shard-00-00.ktanrgk.mongodb.net:27017,ac-1cwx7lh-shard-00-01.ktanrgk.mongodb.net:27017,ac-1cwx7lh-shard-00-02.ktanrgk.mongodb.net:27017/Waline-DB?replicaSet=atlas-maqbvt-shard-0&authSource=admin&ssl=true is invalid. Future versions of Node.js will throw an error.
(Use `node --trace-deprecation ...` to show where the warning was created)
TimeoutError: ResourceRequest timed out
    at ResourceRequest._fireTimeout (/var/task/node_modules/generic-pool/lib/ResourceRequest.js:62:17)
    at Timeout.bound (/var/task/node_modules/generic-pool/lib/ResourceRequest.js:8:15)
    at listOnTimeout (node:internal/timers:573:17)
    at processTimers (node:internal/timers:514:7)

问题网站 | Website URL

N/A

服务部署在哪里? | Where your waline deploy?

Vercel (Default)

数据存储在哪里?| Where your comment data store?

MongoDB


Problem description | Describe the bug

New requirements for MongoDB URLs:

mongodb://admin:<password>@ac-1cwx7lh-shard-00-00.ktanrgk.mongodb.net:27017,ac-1cwx7lh-shard-00-01.ktanrgk.mongodb.net:27017,ac-1cwx7lh- shard-00-02.ktanrgk.mongodb.net:27017/?ssl=true&replicaSet=atlas-maqbvt-shard-0&authSource=admin&retryWrites=true&w=majority&appName=Waline-DB

Contents of Waline URL:

mongodb://admin:<password>@ac-1cwx7lh-shard-00-00.ktanrgk.mongodb.net:27017,ac-1cwx7lh-shard-00-01.ktanrgk.mongodb.net:27017,ac-1cwx7lh- shard-00-02.ktanrgk.mongodb.net:27017/Waline-DB?replicaSet=atlas-maqbvt-shard-0&authSource=admin&ssl=true

Note the appName in the new requirement.

error message:

(node:8) [DEP0170] DeprecationWarning: The URL mongodb://admin:<password>@ac-1cwx7lh-shard-00-00.ktanrgk.mongodb.net:27017,ac-1cwx7lh-shard-00-01. future versions of Node .js will throw an error.
(Use `node --trace-deprecation ...` to show where the warning was created)
TimeoutError: ResourceRequest timed out
    at ResourceRequest._fireTimeout (/var/task/node_modules/generic-pool/lib/ResourceRequest.js:62:17)
    at Timeout.bound (/var/task/node_modules/generic-pool/lib/ResourceRequest.js:8:15)
    at listOnTimeout (node:internal/timers:573:17)
    at processTimers (node:internal/timers:514:7)

Question Website | Website URL

N/A

Where is the service deployed? | Where your waline deploy?

Vercel (Default)

Where is the data stored? | Where your comment data store?

MongoDB

@leimao leimao added the bug Something isn't working label Mar 26, 2024
@github-actions github-actions bot changed the title [Bug]: MongoDB 改变了 Request URL 格式 [Bug]: MongoDB 改变了 Request URL 格式 || [Bug]: MongoDB changed the Request URL format Mar 26, 2024
@SSRVodka
Copy link

SSRVodka commented Dec 22, 2024

这两种 URL 格式目前都是没问题的,只不过在 cluster 中创建的数据库位置有所不同(留空默认 test)。appName 也不是必须的。
烦请你刷新一下评论区再查看一下日志,方便定位真正的问题


Both URL formats are currently fine, except that the location of the database created in the cluster is different (leave blank to default to test). appName is also not required.
Please refresh the comment area and check the log to help locate the real problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Inactive
Projects
None yet
Development

No branches or pull requests

2 participants