Function `getAppsInfo()`as used by `serverinfo` provokes IP-ban (Connection refused) by apps.nextcloud.com
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- php
- 领域
- backend, observability
调研方向
从 lib/SystemStatistics.php 中 workaround 所引用的 getAppsInfo() 调用开始,然后跟踪 /apps/serverinfo/update 请求以及针对 https://apps.nextcloud.com/api/v1/apps.json 的 appstoreFetcher 日志条目。在监控与 apps.nextcloud.com 的连通性的同时复现该请求。完成标准是:打开 serverinfo 不再导致 appstore 连接被阻止或受到影响。
由索引模型根据 Issue 内容生成。
描述
I reported this already in the appstore issue-tracker: https://github.com/nextcloud/appstore/issues/1137
I'm posting this here, because I observed this behavior only when the AppstoreFetcher is called by serverinfo.
Steps to reproduce
- make sure apps.nextcloud.com is accessible:
serverprompt:~# echo -e "\nResponse-Code: $(curl -Lo /dev/null -w "%{http_code}" apps.nextcloud.com)\n==================\n"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 320 100 320 0 0 8396 0 --:--:-- --:--:-- --:--:-- 8421
100 301k 100 301k 0 0 271k 0 0:00:01 0:00:01 --:--:-- 319k
Response-Code: 200
==================
- tail -f your logfile:
tail -F $(nextcloud logfile) | jqand keep it open - open serverinfo in a browser tab
- whait for log message as below.
- close serverinfo tab, since the message repeates every 5 minutes.
- recheck accessibility as under 1:
serverprompt:~# echo -e "\nResponse-Code: $(curl -Lo /dev/null -w "%{http_code}" apps.nextcloud.com)\n==================\n"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to apps.nextcloud.com port 80 after 22 ms: Connection refused
Response-Code: 000
==================
Expected behaviour
no impairments in the connection to apps.nextcloud.com
Actual behaviour
The affected IP get banned/blocked by apps.nextcloud.com.
Since it is my home network, I can easily fetch a new IP but every time a serverinfo tab is opened (no matter what instance, even newly setup in a virtual machine) it get banned again.
Because in my case it's the WAN Ip of my home network, i can not reach the appstore in my browser eather.
Server configuration
Operating system:
Ubuntu 22.04.3 LTS
Web server:
Apache2
Database:
MySQL and PostgeSQL
PHP version:
8.1.0 and 8.2.10
Nextcloud version: (see Nextcloud admin page)
27+
Client configuration
Browser:
Chrome, Brave, Opera
Operating system:
Windows, Linux, Mac
Nextcloud log (data/owncloud.log)
{
"reqId": "5snl2JvDWBJ4eLJYKjN7",
"level": 2,
"time": "2023-09-14T08:46:28+02:00",
"remoteAddr": "192.168.188.36",
"user": "ernolf",
"app": "appstoreFetcher",
"method": "GET",
"url": "/apps/serverinfo/update",
"message": "Could not connect to appstore: cURL error 7: Failed to connect to apps.nextcloud.com port 443 after 41 ms: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://apps.nextcloud.com/api/v1/apps.json",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36",
"version": "27.1.0.5",
"data": {
"app": "appstoreFetcher"
}
}
My workaround:
coment this line: https://github.com/nextcloud/serverinfo/blob/544bacf952cc94ea0d6ec1a828e1de4971acbb94/lib/SystemStatistics.php#L74
// 'apps' => $this->getAppsInfo()
I hope this helps.
- 主要语言
- JavaScript
- 星标
- 133
- 派生
- 67
- 平均合并
- 22 小时 11 分钟
- 30 天内合并 PR
- 55
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nextcloud/serverinfo 的其他 Issue
-
Database checks: `Select_full_join` warning is caused by the setup checks' own schema introspection未关闭
难度 4/5 3-5 天 新手友好度 45/100
nextcloud/serverinfo#1245 ·
维护者通常 1 天内回复
-
Database checks: ∞% reported as Failing when counter is zero; no way to acknowledge/mute a check未关闭0. Needs triage bug
难度 5/5 一周以上 新手友好度 35/100
nextcloud/serverinfo#1231 ·
维护者通常 1 天内回复
-
0. Needs triage bug
难度 4/5 3-5 天 新手友好度 48/100
nextcloud/serverinfo#1224 · 4 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
0. Needs triage bug
难度 3/5 1-2 天 新手友好度 55/100
nextcloud/serverinfo#1223 ·
维护者通常 1 天内回复
-
0. Needs triage bug
难度 3/5 1-2 天 新手友好度 55/100
nextcloud/serverinfo#1221 ·
维护者通常 1 天内回复
查看 nextcloud/serverinfo 的全部 Issue
相似的 Issue
-
enhancement p2 setup
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug good first issue query-log web
难度 2/5 1-3 小时 新手友好度 85/100
ferrous-networking/ferrous-dns#326 ·
维护者通常 1 天内回复
-
type: typos
难度 1/5 1-3 小时 新手友好度 76/100
维护者通常 4 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 67/100
Ylianst/MeshCentral#8294 ·
维护者通常 1 天内回复