Function `getAppsInfo()`as used by `serverinfo` provokes IP-ban (Connection refused) by apps.nextcloud.com
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- php
- 領域
- backend, observability
調査の方向性
lib/SystemStatistics.php の、回避策で参照されている 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時間 55分
- マージ済み PR(30日)
- 53
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 1週間以上 初心者へのやさしさ 35/100
nextcloud/serverinfo#1231 ·
メンテナーはふだん 1 日以内に返信
-
0. Needs triage enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
nextcloud/serverinfo#1248 ·
メンテナーはふだん 1 日以内に返信
-
1. to develop bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
nextcloud/serverinfo#1224 · コメント 5 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
0. Needs triage bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
nextcloud/serverinfo#1223 ·
メンテナーはふだん 1 日以内に返信
nextcloud/serverinfo の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
bug documentation
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
awslabs/visual-asset-management-system#880 ·
メンテナーはふだん 1 日以内に返信
-
04 type: enhancement 33 needs: docs
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
possible bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Mintplex-Labs/anything-llm#6889 ·
メンテナーはふだん 1 日以内に返信